summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2019-02-24 07:37:12 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-02-25 10:58:07 -0300
commit4b6ac811bce46c83811b83cdf87b41251596b9fc (patch)
treebdb49e9888ad797074b192779f1cc7cc13d15d0a /tools/perf/util/header.c
parenteb6176709b235b96511c7b4745c30412568395c7 (diff)
downloadblackbird-op-linux-4b6ac811bce46c83811b83cdf87b41251596b9fc.tar.gz
blackbird-op-linux-4b6ac811bce46c83811b83cdf87b41251596b9fc.zip
perf script: Handle missing fields with -F +..
When using -F + syntax to add a field the existing defaults are currently all marked user_set. This can cause errors when some field is missing in the perf.data This patch tracks the actually user set fields separately, so that we don't error out in this case. Before: % perf record true % perf script -F +metric Samples for 'cycles:ppp' event do not have CPU attribute set. Cannot print 'cpu' field. % After: 5 perf record true % perf script -F +metric perf 28936 278636.237688: 1 cycles:ppp: ffffffff8117da99 perf_event_exec+0x59 (/lib/modules/4.20.0-odilo/build/vmlinux) ... % Signed-off-by: Andi Kleen <ak@linux.intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/20190224153722.27020-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud