]>
git.efficios.com Git - babeltrace.git/commit
common: implement 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.
Implement our own private bt_g_string_append_printf which operates
directly on the GString buffer.
See proof of memory allocation/free near the top of this perf report
when converting a 400M LTTng trace to text (piped to /dev/null):
14.76% babeltrace2 libc-2.24.so [.] vfprintf
7.92% babeltrace2 [kernel.kallsyms] [k] vmacache_find
6.39% babeltrace2 libglib-2.0.so.0.5000.3 [.] g_string_insert_len
4.77% babeltrace2 babeltrace-plugin-ctf.so [.] bt_bfcr_start
4.23% babeltrace2 libc-2.24.so [.] _int_malloc
4.06% babeltrace2 libc-2.24.so [.] _IO_default_xsputn
3.60% babeltrace2 libc-2.24.so [.] strlen
3.60% babeltrace2 libc-2.24.so [.] __strchrnul
3.60% babeltrace2 libbabeltrace2.so.0.0.0 [.] bt_attributes_borrow_field_by_name
3.51% babeltrace2 libc-2.24.so [.] _int_free
2.88% babeltrace2 libc-2.24.so [.] __vasprintf_chk
2.88% babeltrace2 libc-2.24.so [.] _IO_str_init_static_internal
2.88% babeltrace2 libc-2.24.so [.] __strcmp_sse2_unaligned
2.16% babeltrace2 libc-2.24.so [.] malloc
2.16% babeltrace2 libc-2.24.so [.] __tzstring_len
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I956305ac8891d244dbdab6a5b0dde82ecc960e25
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1514
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.029297 seconds and 4 git commands to generate.