[Python-Dev] cProfile and threads

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Aug 17 12:46:11 CEST 2010



> -----Original Message-----
> From: python-dev-bounces+kristjan=ccpgames.com at python.org
> [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On
> Behalf Of Antoine Pitrou
> 
> Does that mean you're proposing code for inclusion in CPython that can only
> be tested with Stackless?
> Can't Stackless use its own patches instead?
> 
While this work originated with Stackless, I have gone through the trouble of porting it to
CPython, because it is relevant for CPython too.  Multiple "stacks" translates to multiple "threads"
in C Python.
 (Confusingly though, the _lsprof.c patch actually has a #ifdef STACKLESS that I forgot to remove.  Sorry about that)

> 
> I've often heard that cProfile didn't give correct profiling information with
> multiple threads. Is it true?
Yes, and that's the purpose of this submission:  To fix exactly that.


K


More information about the Python-Dev mailing list