diff options
author | Andi Kleen <[email protected]> | 2019-02-24 07:37:12 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-02-25 10:58:07 -0300 |
commit | 4b6ac811bce46c83811b83cdf87b41251596b9fc (patch) | |
tree | bdb49e9888ad797074b192779f1cc7cc13d15d0a /tools/perf/scripts/python | |
parent | eb6176709b235b96511c7b4745c30412568395c7 (diff) |
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 <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions