diff options
| author | Changbin Du <changbin.du@gmail.com> | 2019-01-01 10:46:14 -0500 |
|---|---|---|
| committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-02-06 11:56:19 -0500 |
| commit | 88d380eb0668b7fe76834c1febef4165508098b6 (patch) | |
| tree | 33874077c4483cbb7bd676682a09c654f1db81dd | |
| parent | afbab501c66bece057bc30656f71f856cd1b3baa (diff) | |
tracing/doc: Add latency tracer funcgraph example
This add an example about how to use funcgraph with latency tracers.
Link: http://lkml.kernel.org/r/20190101154614.8887-6-changbin.du@gmail.com
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
| -rw-r--r-- | Documentation/trace/ftrace.rst | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index 0131df7f5968..6ce2763a2a3e 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst | |||
| @@ -1396,6 +1396,57 @@ enabling function tracing, we incur an added overhead. This | |||
| 1396 | overhead may extend the latency times. But nevertheless, this | 1396 | overhead may extend the latency times. But nevertheless, this |
| 1397 | trace has provided some very helpful debugging information. | 1397 | trace has provided some very helpful debugging information. |
| 1398 | 1398 | ||
| 1399 | If we prefer function graph output instead of function, we can set | ||
| 1400 | display-graph option:: | ||
| 1401 | with echo 1 > options/display-graph | ||
| 1402 | |||
| 1403 | # tracer: irqsoff | ||
| 1404 | # | ||
| 1405 | # irqsoff latency trace v1.1.5 on 4.20.0-rc6+ | ||
| 1406 | # -------------------------------------------------------------------- | ||
| 1407 | # latency: 3751 us, #274/274, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4) | ||
| 1408 | # ----------------- | ||
| 1409 | # | task: bash-1507 (uid:0 nice:0 policy:0 rt_prio:0) | ||
| 1410 | # ----------------- | ||
| 1411 | # => started at: free_debug_processing | ||
| 1412 | # => ended at: return_to_handler | ||
| 1413 | # | ||
| 1414 | # | ||
| 1415 | # _-----=> irqs-off | ||
| 1416 | # / _----=> need-resched | ||
| 1417 | # | / _---=> hardirq/softirq | ||
| 1418 | # || / _--=> preempt-depth | ||
| 1419 | # ||| / | ||
| 1420 | # REL TIME CPU TASK/PID |||| DURATION FUNCTION CALLS | ||
| 1421 | # | | | | |||| | | | | | | | ||
| 1422 | 0 us | 0) bash-1507 | d... | 0.000 us | _raw_spin_lock_irqsave(); | ||
| 1423 | 0 us | 0) bash-1507 | d..1 | 0.378 us | do_raw_spin_trylock(); | ||
| 1424 | 1 us | 0) bash-1507 | d..2 | | set_track() { | ||
| 1425 | 2 us | 0) bash-1507 | d..2 | | save_stack_trace() { | ||
| 1426 | 2 us | 0) bash-1507 | d..2 | | __save_stack_trace() { | ||
| 1427 | 3 us | 0) bash-1507 | d..2 | | __unwind_start() { | ||
| 1428 | 3 us | 0) bash-1507 | d..2 | | get_stack_info() { | ||
| 1429 | 3 us | 0) bash-1507 | d..2 | 0.351 us | in_task_stack(); | ||
| 1430 | 4 us | 0) bash-1507 | d..2 | 1.107 us | } | ||
| 1431 | [...] | ||
| 1432 | 3750 us | 0) bash-1507 | d..1 | 0.516 us | do_raw_spin_unlock(); | ||
| 1433 | 3750 us | 0) bash-1507 | d..1 | 0.000 us | _raw_spin_unlock_irqrestore(); | ||
| 1434 | 3764 us | 0) bash-1507 | d..1 | 0.000 us | tracer_hardirqs_on(); | ||
| 1435 | bash-1507 0d..1 3792us : <stack trace> | ||
| 1436 | => free_debug_processing | ||
| 1437 | => __slab_free | ||
| 1438 | => kmem_cache_free | ||
| 1439 | => vm_area_free | ||
| 1440 | => remove_vma | ||
| 1441 | => exit_mmap | ||
| 1442 | => mmput | ||
| 1443 | => flush_old_exec | ||
| 1444 | => load_elf_binary | ||
| 1445 | => search_binary_handler | ||
| 1446 | => __do_execve_file.isra.32 | ||
| 1447 | => __x64_sys_execve | ||
| 1448 | => do_syscall_64 | ||
| 1449 | => entry_SYSCALL_64_after_hwframe | ||
| 1399 | 1450 | ||
| 1400 | preemptoff | 1451 | preemptoff |
| 1401 | ---------- | 1452 | ---------- |
