Re: Format of funcgraph_{entry, exit} ftrace event

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


On Tue, 9 Aug 2022 13:32:04 +0000
Matteo Bertolino <matteo.bertolino@xxxxxxxxxx> wrote:

> While writing a `trace.dat`, I know that all the entries have an header, described by the Linux ringbuffer format (file `header_event`):
> # compressed entry header
> 	type_len    :    5 bits
> 	time_delta  :   27 bits
> 	array       :   32 bits
> 	padding     : type == 29
> 	time_extend : type == 30
> 	time_stamp : type == 31
> 	data max type_len  == 28
> Such header includes a timestamp (that can be a delta of the timestamp present in the `header_page`).
> I have one question for the ftrace's community:
> Why are the following fields of a `funcgraph_exit` entry useful? ` calltime` and ` rettime`. 
> They look like redundant for me, because the timing information is already present on the `header_event`. 

The function graph infrastructure records the calltime and rettime and
that can be used by other users than the tracer. That is, the users are
not guaranteed to have timestamps of their own. Yes it is redundant for
the tracing, but it is also a way to test to make sure the timings
being recorded are accurate for the other use cases.

-- Steve

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

  Powered by Linux