|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/src/kernels/3.10.0-1160.90.1.el7.x86_64/scripts/tracing/ |
Upload File : |
�
{dc @ 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( ( sN /usr/src/kernels/3.10.0-1160.90.1.el7.x86_64/scripts/tracing/draw_functrace.pyt __init__# s c C s&