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)
commit300d317acaa3bd38afafe0a440946e6c73e6fd73
treee726890e7c20967cabae4854c06d51a51dcf29ea
parent8673030f3cb8d157a30e79af524fd5cca253025e
fix API : deal with the optional underscore

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>
formats/ctf/events.c
include/babeltrace/ctf-text/types.h
include/babeltrace/types.h
This page took 0.024295 seconds and 4 git commands to generate.