From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Mon, 3 Feb 2014 16:19:50 +0000 (UTC) Subject: [lttng-dev] Human read-writeable format for CTF traces In-Reply-To: <2093535948.9680292.1391443217617.JavaMail.root@polymtl.ca> References: <2093535948.9680292.1391443217617.JavaMail.root@polymtl.ca> Message-ID: <1219414962.18229.1391444390292.JavaMail.zimbra@efficios.com> ----- Original Message ----- > From: "Michel Dagenais" > To: "Mathieu Desnoyers" > Cc: lttng-dev at lists.lttng.org, "Genevi?ve Bastien" > Sent: Monday, February 3, 2014 11:00:17 AM > Subject: Re: [lttng-dev] Human read-writeable format for CTF traces > > > > I would expect that the ctf writer API recently added to babeltrace > > (currently in master branch), along with the Python bindings that cover > > trace read and write APIs, should allow you to implement things like: > > > > - A plugin to read a CTF trace, and output it in an intermediate format > > to facilitate edits (e.g. XML as you propose), > > - A plugin to read this XML format and output a CTF trace. > > Yes, this would indeed be extremely helpful, in XML and/or JSON. > > > You could also generate the XML trace completely by hand if you like, and > > then convert it to CTF with the second plugin I'm relating to above. > > The likely scenario is to add a few events by hand. > > > Another possibility is that the XML description also allows > > describing what the trace contains at a slightly higher level. For > > instance, if you > > have a periodic event happening for a certain amount of time, it would > > be described in XML, and then "generated" by the XML-to-CTF > > converter. > > Do we want to describe this in XML or in Python? We could have "CTF" to > "Python statements" generating XML. Then we could add loops by hand. We > could also have CTF to XML, with hooks to merge Python generated events. I very much like this idea. Indeed, with a CTF-to-Python-statements converter, we can easily tweak the resulting python script to add events, modify events, and even use loops and re-use functions. This would be extremely useful for unit-testing the state system, and would allow re-use (import) of patterns more easily than with XML descriptions. Thanks, Mathieu > > In addition, TMF may also want to offer similar functionality, an XML dump of > events and an XML events reader. Indeed, TMF supports a few formats other > than CTF. > -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com