403 Forbidden


Disable Functions:
Path : /usr/libexec/perf-core/scripts/python/
File Upload :
Command :
Current File : //usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyc

�
G��dc@s�ddlZddlZddlZddlZddlZejjejdd�ddlTddl	Tej
d�Zde_
d�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�ZdS(i����NtPERF_EXEC_PATHs./scripts/python/Perf-Trace-Util/lib/Perf/Trace(t*s/dev/shm/perf.dbcCs#dGHtjd�tjd�dS(NsIn trace_begin:
s�
                create table if not exists gen_events (
                        name text,
                        symbol text,
                        comm text,
                        dso text
                );s�
                create table if not exists pebs_ll (
                        name text,
                        symbol text,
                        comm text,
                        dso text,
                        flags integer,
                        ip integer,
                        status integer,
                        dse integer,
                        dla integer,
                        lat integer
                );(tcontexecute(((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyttrace_begin's
c	Cs�|d}|d}|d}|d}|d}|jd�rN|d}nd}|jd�rp|d}nd	}t|||||�}t|�dS(
Ntattrtsampletraw_buftcommtev_nametdsotUnknown_dsotsymboltUnknown_symbol(thas_keytcreate_eventt	insert_db(	t
param_dictt
event_attrRRRtnameR
Rtevent((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyt
process_eventGs






cCs�|jtkr:tjd|j|j|j|jf�n||jtkr�|j	dM_	|j
dM_
tjd|j|j|j|j|j|j	|j|j
|j
|jf
�ndS(Ns)insert into gen_events values(?, ?, ?, ?)I�������s9insert into pebs_ll values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)(tev_typetEVTYPE_GENERICRRRRRR
tEVTYPE_PEBS_LLtiptdlatflagststatustdsetlat(R((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyR]s	"	cCs!dGHt�t�tj�dS(NsIn trace_end:
(tshow_general_eventstshow_pebs_llRtclose(((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyt	trace_endhscCs$dttj|d�d�}|S(Nt#ii(tinttmathtlog(tnumtsnum((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pytnum2symts cCsatjd�}x/|D]'}d|dGH|ddkrdSqWdGHtjd�}dddd	d
dfGHx2|D]*}d|d|d
t|d
�fGHquWdddd	d
dfGHtjd�}x2|D]*}d|d|d
t|d
�fGHq�Wdddd	d
dfGHtjd�}x2|D]*}d|d|d
t|d
�fGHq/WdS(Nsselect count(*) from gen_eventss'There is %d records in gen_events tableisCStatistics about the general events grouped by thread/symbol/dso: 
sLselect comm, count(comm) from gen_events group by comm order by -count(comm)s
%16s %8s %16s
%sRtnumbert	histogramt=i*s%16s %8d     %sis
%32s %8s %16s
%sRi:sTselect symbol, count(symbol) from gen_events group by symbol order by -count(symbol)s%32s %8d     %ss
%40s %8s %16s
%sR
iJsHselect dso, count(dso) from gen_events group by dso order by -count(dso)s%40s %8d     %s(RRR)(tcounttttcommqtrowtsymbolqtdsoq((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyRys$


(
(
cCs�tjd�}x/|D]'}d|dGH|ddkrdSqWdGHtjd�}dddd	d
dfGHx2|D]*}d|d|d
t|d
�fGHquWdddd	d
dfGHtjd�}x2|D]*}d|d|d
t|d
�fGHq�Wtjd�}dddd	d
dfGHx2|D]*}d|d|d
t|d
�fGHq/Wtjd�}dddd	d
dfGHx2|D]*}d|d|d
t|d
�fGHq�WdS(Nsselect count(*) from pebs_lls$There is %d records in pebs_ll tableisUStatistics about the PEBS Load Latency events grouped by thread/symbol/dse/latency: 
sIselect comm, count(comm) from pebs_ll group by comm order by -count(comm)s
%16s %8s %16s
%sRR*R+R,i*s%16s %8d     %sis
%32s %8s %16s
%sRi:sQselect symbol, count(symbol) from pebs_ll group by symbol order by -count(symbol)s%32s %8d     %ssEselect dse, count(dse) from pebs_ll group by dse order by -count(dse)Rs=select lat, count(lat) from pebs_ll group by lat order by lattlatency(RRR)(R-R.R/R0R1tdseqtlatq((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyR �s,


(
(
(
cCsGdjgt|j��D]"\}}d|t|�f^q�GHdS(Nt s%s=%s(tjointsortedtitemststr(t
event_nametcontexttevent_fields_dicttktv((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyttrace_unhandled�s(tostsysR%tstructtsqlite3tpathtappendtenvirontperf_trace_contextt
EventClasstconnectRtNonetisolation_levelRRRR"R)RR R@(((s?/usr/libexec/perf-core/scripts/python/event_analyzing_sample.pyt<module>s$

		 					"	"

404 Not Found
[ LogOut ]