draw_functrace.py (4f2c0a4acffbec01079c28f839422e64ddeff004) draw_functrace.py (2455f0e124d317dd08d337a7550a78a224d4ba41)
1#!/usr/bin/env python
2# SPDX-License-Identifier: GPL-2.0-only
3
4"""
5Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
6
7This script parses a trace provided by the function tracer in
8kernel/trace/trace_functions.c
9The resulted trace is processed into a tree to produce a more human
10view of the call stack by drawing textual but hierarchical tree of
11calls. Only the functions's names and the call time are provided.
12
13Usage:
14 Be sure that you have CONFIG_FUNCTION_TRACER
1#!/usr/bin/env python
2# SPDX-License-Identifier: GPL-2.0-only
3
4"""
5Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
6
7This script parses a trace provided by the function tracer in
8kernel/trace/trace_functions.c
9The resulted trace is processed into a tree to produce a more human
10view of the call stack by drawing textual but hierarchical tree of
11calls. Only the functions's names and the call time are provided.
12
13Usage:
14 Be sure that you have CONFIG_FUNCTION_TRACER
15 # mount -t debugfs nodev /sys/kernel/debug
16 # echo function > /sys/kernel/debug/tracing/current_tracer
17 $ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func
15 # mount -t tracefs nodev /sys/kernel/tracing
16 # echo function > /sys/kernel/tracing/current_tracer
17 $ cat /sys/kernel/tracing/trace_pipe > ~/raw_trace_func
18 Wait some times but not too much, the script is a bit slow.
19 Break the pipe (Ctrl + Z)
20 $ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace
21 Then you have your drawn trace in draw_functrace
22"""
23
24
25import sys, re

--- 104 unchanged lines hidden ---
18 Wait some times but not too much, the script is a bit slow.
19 Break the pipe (Ctrl + Z)
20 $ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace
21 Then you have your drawn trace in draw_functrace
22"""
23
24
25import sys, re

--- 104 unchanged lines hidden ---