[pypy-dev] Is there similar PyEval_EvalFrameEx() function in PyPy?

Maciej Fijalkowski fijall at gmail.com
Tue May 26 12:32:58 CEST 2015


you will kill the JIT performance terribly if you do that. space.call
or space.call_function (in pypy/objspace/std/objspace or
pypy/interpreter/baseobjspace) are your candidates

On Tue, May 26, 2015 at 12:31 PM, Yicong Huang <hengha.mao at gmail.com> wrote:
> Yes, we are trying to modify PyPy to meet the need.
> Our plans are:
> 1. Find a similar function as "PyEval_EvalFrameEx()" in PyPy, and add a
> function logFunction() inside it.
> 2. In logFunction(), analyze the frame/callstack. If it is a function call
> from "Class A" to external function, log the function call. If it is
> possible, we might only need to log the same function call only once to
> minimize the perfomrance overhead.
>
> The problem is we've no ideas on which function in PyPy is similar to
> "PyEval_EvalFrameEx()" in Python.
> Or do you have any alternative good ideas to do this?
>
> On Tue, May 26, 2015 at 6:01 PM, Amaury Forgeot d'Arc <amauryfa at gmail.com>
> wrote:
>>
>> Did you consider the trace module?
>>
>> https://docs.python.org/2/library/trace.html
>>
>> 2015-05-26 11:45 GMT+02:00 Yicong Huang <hengha.mao at gmail.com>:
>>>
>>> We would like to monitor and log all external function calls from a
>>> class: when there the function call happen, we capture and log the frame.
>>>
>>> In python, there is the function PyEval_EvalFrameEx() we might add a
>>> callback inside.
>>> Is there a similar function in PyPy that would be called when the
>>> function call happens?
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> pypy-dev mailing list
>>> pypy-dev at python.org
>>> https://mail.python.org/mailman/listinfo/pypy-dev
>>>
>>
>>
>>
>> --
>> Amaury Forgeot d'Arc
>
>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>


More information about the pypy-dev mailing list