Support cProfile module
Daetalus opened this issue · comments
Currently Pyston didn't support cProfile module. And PyThreadState
missed some important fields which needs by support cProfile module.
Unfortunately this feature runs deeper than just being fields on the PyThreadState -- we need to update our execution tiers to call the profiling functions when they are set. We might be able to get away with only supporting this in the interpreter+bjit (skipping the LLVM tier). Another complication is that we turned off the ability to deopt from anywhere in the llvm jit, so if someone adds a profiling function and then we come back to LLVM code we won't be able to deopt to recompile with profiling calls added. But I'm not sure if cProfile is typically used this way (when I've used it it has always been to profile subsequent calls), so we might be able to get away with it.
Anyway, we should definitely try to add cProfile support but it might take some creativity :)