All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How to get the sequence element by using babeltrace c API ?
       [not found] <7a52ddf5.cbc5.1643b72e5d1.Coremail.jielan2@163.com>
@ 2018-06-27  7:27 ` Ronan Amorim
  0 siblings, 0 replies; 2+ messages in thread
From: Ronan Amorim @ 2018-06-27  7:27 UTC (permalink / raw)
  To: 砚汐; +Cc: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1183 bytes --]

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@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@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>

[-- Attachment #1.2: Type: text/html, Size: 2042 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* How to get the sequence element by using babeltrace c API ?
@ 2018-06-26  9:35 砚汐
  0 siblings, 0 replies; 2+ messages in thread
From: 砚汐 @ 2018-06-26  9:35 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 443 bytes --]

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 sequence 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








[-- Attachment #1.2: Type: text/html, Size: 744 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-27  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <7a52ddf5.cbc5.1643b72e5d1.Coremail.jielan2@163.com>
2018-06-27  7:27 ` How to get the sequence element by using babeltrace c API ? Ronan Amorim
2018-06-26  9:35 砚汐

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.