[lttng-dev] Using lttng-ust's libringbuffer outside lttng-ust

David Smith dsmith at redhat.com
Mon Feb 25 14:07:06 EST 2013


On 02/15/2013 02:36 PM, Christian Babeux wrote:
> Hi David,

Thanks for the response.

>> The next question would be what is the best way of using libringbuffer
>> outside lttng-ust. One (not great) possibility would be to just copy the
>> code into systemtap. Of course the problem there is keeping the code up
>> to date with changes in lttng-ust. The next possibility would be to make
>> it a separate project (more like userspace-rcu).
> 
> Splitting libringbuffer from the UST tree right now would prove to be
> quite a challenge. We would need to expose an API to the "clients" of
> the ringbuffer. Currently there are two levels of abstraction that one
> can use with the ringbuffer: a "high-level" one where you use a
> predefined "client" with the associated performance degradation and a
> "low-level" one where you know exactly which kind of "client" you are
> using with the associated fast-path inlined.
> 
> We would need to discuss which level of abstraction we expose to the
> user: a generic one or "N apis" for the different low-level "clients".

In my head, I was planning on using the APIs defined in
libringbuffer/*.h (like lib_ring_buffer_{reserve,commit,write} from
frontend_api.h). But, perhaps we could back up a sec and you could
describe a bit more the low-level vs. high-level levels of abstraction.
Feel free to point me at some code.

-- 
David Smith
dsmith at redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)



More information about the lttng-dev mailing list