]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/histogram: Covert expr to const if both operands are constants
authorKalesh Singh <kaleshsingh@google.com>
Mon, 25 Oct 2021 20:08:37 +0000 (13:08 -0700)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 27 Oct 2021 00:27:19 +0000 (20:27 -0400)
commit2648cb2d22c790f63de7b60061ca11daec884471
tree25799f6a70edad81c2340248d4f038384cc43bfa
parent7b2c035fed13470565f688244e31e4cbe64ecc91
tracing/histogram: Covert expr to const if both operands are constants

If both operands of a hist trigger expression are constants, convert the
expression to a constant. This optimization avoids having to perform the
same calculation multiple times and also saves on memory since the
merged constants are represented by a single struct hist_field instead
or multiple.

Link: https://lkml.kernel.org/r/20211025200852.3002369-6-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