Re: [PATCH V6 09/14] perf/x86/intel: Support TopDown metrics on Ice Lake

From: Liang, Kan
Date: Tue Jul 21 2020 - 11:50:56 EST




On 7/21/2020 10:31 AM, peterz@xxxxxxxxxxxxx wrote:
On Tue, Jul 21, 2020 at 10:23:36AM -0400, Liang, Kan wrote:

Patch 13 forces the slots event to be part of a metric group. In patch 7,
for a metric group, we only update the values once with slots event.
I think the normal case mentioned above should not happen.

+ /* Only need to call update_topdown_event() once for group read. */
+ if ((cpuc->txn_flags & PERF_PMU_TXN_READ) &&
+ !is_slots_event(event))
+ return;
+
+ perf_pmu_disable(event->pmu);
+ x86_pmu.update_topdown_event(event);
+ perf_pmu_enable(event->pmu);

Ah, I missed that.

That also requires SLOTS to be the leader so that it will be the first
read. Did we enforce that somewhere?

I think it's missed in the current patch set. The suggested code in patch 11 forces SLOTS to be the leader. I will apply it in V7.

Thanks,
Kan