[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 8 Jul 2020 00:11:10 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Linux Trace Devel <linux-trace-devel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@...il.com>
Subject: Re: [PATCH v2 07/15] tools lib traceevent: Optimize pretty_print() function
On Fri, Jul 3, 2020 at 3:57 AM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@...il.com>
>
> 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@...il.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> ---
> tools/lib/traceevent/event-parse-local.h | 17 +
> tools/lib/traceevent/event-parse.c | 672 ++++++++++++++++-------
> tools/lib/traceevent/event-parse.h | 3 +
> 3 files changed, 495 insertions(+), 197 deletions(-)
>
> diff --git a/tools/lib/traceevent/event-parse-local.h b/tools/lib/traceevent/event-parse-local.h
> index 96a0b0ca0675..e71296a62236 100644
> --- a/tools/lib/traceevent/event-parse-local.h
> +++ b/tools/lib/traceevent/event-parse-local.h
> @@ -85,6 +85,23 @@ struct tep_handle {
> struct tep_plugins_dir *plugins_dir;
> };
>
> +enum tep_print_parse_type {
> + PRINT_FMT_STING,
STRING ?
> + PRINT_FMT_ARG_DIGIT,
> + PRINT_FMT_ARG_POINTER,
> + PRINT_FMT_ARG_STRING,
> +};
Powered by blists - more mailing lists