commit | 8802f0f8761a9bdaf8c15223ce05389b7397ffbb | [log] [tgz] |
---|---|---|
author | Ian Rogers <irogers@google.com> | Wed May 08 22:13:17 2024 -0700 |
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | Fri May 17 15:11:18 2024 -0400 |
tree | e25a5ffb4917e6745a0f4fcbf9ac6381f1b8ec10 | |
parent | 76a0eb8d5a20c69120a5f8b4c12f4da0cdc15bb5 [diff] |
libtraceevent: Avoid a simple asprintf case The asprintf function can cause some noticeable overhead[1] and using it for allocating just two characters is a little expensive. Avoid the asprintf for the single character TEP_EVENT_NEWLINE and TEP_EVENT_DELIM case. [1] https://lore.kernel.org/lkml/20240509052015.1914670-1-irogers@google.com/ Link: https://lore.kernel.org/linux-trace-devel/20240509051317.1913001-1-irogers@google.com Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>