Speed up probe registration for large amount of events
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Feb 2013 21:56:16 +0000 (16:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Feb 2013 21:56:16 +0000 (16:56 -0500)
LTTng-UST probe registration is O(n^2). I actually left a comment that
describes this, also implying that we can improve this if it becomes an
issue.

I've had a report from Yang Wang, who works on instrumenting the J9 VM,
that O(n^2) does not agree well with 16000 probes and tracepoints.

It appears that lttng_probe_register() is being too paranoid for its own
good. There are now many things that are guaranteed by the way probe
providers are being built.

We actually need to keep a check that no provider with the same name has
been registered (O(n) on the number of registered providers, could be
improved with a hash table if it ever becomes necessary).

Use an assert to check that each event name starts with its own provider
name (it would be an internal error within the provider if it's not the
case). (O(n) on the number of events within a provider)

The rest is just useless, so remove this O(n^2) check.

While we are there, remove the now unused
lttng_event_get()/lttng_event_put() functions.

Reported-by: Yang Wang <yangw.wang5@unb.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.025977 seconds and 4 git commands to generate.