]> Git Repo - linux.git/commitdiff
perf_counter: PERF_TYPE_HW_CACHE is a hardware counter too
authorPeter Zijlstra <[email protected]>
Thu, 11 Jun 2009 15:56:09 +0000 (17:56 +0200)
committerIngo Molnar <[email protected]>
Fri, 12 Jun 2009 12:28:51 +0000 (14:28 +0200)
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

index 6e133954e2e44a95e968c09a7a8b3669280ce74d..7c4f32f6ae1aed3b19a64c4393ba8a11a66d3d7e 100644 (file)
@@ -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);
This page took 0.057958 seconds and 4 git commands to generate.