* Thibault, Daniel (dthiba...@drdc-rddc.gc.ca) wrote: > Is anyone else bothered by the slight irregularity of babeltrace's output? > > Here is the same trace record printed using various babeltrace settings. In > all cases I used '-f trace:hostname --no-delta', varying only the '-n' part: > > -n scope > [11:02:08.064705355] edge-vb-u12 exit_syscall: stream.packet.context = { 0 }, > stream.event.context = { 1, 943, "whoopsie", 943, 109 }, event.fields = 8 > -n payload > [11:02:08.064705355] edge-vb-u12 exit_syscall: { 0 }, { 1, 943, "whoopsie", > 943, 109 }, { ret = 8 } > -n none > [11:02:08.064705355] edge-vb-u12 exit_syscall: { 0 }, { 1, 943, "whoopsie", > 943, 109 }, 8 > -n all > timestamp = 11:02:08.064705355, trace:hostname = edge-vb-u12, name = > exit_syscall, stream.packet.context = { cpu_id = 0 }, stream.event.context = > { ppid = 1, tid = 943, procname = "whoopsie", pid = 943, perf_major_faults = > 109 }, event.fields = { ret = 8 } > > Now compare just the payload part: > > -n scope > event.fields = 8 > -n payload > { ret = 8 } > -n none > 8 > -n all > event.fields = { ret = 8 } > > It turns out the payload is bracketed by {} except when it has size zero or > one and its contents are unlabelled. Indeed, with an empty payload I can get > a trailing "{ }" or "" (that is to say, the record ends with a comma) > depending on the labelling. However, notice that for the > stream.packet.context this does not happen, maybe because the underlying > structure has actually six fields instead of the lone one normally shown (you > can get all six printed using --verbose): > > -n scope > stream.packet.context = { 0 }, > -n payload > { 0 }, > -n none > { 0 }, > -n all > stream.packet.context = { cpu_id = 0 }, > -v > { timestamp_begin = 4196192044293, timestamp_end = 4196224429641, > content_size = 2096768, packet_size = 2097152, events_discarded = 0, cpu_id = > 0 }, > > This variability could make babeltrace's text output more difficult to parse > than necessary, since one would have to handle the occasionally-disappearing > curly brackets. > > Is this worth filing a bug over?
Yes, thanks, Mathieu > > Daniel U. Thibault > R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D > Canada - Valcartier (DRDC Valcartier) > Cyber sécurité pour les missions essentielles (CME) / Mission Critical Cyber > Security (MCCS) > Protection des systèmes et contremesures (PSC) / Systems Protection & > Countermeasures (SPC) > 2459 route de la Bravoure > Québec, QC G3J 1X5 > CANADA > Vox : (418) 844-4000 x4245 > Fax : (418) 844-4538 > NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ> > Gouvernement du Canada / Government of Canada > <http://www.valcartier.drdc-rddc.gc.ca/> > > _______________________________________________ > lttng-dev mailing list > lttng-dev@lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev