fix API : deal with the optional underscore
authorJulien Desfossez <julien.desfossez@efficios.com>
Thu, 1 Mar 2012 16:14:44 +0000 (11:14 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Mar 2012 16:14:44 +0000 (11:14 -0500)
A field can be prefixed by an underscore internally by the tracer.
This provides the abilility for the user to specify the underscore or
not (depending if he read the metadata or the tracepoint event
definition).
This is a fallback mechanism, so if the request fails, we prefix an
underscore to the field name and request it again.

Also, the bt_ctf_field_name function now removes the optional
underscore.

A quick benchmark shows that calling the bt_ctf_get_field without the
underscore on a field that requires an underscore adds around 151
nanoseconds to the call on a core 2 duo (tested in a loop of 1000000
iterations).

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

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