[pypy-dev] JIT not kicking in for callbacks

Eleytherios Stamatogiannakis estama at gmail.com
Mon Mar 31 20:28:55 CEST 2014


I'm not sure, but i think that the JIT doesn't kick in when the loops 
are "external", where C-code does the loop and calls Python code for 
each iteration, through CFFI callbacks. In our code, we have SQLite, 
calling Python code through callbacks.

Using the loop log:

PYPYLOG=log pypy mterm.py

i see this summary:

interpret                                           91%
gc-collect-step                                     4%
gc-minor                                            3%
jit-optimize                                        0%
gc-minor-walkroots                                  0%
jit-tracing                                         0%
jit-backend                                         0%
jit-log-compiling-bridge                            0%
jit-resume                                          0%
jit-backend-dump                                    0%
gc-set-nursery-size                                 0%
jit-log-virtualstate                                0%
jit-backend-addr                                    0%
gc-hardware                                         0%
jit-log-noopt-loop                                  0%
jit-mem-looptoken-alloc                             0%
jit-log-opt-bridge                                  0%
jit-log-rewritten-loop                              0%
jit-log-rewritten-bridge                            0%
jit-log-compiling-loop                              0%
jit-log-opt-loop                                    0%
jit-log-short-preamble                              0%
jit-abort                                           0%
jit-mem-collect                                     0%
jit-summary                                         0%
jit-backend-counts                                  0%

If i read that correctly, most of the execution time is in the 
interpreter and not in the JITed code. Is there some way where i can 
"hint" to pypy that a callback is essentially the inside of a loop, so 
PyPy can JIT it?.

I've attached the simple log from which above summary has been produced via:

python logparser.py print-summary log.log -



-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.log.gz
Type: application/gzip
Size: 282249 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20140331/9b4ef09a/attachment-0001.bin>

More information about the pypy-dev mailing list