@@ -85,26 +85,19 @@ of ftrace. Here is a list of some of the key files:
8585 This file holds the output of the trace in a human
8686 readable format (described below).
8787
88- latency_trace:
89-
90- This file shows the same trace but the information
91- is organized more to display possible latencies
92- in the system (described below).
93-
9488 trace_pipe:
9589
9690 The output is the same as the "trace" file but this
9791 file is meant to be streamed with live tracing.
98- Reads from this file will block until new data
99- is retrieved. Unlike the "trace" and "latency_trace"
100- files, this file is a consumer. This means reading
101- from this file causes sequential reads to display
102- more current data. Once data is read from this
103- file, it is consumed, and will not be read
104- again with a sequential read. The "trace" and
105- "latency_trace" files are static, and if the
106- tracer is not adding more data, they will display
107- the same information every time they are read.
92+ Reads from this file will block until new data is
93+ retrieved. Unlike the "trace" file, this file is a
94+ consumer. This means reading from this file causes
95+ sequential reads to display more current data. Once
96+ data is read from this file, it is consumed, and
97+ will not be read again with a sequential read. The
98+ "trace" file is static, and if the tracer is not
99+ adding more data,they will display the same
100+ information every time they are read.
108101
109102 trace_options:
110103
@@ -117,10 +110,10 @@ of ftrace. Here is a list of some of the key files:
117110 Some of the tracers record the max latency.
118111 For example, the time interrupts are disabled.
119112 This time is saved in this file. The max trace
120- will also be stored, and displayed by either
121- "trace" or "latency_trace". A new max trace will
122- only be recorded if the latency is greater than
123- the value in this file. (in microseconds)
113+ will also be stored, and displayed by "trace".
114+ A new max trace will only be recorded if the
115+ latency is greater than the value in this
116+ file. (in microseconds)
124117
125118 buffer_size_kb:
126119
@@ -210,7 +203,7 @@ Here is the list of current tracers that may be configured.
210203 the trace with the longest max latency.
211204 See tracing_max_latency. When a new max is recorded,
212205 it replaces the old trace. It is best to view this
213- trace via the latency_trace file .
206+ trace with the latency-format option enabled .
214207
215208 "preemptoff"
216209
@@ -307,8 +300,8 @@ the lowest priority thread (pid 0).
307300Latency trace format
308301--------------------
309302
310- For traces that display latency times , the latency_trace file
311- gives somewhat more information to see why a latency happened.
303+ When the latency-format option is enabled , the trace file gives
304+ somewhat more information to see why a latency happened.
312305Here is a typical trace.
313306
314307# tracer: irqsoff
@@ -380,9 +373,10 @@ explains which is which.
380373
381374The above is mostly meaningful for kernel developers.
382375
383- time: This differs from the trace file output. The trace file output
384- includes an absolute timestamp. The timestamp used by the
385- latency_trace file is relative to the start of the trace.
376+ time: When the latency-format option is enabled, the trace file
377+ output includes a timestamp relative to the start of the
378+ trace. This differs from the output when latency-format
379+ is disabled, which includes an absolute timestamp.
386380
387381 delay: This is just to help catch your eye a bit better. And
388382 needs to be fixed to be only relative to the same CPU.
@@ -440,7 +434,8 @@ Here are the available options:
440434 sym-addr:
441435 bash-4000 [01] 1477.606694: simple_strtoul <c0339346>
442436
443- verbose - This deals with the latency_trace file.
437+ verbose - This deals with the trace file when the
438+ latency-format option is enabled.
444439
445440 bash 4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \
446441 (+0.000ms): simple_strtoul (strict_strtoul)
@@ -472,7 +467,7 @@ Here are the available options:
472467 the app is no longer running
473468
474469 The lookup is performed when you read
475- trace,trace_pipe,latency_trace . Example:
470+ trace,trace_pipe. Example:
476471
477472 a.out-1623 [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
478473x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
@@ -481,6 +476,11 @@ x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
481476 every scheduling event. Will add overhead if
482477 there's a lot of tasks running at once.
483478
479+ latency-format - This option changes the trace. When
480+ it is enabled, the trace displays
481+ additional information about the
482+ latencies, as described in "Latency
483+ trace format".
484484
485485sched_switch
486486------------
@@ -596,12 +596,13 @@ To reset the maximum, echo 0 into tracing_max_latency. Here is
596596an example:
597597
598598 # echo irqsoff > current_tracer
599+ # echo latency-format > trace_options
599600 # echo 0 > tracing_max_latency
600601 # echo 1 > tracing_enabled
601602 # ls -ltr
602603 [...]
603604 # echo 0 > tracing_enabled
604- # cat latency_trace
605+ # cat trace
605606# tracer: irqsoff
606607#
607608irqsoff latency trace v1.1.5 on 2.6.26
@@ -703,12 +704,13 @@ which preemption was disabled. The control of preemptoff tracer
703704is much like the irqsoff tracer.
704705
705706 # echo preemptoff > current_tracer
707+ # echo latency-format > trace_options
706708 # echo 0 > tracing_max_latency
707709 # echo 1 > tracing_enabled
708710 # ls -ltr
709711 [...]
710712 # echo 0 > tracing_enabled
711- # cat latency_trace
713+ # cat trace
712714# tracer: preemptoff
713715#
714716preemptoff latency trace v1.1.5 on 2.6.26-rc8
@@ -850,12 +852,13 @@ Again, using this trace is much like the irqsoff and preemptoff
850852tracers.
851853
852854 # echo preemptirqsoff > current_tracer
855+ # echo latency-format > trace_options
853856 # echo 0 > tracing_max_latency
854857 # echo 1 > tracing_enabled
855858 # ls -ltr
856859 [...]
857860 # echo 0 > tracing_enabled
858- # cat latency_trace
861+ # cat trace
859862# tracer: preemptirqsoff
860863#
861864preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
@@ -1012,11 +1015,12 @@ Instead of performing an 'ls', we will run 'sleep 1' under
10121015'chrt' which changes the priority of the task.
10131016
10141017 # echo wakeup > current_tracer
1018+ # echo latency-format > trace_options
10151019 # echo 0 > tracing_max_latency
10161020 # echo 1 > tracing_enabled
10171021 # chrt -f 5 sleep 1
10181022 # echo 0 > tracing_enabled
1019- # cat latency_trace
1023+ # cat trace
10201024# tracer: wakeup
10211025#
10221026wakeup latency trace v1.1.5 on 2.6.26-rc8
0 commit comments