Re: [pypy-dev] int_py_mod_nonnegargs(): one arg is negative LLAssertFailure

2016-12-09 Thread Armin Rigo
Hi, On 9 December 2016 at 02:00, Shubha Ramani via pypy-dev wrote: > Why am I getting this error ? > pidigits.py runs fine outside of the pytest environment. I'm getting: from rpython.jit.metainterp.test.support import LLJitMixin,X86JitMixin E ImportError: cannot import name X86JitMixin

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

2016-12-09 Thread Richard Plangger
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 The output of the last

Re: [pypy-dev] int_py_mod_nonnegargs(): one arg is negative LLAssertFailure

2016-12-09 Thread Shubha Ramani via pypy-dev
Interesting. Thank You ! > On Dec 9, 2016, at 12:45 AM, Armin Rigo wrote: > > Hi, > > On 9 December 2016 at 02:00, Shubha Ramani via pypy-dev > wrote: >> Why am I getting this error ? >> pidigits.py runs fine outside of the pytest environment. > > I'm getting: > >from rpython.jit.metain

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

2016-12-09 Thread Shubha Ramani via pypy-dev
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 Ram

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

2016-12-09 Thread Richard Plangger
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

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

2016-12-09 Thread Shubha Ramani via pypy-dev
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

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

2016-12-09 Thread Shubha Ramani via pypy-dev
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 wrote:

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

2016-12-09 Thread Yury V. Zaytsev
On Fri, 9 Dec 2016, Richard Plangger 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 w

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

2016-12-09 Thread Shubha Ramani via pypy-dev
Hi Yury. You're right that is close to what I want. Just reading that link, it seems that no specialinstrumentation needs to be added to the Python code in order for any old python code out in the wild tobe able to dump JIT compiler logs. JIT Compiler Logs — vmprof 0.3 documentation | |

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

2016-12-09 Thread Yury V. Zaytsev
On Fri, 9 Dec 2016, Shubha Ramani via pypy-dev 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.

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

2016-12-09 Thread Shubha Ramani via pypy-dev
Yury: I am no longer confused about that. But so far, in order to be able to dump jitcodes, I have to instrument python code with"JitDriver", "merge_point", "meta_interp", etc...under the test directory - and  the resulting toy python program I write in order to get the jit dump HAS TO BE rpytho

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

2016-12-09 Thread Richard Plangger
Hi, you previously wrote: > I'm building a tool which attempts to map Jit ByteCodes back to the actual function which was called at the Python level. jitlog does already do that. If you call your program this way: (env) $ pip install vmprof (env) $ pypy -m jitlog --web yourbenchmark.py you can

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

2016-12-09 Thread Armin Rigo
Hi, On 9 December 2016 at 15:55, Shubha Ramani via pypy-dev wrote: > I am no longer confused about that. I think the rest of your mail shows there is still confusion. > But so far, in order to be able to dump > jitcodes, I have to instrument python code with > "JitDriver", "merge_point", "meta_

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

2016-12-09 Thread Shubha Ramani via pypy-dev
Armin you articulated exactly what I want. Please tell me the right place to look then ? Shubha Sent from Shubha Ramani's iPhone 7 > On Dec 9, 2016, at 8:29 AM, Armin Rigo wrote: > > Hi, > > On 9 December 2016 at 15:55, Shubha Ramani via pypy-dev > wrote: >> I am no longer confused about t

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

2016-12-09 Thread Shubha Ramani via pypy-dev
I assume it's backend/x86? Why is what I'm doing a waste of time though ? Sent from Shubha Ramani's iPhone 7 > On Dec 9, 2016, at 9:34 AM, Shubha Ramani via pypy-dev > wrote: > > Armin you articulated exactly what I want. Please tell me the right place to > look then ? > > Shubha > > Sent

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

2016-12-09 Thread Shubha Ramani via pypy-dev
I guess I shouldn't be in metainterp at all. But where do I capture OPTIMIZED JIT ? just before it gets converted to ASM but after it's beenoptimized ? In this youtube video: How the PyPy JIT works  I see the guy pull up "JitViewer" and easily see optimized JIT, assembly and source codeline by l