403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/profiling/sampling/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/profiling/sampling/__pycache__/stack_collector.cpython-315.pyc
R
>lqj�zc���]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]QH(Gs]QH0G
s
Gs]QH<Gs]QHDGs]QHLGsGsQQ\
2sQQ	\2sQ
Q\2sQQ
\2sP!)�)�get_combined_css)�	Collector�extract_lineno)�get_opcode_mapping)�StringTable)�extract_module_name�get_python_path_infoc�H`�\sQs]snP	sQP
-QksQQksQQksQsUs	P!)�StackTraceCollector�	skip_idlec� �VmV mP!�N��sample_interval_usecr)�selfrrs&&$�7C:\Python315\\Lib\profiling\sampling\stack_collector.py�__init__�StackTraceCollector.__init__s
��$8�!�"��c��U%c[U2L]oUOVOQ5FDvqEUOVEUQ5J	P!)��r)�weight)�len�_iter_stacksr�process_frames)r�stack_frames�
timestamps_usr�frames�	thread_ids&&&   r�collect�StackTraceCollector.collectsC��'4��]�#�!��!%�!2�!2�<�>�>�!2�!Z��F�����&��A�"[rc��P!r
�)rrrrs&&&&rr�"StackTraceCollector.process_framess��rrr
�r)
�__name__�
__module__�__qualname__�__firstlineno__�aggregatingrr r�__static_attributes__�__classdictcell__)�
__classdict__s@rr
r
s&�����K�#�%�#�B�

�
rr
c�D``�\sQs]"snU1QksQQksQsQsUsU9s	!)�CollapsedStackCollectorc�`:�[RU_U-U@[O2UmP!r
)�superr�collections�Counter�
stack_counter�r�args�kwargs�	__class__s&*,�rr� CollapsedStackCollector.__init__#s&���
���$�)�&�)�(�0�0�2��rc���[9PIc,Q[U22DMJ	3LQ[U222oUOVB199*U*
tt$P!)c3�r�SF �D(p]*[U]*2U]*1w�	J*	P!3h)r)r)�.0�fs& r�	<genexpr>�9CollapsedStackCollector.process_frames.<locals>.<genexpr>*s)��8H���8H�1�q�T�>�!�A�$�'��1��.�8H�s�07)�tuple�reversedr4)rrrr�	call_trees&&&& rr�&CollapsedStackCollector.process_frames'sS���E�
�8@��8H�
�E�E�
�8@��8H�
�
�	�	
���I�1�2�f�<�2rc
�@�,oUOO2FD�vvq4oQU0,oSFDOvqxo	UQ6XcU]6XcS	o
L'[OO	U2QU	QU0o
UOU
2JQ	QO
U2oUOV�12J�	UOQQ5[UQ29^tt^2oSFDvq�UOU
QUQ02J	PPP2[Q	U02P	!)%fhK 9h)
ztid:�~�:�;c�*�U]*'U]*1!r%r#��xs&r�<lambda>�0CollapsedStackCollector.export.<locals>.<lambda>=s��1�Q�4�%��1��r��key�w� �
z"Collapsed stack output written to )r4�items�os�path�basename�append�join�sort�open�write�print)r�filename�linesrBr�count�parts�file�line�func�part�	stack_strr=�stacks&&            r�export�CollapsedStackCollector.export/s����-1�-?�-?�-E�-E�-G�)�"�Y�E��I�;�'�(�E�$-� ��D��3�;�4�1�9��D� �g�g�.�.�t�4�5�Q�t�f�A�d�V�D�D����T�"�
%.������I��L�L�)�+�,�.H�	�
�
�.�
�/�
�(�C�
 �
 �A� %������5�'��5�'��,�-�!&�!�	�2�8�*�=�>��	!�
 �s�$D
�
D	�D	)r4r%)
r&r'r(r)rrrfr+r,�
__classcell__�r8r-s@@rr/r/"s����3�=��rr/c��``�\sQs]FsnU1QksQU1QkksQQksQs\\	OPQ5Q22s\\	OPQ5Q22sQs
Q	sQQ
ksQsQsQ
sUsU9s!)�FlamegraphCollectorc�:�[RU_U-U@-UmQ]Q-Q[2-Um]Um]Um-Um[2Um	-Um
[2UmQ]Q]Q]Q]Q]Q]-Um]Um
-UmP!)	�samples�children�threads�has_gil�on_cpu�
gil_requested�unknown�
has_exception�total)r1r�stats�set�_root�_total_samples�
_sample_count�_func_internr�
_string_table�
_module_cache�_all_threads�thread_status_counts�samples_with_gc_frames�per_thread_statsr5s&*,�rr�FlamegraphCollector.__init__Gs����
���$�)�&�)���
���J��I�s�u�E��
����������(�]�������E���
�q��a��Q��q��Q��Q�
%
��!�'(��#�!#��rc�t:�U%c[U2L]oU9OU*
tmUOU2vqEoSFD/oUOU99*VG*U**
tt$J1	U%cU9OU*
tmUO2FDxvq�V�O7cQ]Q]Q]Q]Q]Q]Q]-UOU$U	O2FD1vqzUOU*U99*V�**
tt$J3	Jz	[RU_!V2P!)zDOverride to track thread status statistics before processing frames.rprqrrrsrtru�
gc_samples)	rrz�_collect_thread_status_statsrr�rRr�r1r )rrrr�
status_counts�has_gc_framer�rNrrv�valuer8s&&&        �rr �FlamegraphCollector.collect`s���(5��]�#�!��	
���f�$��9=�8Y�8Y�Zf�8g�5�
�%5�!�C��%�%�c�*�m�.@�6�.I�I�*�!���'�'�6�1�'�!1� 6� 6� 8��I�� 5� 5�5��q��a�#�Q��q�#�Q��Q� �!�4��%�%�i�0�$�k�k�m�
���%�%�i�0��5���G�5�,�!9�	����4rc�.�QUQUQUQUQUQU-UmP!)z7Set profiling statistics to include in flamegraph data.r�duration_sec�sample_rate�
error_rate�missed_samples�mode)rv)rrr�r�r�r�r�s&&&&&&&r�	set_stats�FlamegraphCollector.set_stats�s,��
#�$8��L��;��*��n��D�

��
rc��UO2o[UOQ,22oUOQ]2o[UO2oU]6XcPLQoU]6XcPLQoU]6XcPLQo[	QUQUQUQUQUQU02U]6Xc[	Q2P
!UOU2o	[
UQ	Q
Q59^tt^2o
U
OU	2PPP2[	QU02P	!)%fhK 9h)
rnr��szFlamegraph data: z root functionz, z
 total samplez unique stringzSWarning: No functions found in profiling data. Check if sampling captured any data.rO�utf-8��encodingzFlamegraph saved to: )�_convert_to_flamegraph_formatr�getr|r[�_create_flamegraph_htmlrYrZ)rr\�flamegraph_data�
num_functions�
total_time�string_count�s1�s2�s3�html_contentr=s&&         rrf�FlamegraphCollector.export�s���<�<�>���O�/�/�
�B�?�@�
�$�(�(��!�4�
��4�-�-�.�� �A�%�R�3����?�R����1�$�R�#��
��
��n�R�D���l�-��t�2��n�N�2�$�
0�	
��A���e�
���3�3�O�D��
�(�C�'�
2�
2�a�
�G�G�L�!�3�	�%�h�Z�0�1��	3�
2�s�
C7�7D	�D	)�maxsizec���UvqoUQ6Xc
U]6XcU![U2]26�c9UOQ2o[U2]6�cQQOUQP20oUQUQUQ0!)rE�/z.../� (rF�)���)r�splitrW)rbr\�lineno�funcnamer_s&    r�_format_function_name�)FlamegraphCollector._format_function_name�s|��&*�"��(��s�?�v��{��O��x�=�2���N�N�3�'�E��5�z�A�~�!�#�(�(�5���:�"6�!7�8����2�h�Z�q����2�2rc�D�Uvq#oUQ6Xc
U]6XcU!UQUQUQ0!)rEr�rFr�r#)rb�module_namer\r�r�s&&   r�_format_module_name�'FlamegraphCollector._format_module_name�s;��&*�"��(��s�?�v��{��O���2�k�]�!�F�8�1�5�5rc�|�UOOU2oUe[V2vq4V0OU$U!r
)r}r�r)rr\�	path_infor��_s&&&  r�_get_module_name�$FlamegraphCollector._get_module_name�s>���(�(�,�,�X�6����0��E�N�K�+6���x�(��rc�J``�RO]6Xc>QROOQ2Q]Q,Q,QROO2-!UU1QknROo[	][UQ*22o[
2oRROQ*V#2oU%f<QROOQ	2Q]Q,QROO2-![[OQ
22o[	]ROQ*2oQROQ
*U*]d*QROQ*U*]d*QROQ*U*]d*QROQ*U*]d*QRO[	]RO2*]d*QU-ROAo-o[	]RO2o	ROO2FD�vq�[	]UQ*2oQUQ
*U*]d*QUQ*U*]d*QUQ*U*]d*QUQ*U*]d*QUQ*U	*]d*-UAV�$J�	[!2o
[#U2]6Xc�U]*oROO%UQ*2oROOQU02UQ$ROO%UQ*2oROOQU02UQ$-RO&AQUQU-AUQ$[)[+RO,22UQ$ROO2UQ$V�Q$U!ROOQ2oQUQUQUQUQ-RO&AQUQU-AQ[)[+RO,22QROO2QU
-!)r�namezNo Datar�rnro�stringsc�:�,oUO2FCD�vqEUQ*oVa6cJROOU]*2oROOU]*2oROU]*U2o	ROOU	2o
ROORO	U22oROOROVI22oQUQUQUQUO
Q]2Q,QUQU
QU]*Q	UQ
[[UO
Q
[2222-
o
ROU2oU%c1STt,tFDoROOU2MJ 	ooUU
Q$UO
Q-2oU%c[U2U
Q$RUQ*V2U
Q$UOU
2CJ�	UOQ
Q5U!ttoh)rmr��labelr�rrnr\�moduler�r�ro�source�opcodesc�*�UQ*'UQ*1!)r�r�r#rIs&rrK�]FlamegraphCollector._convert_to_flamegraph_format.<locals>.convert_children.<locals>.<lambda>
s��Q�w�Z�K��6��#;rrM)rRr|�internr�r�r�r��sorted�listrw�_get_source_lines�dictrVrX)rn�min_samplesr��outrb�noderm�filename_idx�funcname_idxr��
module_idx�name_idx�	label_idx�child_entryr�ra�source_indicesr��convert_childrenrs&&&               ��rr��KFlamegraphCollector._convert_to_flamegraph_format.<locals>.convert_children�s�����C�&�n�n�.�.�
���y�/���(�� $�1�1�8�8��a��A��#�1�1�8�8��a��A��"�3�3�D��G�Y�G��!�/�/�6�6�{�C�
��-�-�4�4�T�5O�5O�PT�5U�V�� �.�.�5�5�d�6N�6N�t�6a�b�	��H��Y��W��D�H�H�V�Q�/������j��d�1�g����v�d�4�8�8�I�s�u�+E�&F�G����/�/��5���RX�%Y�RX�$�d�&8�&8�&?�&?��&E�RX�N�%Y�,:�K��)��(�(�9�b�1���-1�'�]�K�	�*�+;���$�k�+��J�'��
�
�;�'�U/�Z
�H�H�;�H�<��J��!&Zs�,&G?g����MbP?zNo significant data�Py_GIL_DISABLEDru�has_gil_pctrp�
on_cpu_pctrq�gil_requested_pctrr�has_exception_pctrt�gc_pct�
free_threadedr�zProgram Root: r��thread_statsr�rv�opcode_mappingzProgram Root)ryr|r��get_strings�max�intrrx�bool�	sysconfig�get_config_varrr�rzr�rRrr�
get_stringrvr�r�r~)r�
total_samplesr�r��
root_children�is_free_threaded�
total_threadsr��per_thread_stats_with_pct�total_samples_denominatorrrvrur��
main_child�old_name�	old_label�program_root_idxr�sf                 @rr��1FlamegraphCollector._convert_to_flamegraph_format�s������!�#���*�*�1�1�)�<����B��2��4�-�-�9�9�;��
�0	�f�+�+�
��!�S���!6�7�8��(�*�	�(����J�)?��X�
����*�*�1�1�2G�H����B��4�-�-�9�9�;�	�
� �	� 8� 8�9J� K�L���A�t�8�8��A�B�
��D�5�5�i�@�=�P�TW�W��4�4�4�X�>��N�RU�U��$�";�";�O�"L�}�"\�`c�!c��$�";�";�O�"L�}�"\�`c�!c��t�2�2�S��D�<N�<N�5O�O�SV�V��-�

��'�'�
��%'�!�$'��4�+=�+=�$>�!� $� 5� 5� ;� ;� =��I���5��>�*�E���i� 0�5� 8�C�?��u�X���6�#�=�#�e�O�&<�u�&D��%K�#�e�O�&<�u�&D��%K��5��.�1J�J�c�Q�4��
4�%�0�!>�,�-���}���"�&�q�)�J��)�)�4�4�Z��5G�H�H�!%�!3�!3�!:�!:�^�H�:�;V�!W�J�v���*�*�5�5�j��6I�J�I�"&�"4�"4�";�";�n�Y�K�<X�"Y�J�w��#��*�*�#���"�$=�#�J�w��
%+�4��0A�0A�+B�$C�J�y�!�$(�$6�$6�$B�$B�$D�J�y�!�+9�'�(����-�-�4�4�^�D���$��%��]��
����*�*����"�$=��

�v�d�4�#4�#4�5�6��t�)�)�5�5�7��n�

�
	
rc��UOQ99*U*
tt$U9OU*
tmUOQ*OU2UOOU2UOo[	U2FD�vqVqx[U2o	VYU1o
UOOV�2o
UQ*OU
2oUe3Q]Q-Q[2Q[O2Q]-oV�Q*U
$UQ99*U*
tt$UQ*OU2UdUQ*U99*U*
tt$SoJ�	V@OIcUQ99*U*
tt$P!P!)aProcess stack frames into flamegraph tree structure.

Args:
    frames: List of (filename, location, funcname, opcode) tuples in
            leaf-to-root order. location is (lineno, end_lineno, col_offset, end_col_offset).
            opcode is None if not gathered.
    thread_id: Thread ID for this stack trace
    weight: Number of samples this stack represents (for batched RLE)
rmrornr�r)rxry�addr~rArr{�
setdefaultr�rwr2r3)rrrr�currentr\�locationr��opcoder�rbr�s&&&&        rr�"FlamegraphCollector.process_frames[sI��	
�
�
�9���'�����v�%���
�
�9��!�!�)�,������i�(��*�*��4<�V�4D�0�H��#�H�-�F��h�/�D��$�$�/�/��;�D��:�&�*�*�4�0�D��|�!�1�j�"�i���	�S^�Sf�Sf�Sh�jp�rs�t��,0�
�#�D�)���O�v�%�O���O���	�*��!��Y���'�6�1�'��G�5E�"�*�*�$��F�O�v�%�O�%rc	�j�Uvq#o,o[]U]*
2oU]*o[Vg2FDao[OV(2o	U	O	2%fJ1V�6XcQLQo
UOU
UQU	O
202Jc	U%cU!P![cP!h9h)ru→ z  z: )r��range�	linecache�getline�striprV�rstrip�	Exception)rrbr\r�r�r]�
start_line�end_line�line_numra�markers&&         rr��%FlamegraphCollector._get_source_lines�s���"���!�	��E��Q���
�+�J���z�H�!�*�7�� �(�(��<���:�:�<�<�'/�'9�V�t�F��L�L�F�8�H�:�R����
��!G�H�	8�"�5�+�t�+���	��	�s0�AB#�#B#�)5B#�B#�!B#�#	B2�-B2�1B2c��[OU2o[OO	[
2oUQ*oUQ*oUQ*Q*Q*oUQ*Q*oUQ*oUQ*o	UQ	*o
UQ
*Q*O
QQ
5o[Q2oUQ*Q*O
QQ
5o
UQ
*Q*O
QQ
5oU
QU0oUOQ-2OQP
2oU%cQoQoLQoQoUOQU2oUOQU2oUOQQUQ02oUOQQUQ 02oUQ!*o[OUO22OQ"2oQ#UQ$0oUOQ%U2oUOQ&[OO Q'[OO"02oUO
QQ
5oUO
QQ
5oU	O
QQ
5oU
O
QQ
5oUOQ(QUQ 02oUOQ)QUQ02oUOQ*QUQ 02oUOQ+QUQ 02oUOQ,U2oU!)-�_vendor�_assets�d3z7.8.5z	d3.min.jszd3-flame-graphz4.1.3zd3-flamegraph.csszd3-flamegraph.min.jszd3-flamegraph-tooltip.min.js�_flamegraph_assetszflamegraph_template.htmlr�r��
flamegraph�_shared_assetszbase.jsz
flamegraph.jsrQrv�is_differentialz1Tachyon Profiler - Differential Flamegraph ReportzDifferential Flamegraph Reportz$Tachyon Profiler - Flamegraph ReportzFlamegraph Reportz	{{TITLE}}z{{SUBTITLE}}z<!-- INLINE_CSS -->z<style>
z	
</style>z<!-- INLINE_JS -->z	<script>
z

</script>ztachyon-logo.png�asciiz <img src="data:image/png;base64,z" alt="Tachyon logo"/>z<!-- INLINE_LOGO -->z<!-- PYTHON_VERSION -->�.z<!-- INLINE_VENDOR_D3_JS -->z%<!-- INLINE_VENDOR_FLAMEGRAPH_CSS -->z$<!-- INLINE_VENDOR_FLAMEGRAPH_JS -->z,<!-- INLINE_VENDOR_FLAMEGRAPH_TOOLTIP_JS -->z{{FLAMEGRAPH_DATA}})�json�dumps�	importlib�	resources�files�__package__�	read_textrr��replace�base64�	b64encode�
read_bytes�decode�sys�version_info�major�minor)r�data�	data_json�template_dir�
vendor_dir�
assets_dir�d3_path�d3_flame_graph_dir�fg_css_path�
fg_js_path�fg_tooltip_js_path�
html_template�css_content�base_js�component_js�
js_contentr�title�subtitle�png_path�b64_logo�	logo_html�d3_js�fg_css�fg_js�
fg_tooltip_jsr�s&&                         rr��+FlamegraphCollector._create_flamegraph_html�s���J�J�t�$�	� �*�*�0�0��=��!�I�-�
�!�I�-�
��t�#�g�-��;��'�+;�;�g�E��(�+>�>��'�*@�@�
�/�2P�P��%�(<�<�?Y�Y�d�d�nu�d�v�
�&�|�4���"2�2�Y�>�I�I�SZ�I�[��$�';�;�o�M�X�X�bi�X�j���y��<�.�1�
��(�(�7�B�/�3�3�4E�u�M���G�E�7�H�:�E�*�H�%�-�-�k�5�A�
�%�-�-�n�h�G�
�&�-�-�!�Y�{�m�:�#F�
�
�&�-�-� �J�z�l�+�"F�
�
�� 2�2���#�#�H�$7�$7�$9�:�A�A�'�J��7�x�j�@V�W�	�%�-�-�.D�i�P�
�%�-�-�%�#�*:�*:�*@�*@�)A��3�CS�CS�CY�CY�BZ�'[�
�
��!�!�7�!�3���&�&��&�8���$�$�g�$�6��*�4�4�g�4�F�
�%�-�-�*����{�+�
�
�&�-�-�3���x�z�*�
�
�&�-�-�2����{�+�
�
�&�-�-�:����{�3�
�
�%�,�,�!�9�
���r)r~r{r}rxrzr|ryr�r�rvrr
)NNNr%)r&r'r(r)rr r�rf�staticmethod�	functools�	lru_cacher�r�r�r�rr�r�r+r,rhris@@rrkrkFs�����#�2#5�J

��<�����&�3�'��3������&�6�'��6��H
�T#&�J�&L�Lrrkc�``�\sQsQsnQsQP
-U1QkksQsQQksU1QksQs	Q	s
Q
sQsQs
Q
sQsQsQsUsU9s!)�DiffFlamegraphCollector��zRDifferential flamegraph collector that compares against a baseline binary profile.rc��:�[RU_VQ5[OO	U2%f[QU02gV mPUm[2Um	P!)rzBaseline file not found: )
r1rrSrT�exists�
ValueError�baseline_binary_path�_baseline_collectorrw�
_elided_paths)rrr<rr8s&&$$�rr� DiffFlamegraphCollector.__init__�sU���
���-��C��w�w�~�~�2�3�3��8�9M�8N�O�P�P�$8�!�#'�� � �U��rc��]QHGoUUO29^tt^2oUO2o[	UQ*UO
Q5oUO
U2PPP2WUmP!)%fhK9h)z'Load baseline profile from binary file.)�BinaryReader�sample_interval_usr)�
binary_readerrAr<�get_inforkr�replay_samplesr=)rrA�reader�info�baseline_collectors&    r�_load_baseline�&DiffFlamegraphCollector._load_baseline�sh��/�
�$�3�3�
4�
4���?�?�$�D�!4�%)�*>�%?��.�.�"��

�!�!�"4�5�5�$6�� �5�
4�s�AA3�3B	�<B	c	�D�UeQo-oUQ*O2FD�vqEUvqgoVh1o	V)1*o
UOQ]2oUOQ]2oV�7c8V:*Q99*U*
tt$V:*Q99*U*
tt$LQUQU-V:$UOVZ2o
U
O2FDUvq�V�7cGV>*Q99*UQ**
tt$V>*Q99*UQ**
tt$JQV�U$JW	J�	U!)zSAggregate samples by stack path, excluding line numbers for cross-profile matching.rnrmrrur#)rRr��_aggregate_path_samples)r�	root_noderTrvrbr�r\�_linenor��func_key�path_keyr��self_samples�child_statsrNrs&&&             rrL�/DiffFlamegraphCollector._aggregate_path_samples�s���<��D���#�J�/�5�5�7�J�D�*.�'�H�x� �+�H��k�)�H� �H�H�Y��2�M��8�8�F�A�.�L�� ����(�M�9�(����'�<�7�'��]��L�#���
�6�6�t�F�K�(�.�.�0�	���<��J�w�'�4��=�8�'��J�v�&�$�v�,�6�&�!%�#�J�1�%8�2�rc�l:�UOeUO2[RU_
2oUO	UO
2oUO	UOO
2oUOOoU]6�cTUO]6�cCUOUO*oV@OO*oVV*oL1U]6�c)UOUOO*oLQoUOVV72UOVV72U!)z;Convert to flamegraph format with differential annotations.g�?)
r=rIr1r�rLrxryr�_annotate_nodes_with_diff�_add_elided_flamegraph)	r�current_flamegraph�
current_stats�baseline_stats�baseline_total�current_time�
baseline_time�scaler8s	&       �rr��5DiffFlamegraphCollector._convert_to_flamegraph_formats����#�#�+����!�"�W�B�D���4�4�T�Z�Z�@�
��5�5�d�6N�6N�6T�6T�U���1�1�@�@���A��$�"5�"5��"9��.�.��1J�1J�J�L�*�-E�-E�-Z�-Z�Z�M� �0�E�
�a�
��-�-��0H�0H�0]�0]�]�E��E��&�&�'9�.�`��#�#�$6�~�]�!�!rc	�^�QU7c-UQ$UOOUQ*Q$UOUQ*Q$VAQ*Q$P	UQ*Q$UOU2%cUOUQV#U2P!UQ*FDoUOUQV#U2J	P!)z2Annotate each node in the tree with diff metadata.rv�baseline_samples�current_samples�baseline_scalerrnr#)r=ry�_is_promoted_root�_add_diff_data_to_node)rrWrXrYr]�childs&&&&& rrU�1DiffFlamegraphCollector._annotate_nodes_with_diff;s����,�,�*,��w�'�:>�:R�:R�:a�:a��7�#�$6�7�9=�9L�9L��7�#�$5�6�8=�7�#�$4�5�9=��7�#�$5�6��!�!�"4�5�5��'�'�(:�B�
�_d�e�+�J�7�7���+�+�E�2�}�V[�\�8rc	��UOVO2oU%c
V&1*LSoUOUQ]Q]-2oUOUQ]Q]-2o	UQ*o
U	Q*U*oU	Q*U*oV�*
o
U]6�cV�*Q*oLU
]6�cQoLQoV�Q$V�Q$V�Q$V�Q$V�Q	$Q
U7c8UQ
*%c'UQ
*FDoUOV�V4U2J	P!P!P!)z'Recursively add diff metadata to nodes.rurgY@��baselinerZ�	self_time�diff�diff_pctrn)�_extract_func_keyr|r�rd)rr�rTrXrYr]rOrP�current_data�
baseline_data�current_self�
baseline_selfrZrkrlres&&&&&&          rrd�.DiffFlamegraphCollector._add_diff_data_to_nodeKs���)�)�$�0B�0B�C��)1�4�+�%�t��$�(�(��G�Q���3J�K��&�*�*�8�g�q�&�!�5L�M�
�#�F�+��%�f�-��5�
�&�w�/�%�7���+���1���,��5�H�
�A�
��H��H�(�Z��!/�
��(�[���V��#�Z�����$�z�"2�"2��j�)�)���+�+�E�]�\a�b�*�#3�rc�(�QU79%cQU7!)z2Check if the data represents a promoted root node.r\r�r#)rrs&&rrc�)DiffFlamegraphCollector._is_promoted_rootis���T�!�8�8�j�D�&8�8rc��UO2UO2*
Um[UO2UQ*Q$UO%c)UOV42oU%cVQQ*Q$P!P!P!)z:Calculate elided paths and add elided flamegraph to stats.rv�elided_count�elided_flamegraph)�keysr>r�_build_elided_flamegraph)rrWrXrYr]rws&&&&& rrV�.DiffFlamegraphCollector._add_elided_flamegraphmst��+�0�0�2�]�5G�5G�5I�I���69�$�:L�:L�6M��7�#�N�3����� $� =� =�n� T�� �CT�7�+�,?�@�!�rc�x�UO%cUO%fP!UOOoQUOmUOO2oV0OmUO	UQQ5%fP!UOVAUQQ5QFD2oVPO7fJUOU*UQ*U$J4	P	UQ*Q$UOOUQ*Q$UOUQ*Q$U!X0Omh9h)	z�Build flamegraph containing only elided paths from baseline.

This re-runs the base conversion pipeline on the baseline collector
to produce a complete formatted flamegraph, then prunes it to keep
only elided paths.
c��P!r
r#)rbs&rrK�BDiffFlamegraphCollector._build_elided_flamegraph.<locals>.<lambda>�s��$r)rTrvrr`rar#)rr�r�r�r�r�)r=r>r�r��_extract_elided_nodes�_add_elided_metadatarvry)rrYr]�orig_get_sourcerorNs&&&   rry�0DiffFlamegraphCollector._build_elided_flamegraphxs���'�'�'�t�/A�/A�/A��
�2�2�D�D��5F�� � �2�	I� �4�4�R�R�T�M�9H�$�$�6��)�)�-�b�)�A�A���!�!�-��R�!�P�<�C��j�j� �.2�j�j��o�
�g�&�s�+�<�59�
�g��0�1�59�5M�5M�5\�5\�
�g��1�2�48�4G�4G�
�g��0�1����#:I�$�$�6�s�D'�'D9c���U%fP
!UOVOO2oU%c
V#1*LSoU%cV@O7LP
oQU7cp,o]oUQ*FDEoUO	V�2%fJUOU2VxO
Q]2*
oJG	VaQ$U%c
U%fVqQ$S9%f[UO
Q22!)z9Remove non-elided nodes and recalculate values bottom-up.rnr�)rmr=r|r>r~rVr�r�)	rr�rTrO�current_path�	is_elided�elided_children�total_valueres	&&&      rr~�-DiffFlamegraphCollector._extract_elided_nodes�s������)�)�$�0H�0H�0V�0V�W��-5�t�k�)�4��:B�L�$6�$6�6��	���� �O��K��j�)�)���-�-�e�B�B�#�*�*�5�1��9�9�W�a�#8�8�K�*� /����y� +�W�
��6�6�D����*�!5�6�6rc���U%fP!UOVOO2oU%c
VE1*LSo]o]oU%c>Vb7c8V&*o	U	Q*U*oU	Q*U*oVqQ$V�Q$U'UQ$L]UQ$]UQ$]UQ$]UQ$U]6�cQ
UQ$LQUQ$Q	U7c7UQ	*%c&UQ	*FDo
UOV�V62J	P!P!P!)z8Add differential metadata showing this path disappeared.rrurirZrkrjrlrhrngY�)rmr=r|r)rr�rYr]rTrOr�rqrZrores&&&&&      rr�,DiffFlamegraphCollector._add_elided_metadata�s�����)�)�$�0H�0H�0V�0V�W��-5�t�k�)�4���
�����6�*�8�M�)�&�1�E�9�M�*�7�3�e�;�N�,���%3�!�"�)�>�D��L� �D���%&�D�!�"��D��L���[��
�1��%�D���"�D������$�z�"2�"2��j�)�)���)�)�%��U�*�#3�rc��QU7fQU7cP!UOUQ*2oUOUQ*2oV41!)z�Extract (filename, funcname) key from node, excluding line numbers.

Line numbers are excluded to match functions even if they moved.
Returns None for root nodes that don't have function information.
r\r�)r�)rr��string_tabler\r�s&&&  rrm�)DiffFlamegraphCollector._extract_func_key�sI���T�!�Z�t�%;���*�*�4�
�+;�<���*�*�4�
�+;�<���#�#r)r=r>r<r
)r&r'r(r)�__doc__rrIrLr�rUrdrcrVryr~rrmr+r,rhris@@rr7r7�sX����\�#�PU�#�6�  �D"�8]� c�<9�	U�#�J7�8#V�J
$�
$rr7)rr2r4�importlib.resourcesrr
r�rSrr��
_css_utilsr�	collectorrr�opcode_utilsrr�r�module_utilsrrr
r/rkr7r#rr�<module>r�sh��
������	�
��(�0�,�%�C�

�)�

� !�1�!�HY�-�Y�xF$�1�F$r

Youez - 2016 - github.com/yon3zu
LinuXploit