lkml.org 
[lkml]   [2020]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V4 03/17] perf record: Clear HEADER_CPU_PMU_CAPS for non LBR call stack mode
Em Thu, Mar 19, 2020 at 01:25:03PM -0700, kan.liang@linux.intel.com escreveu:
> From: Kan Liang <kan.liang@linux.intel.com>
>
> The CPU PMU capabilities information is only useful for LBR call stack.
> Clear the feature for other perf record mode.

Humm, I think it is useful to have this extra piece of info in the
header in general, i.e. some user may want to know about these
capabilities when investigating some perf.data file on another machine,
etc, so I'l skip this patch for now.

- Arnaldo

> Reviewed-by: Andi Kleen <ak@linux.intel.com>
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> ---
> tools/perf/builtin-record.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 4c301466101b..428f7f5b8e48 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1120,6 +1120,9 @@ static void record__init_features(struct record *rec)
> if (!record__comp_enabled(rec))
> perf_header__clear_feat(&session->header, HEADER_COMPRESSED);
>
> + if (!callchain_param.enabled || (callchain_param.record_mode != CALLCHAIN_LBR))
> + perf_header__clear_feat(&session->header, HEADER_CPU_PMU_CAPS);
> +
> perf_header__clear_feat(&session->header, HEADER_STAT);
> }
>
> --
> 2.17.1
>

--

- Arnaldo

\
 
 \ /
  Last update: 2020-04-17 16:42    [W:0.289 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site