[Python-Dev] cProfile and threads (original) (raw)
Daniel Stutzbach daniel at stutzbachenterprises.com
Tue Aug 17 20:31:48 CEST 2010
- Previous message: [Python-Dev] cProfile and threads
- Next message: [Python-Dev] Python 2.6.6 release candidate 2 now available.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2010/8/17 Kristján Valur Jónsson <kristjan at ccpgames.com>
These patches are the result of work that we have done in profiling Stackless Python server applications at runtime, but they apply just as well to C Python.
The first patch makes lsprof, the engine behind cProfile, multi-stack aware. This allows the same cProfiler.Profile() instance to be active on multiple python threads and still meaningful information is gathered.
+1
The second patch allows to set the trace/profile function in python * globally*, so that all threads are affected. This is essential if you want to take a profililng snapshot of a running application.
+1
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100817/97d91090/attachment.html>
- Previous message: [Python-Dev] cProfile and threads
- Next message: [Python-Dev] Python 2.6.6 release candidate 2 now available.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]