On the top of the .pyx file I've added:
# cython: linetrace=True
# distutils: define_macros=CYTHON_TRACE_NOGIL=1 CYTHON_TRACE=1
I've tried also putting macros in my setup file.
Then I'm running:
from mycythonmodule import func
profile = line_profiler.LineProfiler(func)
profile.runcall(func)
profile.print_stats()
It prints the file but no timing, nor number of call... The cython code is significantly slower, compared to without the tags on the top of the .pyx
When I'm using kernprof, .prof file is nearly empty.
Any idea ?