[lttng-dev] Babeltrace API question - how can I determine event IDs that exist in a trace I opened?

Amit Margalit AMITM at il.ibm.com
Tue Apr 8 02:44:23 EDT 2014


Hi,

Well, struct bt_ctf_event_decl is declared in events-internal.h, which is 
not installed with 'make-install', which means that this struct is an 
incomplete type in my code, and I cannot dereference it.

I'll try to provide a patch for a new API function that obtains this 
information.


Amit Margalit
IBM XIV - Storage Reinvented
XIV-NAS Development Team
Tel. 03-689-7774
Fax. 03-689-7230



From:   Jérémie Galarneau <jeremie.galarneau at efficios.com>
To:     Amit Margalit/Israel/IBM at IBMIL
Cc:     lttng-dev <lttng-dev at lists.lttng.org>
Date:   04/07/2014 05:10 PM
Subject:        Re: [lttng-dev] Babeltrace API question - how can I 
determine event IDs that exist in a trace I opened?
Sent by:        jeremie.galarneau at gmail.com



On Sun, Apr 6, 2014 at 7:53 AM, Amit Margalit <AMITM at il.ibm.com> wrote:
> Hi,
>
> Once I have created a context, and successfully added a trace, is there 
a
> way to determine which event IDs are present in the trace I just opened?

Have a look at bt_ctf_get_event_decl_list() in 
include/babeltrace/ctf/events.h
This will return a list of struct bt_ctf_event_decl.

The event ID is in bt_ctf_event_decl.parent.id.

Regards,
Jérémie

>
> Specifically, I would like to create a table linking event ID to its 
name,
> without iterating the entire trace to find out...
>
> Is this possible?
>
> Thanks,
>
> Amit Margalit
> IBM XIV - Storage Reinvented
> XIV-NAS Development Team
> Tel. 03-689-7774
> Fax. 03-689-7230
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140408/ab573afb/attachment.html>


More information about the lttng-dev mailing list