[lttng-dev] How to get the sequence element by using babeltrace c API ?
Ronan Amorim
ronanrmo at gmail.com
Wed Jun 27 03:27:36 EDT 2018
I dont remember exactly, off the top of my head I think you can do
bt_ctf_get_field_list on the field that is ctf_sequence_type and then
iterate over each of the resulting fields and use bt_ctf_get_int64 to get
the values. Not sure if it is the best way but it works for me.
Btw, is this a ctf_sequence_text or ctf_sequence field in lttng tracepoint?
If it is ctf_sequence_text it won't work because there is a bug in the API.
Regards,
Ronan
On Tue, Jun 26, 2018, 2:52 AM 砚汐 <jielan2 at 163.com> wrote:
> Hello,
> I found the email address via Google, I sincerely hope that it will
> not disturb you. :)
> I'm using babeltrace API in C. I would like to know if there's an API to
> get the *se*quence items when the ctf type is CTF_TYPE_SEQUENCE. I tried
> the bt_ctf_get_index(), but it returns a bt_definition*, I don't know how
> to get the char elements of the sequence in the field. Could you give me
> some suggestions? Thanks very much!
>
>
> BR,
> Tina
>
>
>
>
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20180627/02bb6f7b/attachment.html>
More information about the lttng-dev
mailing list