MINI MINI MANI MO
ó
Ï>]c @ s‰ d Z d d l Z d d l Z d d d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z d
„ Z e d k r… e ƒ n d S(
sH
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call stack by drawing textual but hierarchical tree of
calls. Only the functions's names and the the call time are provided.
Usage:
Be sure that you have CONFIG_FUNCTION_TRACER
# mount -t debugfs nodev /sys/kernel/debug
# echo function > /sys/kernel/debug/tracing/current_tracer
$ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func
Wait some times but not too much, the script is a bit slow.
Break the pipe (Ctrl + Z)
$ scripts/draw_functrace.py < raw_trace_func > draw_functrace
Then you have your drawn trace in draw_functrace
iÿÿÿÿNt CallTreec B sG e Z d Z d Z d d d „ Z d „ Z d „ Z d „ Z d „ Z RS( sÕ This class provides a tree representation of the functions
call stack. If a function has no parent in the kernel (interrupt,
syscall, kernel thread...) then it is attached to a virtual parent
called ROOT.
c C sC | | _ | | _ | d k r- t j | _ n | | _ g | _ d S( N( t _funct _timet NoneR t ROOTt _parentt _children( t selft funct timet parent( ( sM /usr/src/kernels/3.10.0-957.21.3.el7.x86_64/scripts/tracing/draw_functrace.pyt __init__# s c C s&