* Oestman, Fredrik ([email protected]) wrote: > Hello, > > > I've fairly easily manged to add a new text-based output format to babeltrace > by cloning the existing ctf-text code and making changes to it. Thanks to the > registration mechanism it was also easy to get the program to recognize the > new format on the command line. > > Now, the problem I have with my new text format is that it completely lacks > metadata. > > What would be the intended way to provide an output format with metadata, or > from where should I preferably collect metadata when writing a trace log in a > new format? > > Thanks in advance for any advice!
You'll have to either use the public API (see which files are installed by babeltrace into your system): this is the preferred solution, although there might be some missing metadata information (it's made to support a trace reader, not a trace converter that would have to regenerate the entire metadata). The second solution is to look at include/babeltrace/ctf-ir/metadata.h in-tree, and include/babeltrace/types.h (also in-tree). Those files contain almost all the metadata of the CTF trace read, so you should be able to extract your own metadata from those. Hoping this helps, Best regards, Mathieu > > > Cheers, > > Fredrik Östman > > _______________________________________________ > lttng-dev mailing list > [email protected] > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
