Message ID | 20220202041837.65968-1-atrajeev@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [V2] powerpc/perf: Fix task context setting for trace imc | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/github-powerpc_ppctests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_selftests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_clang | success | Successfully ran 7 jobs. |
snowpatch_ozlabs/github-powerpc_kernel_qemu | success | Successfully ran 24 jobs. |
snowpatch_ozlabs/github-powerpc_sparse | success | Successfully ran 4 jobs. |
On Wed, 2 Feb 2022 09:48:37 +0530, Athira Rajeev wrote: > Trace IMC (In-Memory collection counters) in powerpc is > useful for application level profiling. For trace_imc, > presently task context (task_ctx_nr) is set to > perf_hw_context. But perf_hw_context is to be used for > cpu PMU. So for trace_imc, even though it is per thread > PMU, it is preferred to use sw_context inorder to be able > to do application level monitoring. Hence change the > task_ctx_nr to use perf_sw_context. > > [...] Applied to powerpc/next. [1/1] powerpc/perf: Fix task context setting for trace imc https://git.kernel.org/powerpc/c/0198322379c25215b2778482bf1221743a76e2b5 cheers
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index e106909ff9c3..8fe57601e61d 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -1457,7 +1457,13 @@ static int trace_imc_event_init(struct perf_event *event) event->hw.idx = -1; - event->pmu->task_ctx_nr = perf_hw_context; + /* + * There can only be a single PMU for + * perf_hw_context events which is assigned + * to core PMU. Hence use "perf_sw_context" for + * trace_imc. + */ + event->pmu->task_ctx_nr = perf_sw_context; event->destroy = reset_global_refc; return 0; }