perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too
Commit-ID: f1a3c979059b2033d0b1cc4f9ee5c90bf92b5f94 Gitweb: http://git.kernel.org/tip/f1a3c979059b2033d0b1cc4f9ee5c90bf92b5f94 Author: Peter Zijlstra <[email protected]> AuthorDate: Thu, 11 Jun 2009 17:56:09 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 12 Jun 2009 14:28:51 +0200
perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too
is_software_counter() was missing the new HW_CACHE category.
( This could have caused some counter scheduling artifacts
with mixed sw and hw counters and counter groups. )
Signed-off-by Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- include/linux/perf_counter.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/perf_counter.h +2 -1
@@ -621,7 +621,8 @@ extern int perf_counter_overflow(struct perf_counter *counter, int nmi,static inline int is_software_counter (struct perf_counter *counter) {return (counter->attr.type !=PERF_TYPE_RAW ) && - (counter->attr.type !=PERF_TYPE_HARDWARE ); + (counter->attr.type !=PERF_TYPE_HARDWARE ) && + (counter->attr.type !=PERF_TYPE_HW_CACHE ); }extern void perf_swcounter_event (u32 ,u64 ,int ,struct pt_regs *,u64 );