diff options
| author | Sebastien Boisvert <[email protected]> | 2018-10-26 15:02:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-10-26 16:25:18 -0700 |
| commit | 4d54954a197175c0dcb3c82af0c0740d0c5f827a (patch) | |
| tree | 65e0b5edd3c32f9b805beec62b15279251d93bb1 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | ae62c16e105a869524afcf8a07ee85c5ae5d0479 (diff) | |
include/linux/pfn_t.h: force '~' to be parsed as an unary operator
Tracing the event "fs_dax:dax_pmd_insert_mapping" with perf produces this
warning:
[fs_dax:dax_pmd_insert_mapping] unknown op '~'
It is printed in process_op (tools/lib/traceevent/event-parse.c) because
'~' is parsed as a binary operator.
perf reads the format of fs_dax:dax_pmd_insert_mapping ("print fmt") from
/sys/kernel/debug/tracing/events/fs_dax/dax_pmd_insert_mapping/format .
The format contains:
~(((u64) ~(~(((1UL) << 12)-1)))
^
\ interpreted as a binary operator by process_op().
This part is generated in the declaration of the event class
dax_pmd_insert_mapping_class in include/trace/events/fs_dax.h :
__print_flags_u64(__entry->pfn_val & PFN_FLAGS_MASK, "|",
PFN_FLAGS_TRACE),
This patch adds a pair of parentheses in the declaration of PFN_FLAGS_MASK
to make sure that '~' is parsed as a unary operator by perf.
The part of the format that was problematic is now:
~(((u64) (~(~(((1UL) << 12)-1))))
Now, all the '~' are parsed as unary operators.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sebastien Boisvert <[email protected]>
Acked-by: Dan Williams <[email protected]>
Cc: "Steven Rostedt (VMware)" <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: "Tzvetomir Stoyanov (VMware)" <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Elenie Godzaridis <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions