diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2020-07-02 20:53:51 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-06 13:59:58 +0200 |
commit | e7a90882b05b2669df7a0aa2e87e6283c7edff33 (patch) | |
tree | 0012057bddef87f67edf5f1fa795206a2810ae9a /tools/lib/traceevent/event-parse.h | |
parent | tools lib traceevent: Add support for more printk format specifiers (diff) | |
download | linux-e7a90882b05b2669df7a0aa2e87e6283c7edff33.tar.xz linux-e7a90882b05b2669df7a0aa2e87e6283c7edff33.zip |
tools lib traceevent: Optimize pretty_print() function
Each time the pretty_print() function is called to print an event, the
event's format string is parsed. As this format string does not change,
this parsing can be done only once - when the event struct is
initialized.
Link: https://lore.kernel.org/linux-trace-devel/20200529134929.537110-1-tz.stoyanov@gmail.com
Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-8-tz.stoyanov@gmail.com
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/lkml/20200702185704.559785000@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 91f462f5a606..ac162472268b 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h @@ -272,9 +272,12 @@ struct tep_print_arg { }; }; +struct tep_print_parse; + struct tep_print_fmt { char *format; struct tep_print_arg *args; + struct tep_print_parse *print_cache; }; struct tep_event { |