Re: [PATCH v3 04/15] perf/x86/amd: Support PERF_SAMPLE_{WEIGHT|WEIGHT_STRUCT}

From: Namhyung Kim
Date: Fri Sep 30 2022 - 01:09:21 EST


On Wed, Sep 28, 2022 at 2:59 AM Ravi Bangoria <ravi.bangoria@xxxxxxx> wrote:
>
> IbsDcMissLat indicates the number of clock cycles from when a miss is
> detected in the data cache to when the data was delivered to the core.
> Similarly, IbsTagToRetCtr provides number of cycles from when the op
> was tagged to when the op was retired. Consider these fields for
> sample->weight.
>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@xxxxxxx>
> ---
> Note:
> While opening a new event, perf tool starts with a set of attributes
> and goes on reverting some attributes in a predefined order until it
> succeeds or run out or all attempts. Here, 1st attempt includes both
> WEIGHT_STRUCT and exclude_guest which always fails because IBS does
> not support guest filtering. The problem however is, perf reverts
> WEIGHT_STRUCT but keeps trying with exclude_guest. Thus, although,
> this patch enables WEIGHT_STRUCT support from kernel, using it from
> the perf tool needs more changes(not included in this series).

Yeah, it'd be nice if kernel could expose more pmu capabilities like
no-exclude then tools can skip setting it for them.

Thanks,
Namhyung