lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] babeltrace2: reading metadata + events from a single CTF file
@ 2020-09-06 20:46 Dave Bort via lttng-dev
  2020-09-08 14:53 ` Philippe Proulx via lttng-dev
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Bort via lttng-dev @ 2020-09-06 20:46 UTC (permalink / raw)
  To: lttng-dev


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

Hello! I'm adding CTF-compatible tracing to a custom/experimental OS and
have a question:

Can babeltrace2 read from a single CTF output file that contains both the
metadata stream and the binary trace streams?

My little trace system would like to bundle everything related to a trace
into a single file, making it easier to pass around (since there's not much
filesystem/network support yet). The CTF spec provides a way to embed the
metadata stream in the same bitstream as the data streams, but
https://babeltrace.org/docs/v2.0/man7/babeltrace2-source.ctf.fs.7/ says
that the `metadata` file needs to be separate. I see that LTTng manages
trace output as a collection of files, with a separate `metadata` file.

I'd rather avoid writing a custom tool to find and extract the metadata
stream from the full stream before passing the data on to babeltrace2 or
TraceCompass, but so far it looks like I may need to.

Would it be appropriate to add support for this
to babeltrace2-source.ctf.fs? Or would this warrant a new source.ctf
plugin? If I'm going to write some new code to handle this situation, I may
as well try to add it to the project.

Thank you! I'm really looking forward to benefiting from the
CTF/babeltrace/LTTng/TraceCompass work you've all done over the years. :)

--Dave Bort

[-- Attachment #1.2: Type: text/html, Size: 1557 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] 3+ messages in thread

* Re: [lttng-dev] babeltrace2: reading metadata + events from a single CTF file
  2020-09-06 20:46 [lttng-dev] babeltrace2: reading metadata + events from a single CTF file Dave Bort via lttng-dev
@ 2020-09-08 14:53 ` Philippe Proulx via lttng-dev
  2020-09-08 20:40   ` Dave Bort via lttng-dev
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Proulx via lttng-dev @ 2020-09-08 14:53 UTC (permalink / raw)
  To: Dave Bort; +Cc: lttng-dev

On Mon, Sep 7, 2020 at 8:35 AM Dave Bort via lttng-dev
<lttng-dev@lists.lttng.org> wrote:
>
> Hello! I'm adding CTF-compatible tracing to a custom/experimental OS and have a question:
>
> Can babeltrace2 read from a single CTF output file that contains both the metadata stream and the binary trace streams?

No.

>
> My little trace system would like to bundle everything related to a trace into a single file, making it easier to pass around (since there's not much filesystem/network support yet). The CTF spec provides a way to embed the metadata stream in the same bitstream as the data streams, but https://babeltrace.org/docs/v2.0/man7/babeltrace2-source.ctf.fs.7/ says that the `metadata` file needs to be separate. I see that LTTng manages trace output as a collection of files, with a separate `metadata` file.
>
> I'd rather avoid writing a custom tool to find and extract the metadata stream from the full stream before passing the data on to babeltrace2 or TraceCompass, but so far it looks like I may need to.

You will need to.

>
> Would it be appropriate to add support for this to babeltrace2-source.ctf.fs? Or would this warrant a new source.ctf plugin? If I'm going to write some new code to handle this situation, I may as well try to add it to the project.

This would need to be specified at the CTF level.

Storing a CTF trace on the file system as a single file has been
requested a few times, so we _might_ come up with a specified way to do
it as an addendum to CTF 2 (which is on the roadmap, but not
finalized/released yet).

As of CTF 1.8, the de facto standard way to store a trace on the file
system is to write its metadata stream to the `metadata` file and each
individual data stream to its own file of which the name doesn't begin
with `.`. This is also explained in the "Input" section of
`babeltrace2-source.ctf.fs(7)` [1].

>
> Thank you! I'm really looking forward to benefiting from the CTF/babeltrace/LTTng/TraceCompass work you've all done over the years. :)

I can assure you that the EfficiOS team is very glad to hear that.

Phil

[1]: https://babeltrace.org/docs/v2.0/man7/babeltrace2-source.ctf.fs.7/#doc-input

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

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

* Re: [lttng-dev] babeltrace2: reading metadata + events from a single CTF file
  2020-09-08 14:53 ` Philippe Proulx via lttng-dev
@ 2020-09-08 20:40   ` Dave Bort via lttng-dev
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Bort via lttng-dev @ 2020-09-08 20:40 UTC (permalink / raw)
  To: Philippe Proulx; +Cc: lttng-dev


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

Thank you for your prompt and helpful response, Philippe!

I'll find a way to stick to the de facto standard of multiple files as
input to babeltrace. On the device side, I can bundle things up in a simple
container format like cpio, which I can easily extract on any host system
without special tools.

--dbort

On Tue, Sep 8, 2020 at 7:54 AM Philippe Proulx <eeppeliteloop@gmail.com>
wrote:

> On Mon, Sep 7, 2020 at 8:35 AM Dave Bort via lttng-dev
> <lttng-dev@lists.lttng.org> wrote:
> >
> > Hello! I'm adding CTF-compatible tracing to a custom/experimental OS and
> have a question:
> >
> > Can babeltrace2 read from a single CTF output file that contains both
> the metadata stream and the binary trace streams?
>
> No.
>
> >
> > My little trace system would like to bundle everything related to a
> trace into a single file, making it easier to pass around (since there's
> not much filesystem/network support yet). The CTF spec provides a way to
> embed the metadata stream in the same bitstream as the data streams, but
> https://babeltrace.org/docs/v2.0/man7/babeltrace2-source.ctf.fs.7/ says
> that the `metadata` file needs to be separate. I see that LTTng manages
> trace output as a collection of files, with a separate `metadata` file.
> >
> > I'd rather avoid writing a custom tool to find and extract the metadata
> stream from the full stream before passing the data on to babeltrace2 or
> TraceCompass, but so far it looks like I may need to.
>
> You will need to.
>
> >
> > Would it be appropriate to add support for this to
> babeltrace2-source.ctf.fs? Or would this warrant a new source.ctf plugin?
> If I'm going to write some new code to handle this situation, I may as well
> try to add it to the project.
>
> This would need to be specified at the CTF level.
>
> Storing a CTF trace on the file system as a single file has been
> requested a few times, so we _might_ come up with a specified way to do
> it as an addendum to CTF 2 (which is on the roadmap, but not
> finalized/released yet).
>
> As of CTF 1.8, the de facto standard way to store a trace on the file
> system is to write its metadata stream to the `metadata` file and each
> individual data stream to its own file of which the name doesn't begin
> with `.`. This is also explained in the "Input" section of
> `babeltrace2-source.ctf.fs(7)` [1].
>
> >
> > Thank you! I'm really looking forward to benefiting from the
> CTF/babeltrace/LTTng/TraceCompass work you've all done over the years. :)
>
> I can assure you that the EfficiOS team is very glad to hear that.
>
> Phil
>
> [1]:
> https://babeltrace.org/docs/v2.0/man7/babeltrace2-source.ctf.fs.7/#doc-input
>
> >
> > --Dave Bort
> > _______________________________________________
> > 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: 3873 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] 3+ messages in thread

end of thread, other threads:[~2020-09-08 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06 20:46 [lttng-dev] babeltrace2: reading metadata + events from a single CTF file Dave Bort via lttng-dev
2020-09-08 14:53 ` Philippe Proulx via lttng-dev
2020-09-08 20:40   ` Dave Bort via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).