//usr/lib64/lib64//lib64//python2.7/ó
àœSec @ s¾ d Z d d l Z d d l Z d d l Z d d l Z d d l Z e e d ƒ s` e d ƒ ‚ n e j ƒ Z e j
ƒ a d „ Z d „ Z
d „ Z d „ Z d „ Z d
„ Z d d „ Z d S( s
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:/Tools/scripts ./python -i -O the_script.py --args
...
> from analyze_dxp import *
> s = render_common_pairs()
> open('/tmp/some_file', 'w').write(s)
iÿÿÿÿNt getdxpsK Can't import analyze_dxp: Python built without -DDYNAMIC_EXECUTION_PROFILE.c C s# t | ƒ d k o" t | d t ƒ S( s[ Returns True if the Python that produced the argument profile
was built with -DDXPAIRS.i ( t lent
isinstancet list( t profile( ( s1 /usr/lib64/python2.7/Tools/scripts/analyze_dxp.pyt has_pairs( s c C s' t t j ƒ t j ƒ a Wd QXd S( s<