diff options
author | Steven Rostedt (VMware) <[email protected]> | 2020-03-24 16:08:48 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-06-18 10:22:54 -0300 |
commit | 1b20d9491cf9cf180f1f2a46c80d69af0f775d55 (patch) | |
tree | 55fff8c5abbd05b80a439c6cf5cd2cc339b7629a /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 74621d929d944529a5e2878a84f48bfa6fb69a66 (diff) |
tools lib traceevent: Add handler for __builtin_expect()
In order to move pointer checks like IS_ERR_VALUE() out of the hotpath
and into the reader path of a trace event, user space tools need to be
able to parse that. IS_ERR_VALUE() is defined as:
#define IS_ERR_VALUE() unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
Which eventually turns into:
__builtin_expect(!!((unsigned long)(void *)(x) >= (unsigned long)-4095), 0)
Now the traceevent parser can handle most of that except for the
__builtin_expect(), which needs to be added.
Link: https://lore.kernel.org/linux-mm/[email protected]/
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Jaewon Kim <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kees Kook <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions