Skip to content

Commit

Permalink
powerpc/perf: BHRB filter configuration should follow the task
Browse files Browse the repository at this point in the history
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 <khandual@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Anshuman Khandual authored and Benjamin Herrenschmidt committed Jul 24, 2013
1 parent 7689bdc commit ff3d79d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/powerpc/perf/core-book3s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,11 @@ static int power_pmu_add(struct perf_event *event, int ef_flags)

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);
Expand Down

0 comments on commit ff3d79d

Please sign in to comment.