First of all let me say that all I've done for the past several days is read, read read.I have read the rpython and pypy documentation. I've read bolz-tracing-jit-final.pdf as well as antocuni-phd-thesis.pdf. I also feel that I comprehended most of what I read. In studying the vmprof implementation there is still a gap in my comprehension. How do I get access to PyFrame within assembly.py ? VmProf dumps everything into a specially formatted binary file, embedded with variousmarkers and the function code objects among many other stuff, per PyFrame which gets executed. This file later gets post-processed by the vmprof tool. Suppose I do something similar to vmprof in order to obtain access to function code objects, i.e. see below. But how do I get access to PyFrame in the x86 backend code at run time ? _get_code = lambda frame, w_inputvalue, operr: frame.pycode _decorator = rvmprof.vmprof_execute_code("pypy", _get_code, W_Root) my_execute_frame = _decorator(PyFrame.execute_frame) class __extend__(PyFrame): def execute_frame(self, w_inputvalue=None, operr=None): # indirection for the optional arguments return my_execute_frame(self, w_inputvalue, operr)