Re: make TGID available also in binary ring buffer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 4 Mar 2019 11:01:39 +0100
Claudio <claudio.fontana@xxxxxxxxx> wrote:

> Hello all,
> 
> I am currently facing the issue of having to efficiently read the events
> from a user-space application for tracing for programmatic use in automotive
> (AUTOSAR AP).
> 
> It is for programmatically reacting to events on the system,
> and I am currently using the trace_pipe_raw to do that, to reduce the
> overhead compared with parsing the textual output of trace_pipe.
> 
> After merging the sorted streams from all cpus, in order to reconstruct
> the task state, we are still way more CPU-efficient compared with using the
> textual output.
> 
> I would like to make use of the implemented support for recording tgids,
> 
> commit d914ba37d714 ("tracing: Add support for recording tgid of tasks")
> commit 441dae8f2f29 ("tracing: Add support for display of tgid in trace output")
> 
> but it seems to me that, while for COMM recording there is explicit support in
> the binary events for the information, it seems that tgid is not stored in the
> binary format.
> 
> Is such an extension of the binary format a possibility for sched-class
> events, that takes into account backward compatibility, or is there some
> better way to do it? Is this problem addressed by libtracevent / trace-cmd?
> 
> Currently I was thinking to look into the NETLINK interface to get the task
> information, however the issue is the race condition between the time of
> tracing and the time of reading the trace, to be fully correct, but if
> nothing else is possible I will have to accept the compromise.
> 
> Thank you for any hints on this.

It looks to be outputted into /sys/kernel/debug/tracing/saved_tgids

Interesting, we should probably save that in trace-cmd as well.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux