aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-postgresql.py
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2015-04-06 14:36:16 +0900
committerArnaldo Carvalho de Melo <[email protected]>2015-04-08 09:07:09 -0300
commit3201f0dc42f7fad9387afc4692cea3d0c730cba2 (patch)
tree571296cc0ee74dff4bf2b8dae460c9e27d4472f8 /tools/perf/scripts/python/call-graph-from-postgresql.py
parentba92732e9808df679ddf75c5ea1c0caae6d7dce2 (diff)
tools lib traceevent: Honor operator priority
Currently it ignores operator priority and just sets processed args as a right operand. But it could result in priority inversion in case that the right operand is also a operator arg and its priority is lower. For example, following print format is from new kmem events. "page=%p", REC->pfn != -1UL ? (((struct page *)(0xffffea0000000000UL)) + (REC->pfn)) : ((void *)0) But this was treated as below: REC->pfn != ((null - 1UL) ? ((struct page *)0xffffea0000000000UL + REC->pfn) : (void *) 0) In this case, the right arg was '?' operator which has lower priority. But it just sets the whole arg so making the output confusing - page was always 0 or 1 since that's the result of logical operation. With this patch, it can handle it properly like following: ((REC->pfn != (null - 1UL)) ? ((struct page *)0xffffea0000000000UL + REC->pfn) : (void *) 0) Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Steven Rostedt <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] [ Replaced 'swap' with 'rotate' in a comment as requested by Steve and agreed by Namhyung ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions