From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Tue, 3 Apr 2012 08:57:54 -0400 Subject: [lttng-dev] Writing a babeltrace output plugin In-Reply-To: <524C960C5DFC794E82BE548D825F05CF29D8C6@EU-MBX-04.mgc.mentorg.com> References: <524C960C5DFC794E82BE548D825F05CF29D8A8@EU-MBX-04.mgc.mentorg.com> <524C960C5DFC794E82BE548D825F05CF29D8C6@EU-MBX-04.mgc.mentorg.com> Message-ID: <20120403125754.GC14534@Krystal> * Oestman, Fredrik (Fredrik_Oestman at mentor.com) 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 > lttng-dev at lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com