sink.text.pretty: use bt_common_g_string_append_printf
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 17 Jun 2019 16:53:22 +0000 (12:53 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 21 Jul 2019 15:39:24 +0000 (11:39 -0400)
commitf354b1e1eb240bdc32c740e052fa1af7e5dfaf8f
tree39baa080c426d2292d7da00b1b8a3bbb50d9e553
parent15b4e74c9d44271d73a58a1783dd13ecd19c6ef6
sink.text.pretty: use bt_common_g_string_append_printf

g_string_append_printf() internally allocates a temporary buffer
through use of vasnprintf for each call. This clearly appears at
the top of perf report.

Use babeltrace's own bt_common_g_string_append_printf which operates
directly on the GString buffer, increasing its size to nearby next power
of two as needed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I60b4dccfa19c4321eb5997233826cfabaf924ff2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1503
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/text/pretty/print.c
This page took 0.024293 seconds and 4 git commands to generate.