| Server IP : 118.27.122.248 / Your IP : 216.73.216.158 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/ |
Upload File : |
3
x2_W � @ s� d Z ddlZddlZddlZddlZddlZeed�s>ed��ej� Z ej
� add� Zdd� Z
d d
� Zdd� Zd
d� Zdd� Zddd�ZdS )a
Some helper functions to analyze the output of sys.getdxp() (which is
only available if Python was built with -DDYNAMIC_EXECUTION_PROFILE).
These will tell you which opcodes have been executed most frequently
in the current process, and, if Python was also built with -DDXPAIRS,
will tell you which instruction _pairs_ were executed most frequently,
which may help in choosing new instructions.
If Python was built without -DDYNAMIC_EXECUTION_PROFILE, importing
this module will raise a RuntimeError.
If you're running a script you want to profile, a simple way to get
the common pairs is:
$ PYTHONPATH=$PYTHONPATH:<python_srcdir>/Tools/scripts ./python -i -O the_script.py --args
...
> from analyze_dxp import *
> s = render_common_pairs()
> open('/tmp/some_file', 'w').write(s)
� N�getdxpzKCan't import analyze_dxp: Python built without -DDYNAMIC_EXECUTION_PROFILE.c C s t | �dkot| d t�S )z[Returns True if the Python that produced the argument profile
was built with -DDXPAIRS.r )�len�
isinstance�list)�profile� r �>/opt/alt/python36/lib64/python3.6/Tools/scripts/analyze_dxp.py� has_pairs'