OSDN Git Service

tracing/histogram: Simplify handling of .sym-offset in expressions
authorKalesh Singh <kaleshsingh@google.com>
Mon, 25 Oct 2021 20:08:36 +0000 (13:08 -0700)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 27 Oct 2021 00:27:19 +0000 (20:27 -0400)
commitc5eac6ee8bc5d32e48b3845472b547574061f49f
tree10595205f94eef9d1b4aeb5870d04560e9b7a96a
parent9710b2f341a0d96f35b911580639853cfda4677d
tracing/histogram: Simplify handling of .sym-offset in expressions

The '-' in .sym-offset can confuse the hist trigger arithmetic
expression parsing. Simplify the handling of this by replacing the
'sym-offset' with 'symXoffset'. This allows us to correctly evaluate
expressions where the user may have inadvertently added a .sym-offset
modifier to one of the operands in an expression, instead of bailing
out. In this case the .sym-offset has no effect on the evaluation of the
expression. The only valid use of the .sym-offset is as a hist key
modifier.

Link: https://lkml.kernel.org/r/20211025200852.3002369-5-kaleshsingh@google.com
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c