403 Forbidden


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

�
G��dc@s6ddlmZddlZddlZddlmZyddlmZWn!ek
roddlmZnXejj	ej
dd�ejj	d�ddlTddlTddl
Tid	d
6Zd�Zdd2d
��YZdd3d��YZdd4d��YZdd5d��YZdd6d��YZdd7d��YZdd8d��YZdd9d��YZdefd��YZdd:d��YZd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd&�Z d'�Z!d(�Z"d)�Z#d*�Z$d+�Z%d,�Z&d-�Z'd.�Z(d/�Z)d0�Z*d1�Z+dS(;i����(tprint_functionN(tdefaultdict(tUserListtPERF_EXEC_PATHs./scripts/python/Perf-Trace-Util/lib/Perf/Traces-scripts/python/Perf-Trace-Util/lib/Perf/Trace(t*tidleicCsdt||fS(Ns%s:%d(tthreads(tpid((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytthread_name#stRunqueueEventUnknowncBs eZed��Zd�ZRS(cCsdS(N(tNone(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytcolor'scCsdS(Ntunknown((tself((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt__repr__+s(t__name__t
__module__tstaticmethodRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR	&stRunqueueEventSleepcBs)eZed��Zd�Zd�ZRS(cCsdS(Nii�(iii�((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR/scCs
||_dS(N(tsleeper(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt__init__3scCsdt|j�S(Ns%s gone to sleep(RR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR6s(RRRRRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR.s	tRunqueueEventWakeupcBs)eZed��Zd�Zd�ZRS(cCsdS(Ni�i(i�i�i((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR:scCs
||_dS(N(twakee(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR>scCsdt|j�S(Ns
%s woke up(RR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRAs(RRRRRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR9s	tRunqueueEventForkcBs)eZed��Zd�Zd�ZRS(cCsdS(Nii�(ii�i((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyREscCs
||_dS(N(tchild(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRIscCsdt|j�S(Nsnew forked task %s(RR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRLs(RRRRRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRDs	tRunqueueMigrateIncBs)eZed��Zd�Zd�ZRS(cCsdS(Nii�i�(ii�i�((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRPscCs
||_dS(N(tnew(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRTscCsdt|j�S(Nstask migrated in %s(RR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRWs(RRRRRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyROs	tRunqueueMigrateOutcBs)eZed��Zd�Zd�ZRS(cCsdS(Ni�i(i�ii�((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR[scCs
||_dS(N(told(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR_scCsdt|j�S(Nstask migrated out %s(RR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRbs(RRRRRR(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRZs	tRunqueueSnapshotcBseeZdge�d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
icCst|�|_||_dS(N(ttuplettaskstevent(R
RR ((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRfscCs�t�}t|�dkr=||jkr=||jkr=|St|�dkr^t|�}nt|j�}||jkr�t|�dkr�|j|�q�n"t|�dkr�|j|�n||kr�|j|�nt||�S(NtR(R	t	taskStateRRtlisttremovetappendR(R
tprevt
prev_statetnextR t
next_tasks((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched_switchjs	!cCsN||jkr|Sg|jD]}||kr|^q}t|t|��S(N(RRR(R
RttaskR)((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytmigrate_out�s(cCs@||jkr||_|S|jt|g�}t||�S(N(RR RR(R
RR R)((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt__migrate_in�s
	cCs|j|t|��S(N(t_RunqueueSnapshot__migrate_inR(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt
migrate_in�scCs|j|t|��S(N(R.R(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytwake_up�scCs|j|t|��S(N(R.R(R
R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytwake_up_new�scCst|j�dS(sD Provide the number of tasks on the runqueue.
		    Don't count idlei(tlenR(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytload�scCs#|jj�}||j�7}|S(N(RRtorigin_tostring(R
tret((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR�s(RRR	RR*R,R.R/R0R1R3R(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRes							t	TimeSlicecBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsm||_||_||_g|_|dk	rQ|j|_|jj�|_ntt	�|_d|_dS(Ni(
tstartR&tendt
event_cpusR
t
total_loadtrqstcopyRR(R
R7R&((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR�s				cCs)|j�|j�}|j|7_dS(N(R3R:(R
told_rqtnew_rqtdiff((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt__update_total_load�scCso|jj|}|j|||�}||kr5dS||j|<|j||�|j|�|g|_dS(N(R&R;R*t_TimeSlice__update_total_loadR%R9(R
tts_listR&R'R(tcpuR=R>((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR*�s

c	Cs�||krdS|jj|}|j|�}||j|<|j||�|jj|}|j|�}||j|<|j||�|j|�||k	r�|jj|�n|jj|�dS(N(R&R;R,RAR/R%R9(	R
RBRtold_cputnew_cpuR=tout_rqR>tin_rq((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytmigrate�s


cCs�|jj|}|r(|j|�}n|j|�}||krGdS||j|<|j||�|j|�|g|_dS(N(R&R;R1R0RAR%R9(R
RBRRCtforkR=R>((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR0�s

cCs||_t||�S(N(R8R6(R
tt((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR(�s	(RRRRAR*RHR0R((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR6�s	
				t
TimeSliceListcBs\eZgd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	cCs
||_dS(N(tdata(R
targ((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR�scCsJt|j�dkr0t|tdd��}n|jdj|�}|S(Nii����(R2RLR6R
R((R
ttstslice((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytget_time_slice�scCs�d}t|j�}d}t}x�|r�||ksF||dkrOt}n||d}|j|j|kr�|j|j|kr�|}|}q$n|j|j|kr�|}q$|j|j|kr$|}q$q$W|S(Nii����ii(R2RLtTruetFalseR7R8(R
RNR7R8tfoundt	searchingti((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytfind_time_slice�s"		,	
cCs
||_dS(N(troot_win(R
twin((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytset_root_winscCs�|j|�}|dkrdS||}|j|}d|}|d|jj�7}|d|jd|jd
df7}|d|j|jd7}|d
|j�7}x%|jD]}|dt|�7}q�W|j	j
|�dS(Ni����sCPU: %d
sLast event : %s
sTimestamp : %d.%06d
i
i	i�sDuration : %6d us
is
Load = %d
s%s 
iʚ;iʚ;i@B(RVR;R RR7R8R3RRRWtupdate_summary(R
RCRJtidxRNtrqtraw((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt
mouse_downs


&cCs�|j|}|jdkr8|j�t|j�}nd}tdd|�}d||f}d}||jkr�|jj�}n|j	j
||||j|j�dS(Nii�(
R;R:R3tfloattintR
R9R RRWtpaint_rectangle_zoneR7R8(R
RORCR\t	load_ratet	red_powerRt	top_color((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytupdate_rectangle_cpus
cCs�|j|�}|dkrdSxdt|t|j��D]J}|j|}|j|kr^dSx!|jD]}|j||�qhWq8WdS(Ni����(RVtrangeR2RLR7R;Re(R
R7R8RUt	timesliceRC((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt	fill_zone.s
cCs7t|j�dkrdS|jdj|jdjfS(Nii����(ii(R2RLR7R8(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytinterval;scCs@|jd}d}x&|jD]}||kr|}qqW|S(Ni����i(RLR;(R
tlast_tstmax_cpuRC((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt
nr_rectanglesAs

(RRRRPRVRYR^ReRhRiRl(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRK�s						
	tSchedEventProxycBs,eZd�Zd�Zd�Zd�ZRS(cCs"td��|_t�|_dS(NcSsdS(Ni����((((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt<lambda>Ls(Rtcurrent_tskRKt
timeslices(R
((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRKsc	Cs�|j|j}	|	dkrQ|	|krQtd|j�|j||||�n|t|<|t|<||j|j<|jj|j��}
|
j|j||||j�dS(sn Ensure the task we sched out this cpu is really the one
		    we logged. Otherwise we may have missed traces i����sDSched switch event rejected ts: %s cpu: %d prev: %s(%d) next: %s(%d)N(	RoRCtprintt	ts_formatRRpRPRNR*(R
theaderst	prev_commtprev_pidt	prev_prioR't	next_commtnext_pidt	next_prioton_cpu_taskRN((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR*Os#

cCs5|jj|j��}|j|j|||�dS(N(RpRPRNRH(R
RsRtpriotorig_cputdest_cpuRN((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRHascCsE|dkrdS|jj|j��}|j|j|||�dS(Ni(RpRPRNR0(R
RstcommRtsuccesst
target_cpuRIRN((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyR0es(RRRR*RHR0(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyRmJs			cCs
t�adS(N(Rmtparser(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyttrace_beginlscCs5tjt�}tj}t|d�}|j�dS(Nt	Migration(twxtAppRRR�Rpt	RootFrametMainLoop(tappRptframe((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt	trace_endps	cCsdS(N((t
event_nametcontextt
common_cputcommon_secstcommon_nsecst
common_pidtcommon_commtcommon_callchainR~Rtruntimetvruntime((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_stat_runtimevscCsdS(N((R�R�R�R�R�R�R�R�R~Rtdelay((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_stat_iowait{scCsdS(N((R�R�R�R�R�R�R�R�R~RR�((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_stat_sleep�scCsdS(N((R�R�R�R�R�R�R�R�R~RR�((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_stat_wait�scCsdS(N((R�R�R�R�R�R�R�R�tparent_commt
parent_pidt
child_commt	child_pid((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_process_fork�scCsdS(N((R�R�R�R�R�R�R�R�R~RR{((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_process_wait�scCsdS(N((R�R�R�R�R�R�R�R�R~RR{((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_process_exit�scCsdS(N((R�R�R�R�R�R�R�R�R~RR{((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_process_free�sc
Cs8t||||||�}
tj|
|	|
||�dS(N(tEventHeadersR�RH(R�R�R�R�R�R�R�R�R~RR{R|R}Rs((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_migrate_task�sc	CsAt||||||�}tj|||	|
|||
|�dS(N(R�R�R*(R�R�R�R�R�R�R�R�RtRuRvR'RwRxRyRs((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_switch�sc
Cs;t||||||�}
tj|
||	||d�dS(Ni(R�R�R0(R�R�R�R�R�R�R�R�R~RR{RR�Rs((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_wakeup_new�sc
Cs;t||||||�}
tj|
||	||d�dS(Ni(R�R�R0(R�R�R�R�R�R�R�R�R~RR{RR�Rs((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_wakeup�scCsdS(N((R�R�R�R�R�R�R�R�R~RR{((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_wait_task�sc		CsdS(N((	R�R�R�R�R�R�R�R�R5((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_kthread_stop_ret�sc

CsdS(N((
R�R�R�R�R�R�R�R�R~R((s8/usr/libexec/perf-core/scripts/python/sched-migration.pytsched__sched_kthread_stop�scCsdS(N((R�R�tevent_fields_dict((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyttrace_unhandled�s((((((((((,t
__future__RtostsystcollectionsRRtImportErrortpathR%tenvirontperf_trace_contexttCoretSchedGuiRRR	RRRRRRR6RKRmR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s8/usr/libexec/perf-core/scripts/python/sched-migration.pyt<module>sV




	>Cd"												
					

404 Not Found
[ LogOut ]