Introduce hash table for lttng_create_event_if_missing()
lttng_create_event_if_missing() takes a lot of CPU time with stress-test
applications containing 1000 different TRACEPOINT_EVENT() and 1000
individual tracepoint() call-site.
With tracing disabled:
time ./AppWith1000_lines_TP 0
real 0m2.487s
user 0m2.424s
sys 0m0.000s
Introducing this hash table cuts the overhead very significantly when
tracing is enabled:
Before patch:
72.16% AppWith1000_lin liblttng-ust.so.0.0.0 [.] lttng_create_event_if_missing
25.64% AppWith1000_lin AppWith1000_lines_TP [.] a(int)
time ./AppWith1000_lines_TP 0
real 0m7.946s
user 0m7.864s
sys 0m0.000s
After patch:
89.13% AppWith1000_lin AppWith1000_lines_TP [.] a(int)
3.30% AppWith1000_lin liblttng-ust.so.0.0.0 [.] lttng_create_event_if_missing
time ./AppWith1000_lines_TP 0
real 0m2.762s
user 0m2.692s
sys 0m0.004s
Acked-by: David Goulet <dgoulet@efficios.com>
Acked-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.026415 seconds and 4 git commands to generate.