]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7b2c035fed13470565f688244e31e4cbe64ecc91
tree10595205f94eef9d1b4aeb5870d04560e9b7a96a
parentec4ea02fc441955ff7760416f073f4c461e7110e
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