Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158308
b: refs/heads/master
c: 1653192
h: refs/heads/master
v: v3
  • Loading branch information
markus.t.metzger@intel.com authored and Ingo Molnar committed Sep 4, 2009
1 parent 94e3020 commit 0b170a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 596da17f94c103348ebe04129c00d536ea0e80e2
refs/heads/master: 1653192f510bd8114b7b133d7289e6e5c3e95046
11 changes: 9 additions & 2 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
* Branch tracing:
*/
if ((attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS) &&
(hwc->sample_period == 1) && !bts_available())
return -EOPNOTSUPP;
(hwc->sample_period == 1)) {
/* BTS is not supported by this architecture. */
if (!bts_available())
return -EOPNOTSUPP;

/* BTS is currently only allowed for user-mode. */
if (hwc->config & ARCH_PERFMON_EVENTSEL_OS)
return -EOPNOTSUPP;
}

hwc->config |= config;

Expand Down

0 comments on commit 0b170a8

Please sign in to comment.