powerpc/perf: BHRB filter configuration should follow the task
authorAnshuman Khandual <[email protected]>
Mon, 10 Jun 2013 05:53:29 +0000 (11:23 +0530)
committerBenjamin Herrenschmidt <[email protected]>
Wed, 24 Jul 2013 04:42:34 +0000 (14:42 +1000)
When the task moves around the system, the corresponding cpuhw
per cpu strcuture should be popullated with the BHRB filter
request value so that PMU could be configured appropriately with
that during the next call into power_pmu_enable().

Signed-off-by: Anshuman Khandual <[email protected]>
Acked-by: Michael Neuling <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
arch/powerpc/perf/core-book3s.c

index a3985aee77fec1ecd2fe9756257e3a46b9643b94..24a45f91c65f69480119055e6d8820f52f07582b 100644 (file)
@@ -1252,8 +1252,11 @@ nocheck:
 
        ret = 0;
  out:
-       if (has_branch_stack(event))
+       if (has_branch_stack(event)) {
                power_pmu_bhrb_enable(event);
+               cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
+                                       event->attr.branch_sample_type);
+       }
 
        perf_pmu_enable(event->pmu);
        local_irq_restore(flags);