[pypy-dev] how do you parse jit log containing binary dump ?

Shubha Ramani shubharamani at yahoo.com
Fri Dec 9 09:44:06 EST 2016


I guess to write this tool, I don't need to actually "dump jit bytecodes" though. I can "dump jit bytecodes" whileI'm writing and debugging my tool. Once I figure out how it works, I just add hooks into the pypy source code base. 

    On Friday, December 9, 2016 6:40 AM, Shubha Ramani <shubharamani at yahoo.com> wrote:
 

 I'm building a tool which attempts to map Jit ByteCodes back to the actual function which was called at the Python level.Therefore I need to map the Jit ByteCodes back to the actual function address - the physical address not the virtual.It seems like to build this tool I have to get the rpython version of the open source benchmark - which is not an easy task.I would like to take any old Python application out in the wild and instrument it to dump jitcodes using rpython as an interpreter. Is this possible ? 

    On Friday, December 9, 2016 6:29 AM, Richard Plangger <planrichi at gmail.com> wrote:
 

 Jitlog is data generated by the JIT compiler. Without a jitdriver, it
will not be able to JIT compile any code, thus you cannot obtain that
file. If you do not have a rpython program, you cannot really generate
the jitlog easily.

I'm unsure what you want to achieve, if you give me more information
what you mean by 'run some open source benchmark' or 'I don't want to
add JItdriver'?

Cheers,
Richard

On 12/09/2016 02:43 PM, Shubha Ramani wrote:
> Is there a way to get Jitlog WITHOUT running it under test and calling metainterp functions ? What if I just want to run some open source benchmark ? What if I don't want to add JItdriver and merge_point to the code and run it "as is" non rpython - can I still dump jitlog ?
> 
> Sent from Shubha Ramani's iPhone 7
> 
>> On Dec 9, 2016, at 1:19 AM, Richard Plangger <planrichi at gmail.com> wrote:
>>
>> Hi,
>>
>> the jit log currently is only functional with the vmprof platform.
>> There was this idea of a command line tool to inspect, but it is not yet
>> finished.
>>
>> Unsure if the test generated file can be uploaded, but you can try:
>>
>> $ pip install vmprof
>> $ python -m jitlog --upload <your-file-file-name>
>>
>> The output of the last program will upload the logfile to vmprof.com and
>> you can inspect it by clicking on the link it prints at the end.
>>
>> Try the following to get a log out of pypy for your program:
>>
>> (pypy-env) $ pip install vmprof
>> (pypy-env) $ pypy -m vmprof --jitlog yourpythonprogram.py
>>
>> Cheers,
>> Richard
>>
>>> On 12/09/2016 02:03 AM, Shubha Ramani via pypy-dev wrote:
>>> I successfully created a file containing binary data, but don't know
>>> what to do with it.
>>> I produced it using
>>> test /opt/pypy/rpython/jit/backend/x86/test/test_jitlog.py
>>>
>>>
>>> _______________________________________________
>>> pypy-dev mailing list
>>> pypy-dev at python.org
>>> https://mail.python.org/mailman/listinfo/pypy-dev
>>>
>>
> 


   

   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20161209/99344eff/attachment-0001.html>


More information about the pypy-dev mailing list