Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-08 Thread Francis Giraldeau
/python-profile-ust This is of course very experimental, requires a special setup, an I don't even know if it's going to produce good results. I'll report the results in the coming weeks. Cheers, Francis Giraldeau ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-06 Thread Francis Giraldeau
2015-02-06 6:04 GMT-05:00 Armin Rigo ar...@tunes.org: Hi, On 6 February 2015 at 08:24, Maciej Fijalkowski fij...@gmail.com wrote: I don't think it's safe to assume f_code is properly filled by the time you might read it, depending a bit where you find the frame object. Are you sure it's

[Python-Dev] Encoding of PyFrameObject members

2015-02-05 Thread Francis Giraldeau
I need to access frame members from within a signal handler for tracing purpose. My first attempt to access co_filename was like this (omitting error checking): PyFrameObject *frame = PyEval_GetFrame(); PyObject *ob = PyUnicode_AsUTF8String(frame-f_code-co_filename) char *str =

[Python-Dev] LTTng-UST support for CPython

2014-12-01 Thread Francis Giraldeau
Here is a working prototype for CPython to record all function call/return using LTTng-UST, a fast tracer. https://github.com/giraldeau/python-profile-ust However, there are few issues and questions: - I was not able to get PyTrace_EXCEPTION using raise or other error conditions. How can we

Re: [Python-Dev] Support for Linux perf

2014-11-23 Thread Francis Giraldeau
2014-11-22 7:44 GMT-05:00 Julian Taylor jtaylor.deb...@googlemail.com: On 17.11.2014 23:09, Francis Giraldeau wrote: Hi, ... The PEP-418 is about performance counters, but there is no mention o Anyway, I think we must change CPython to support tools such as perf. Any thoughts

Re: [Python-Dev] Static checker for common Python programming errors

2014-11-17 Thread Francis Giraldeau
If I may, there are prior work on JavaScript that may be worth investigating. Formal verification of dynamically typed software is a challenging endeavour, but it is very valuable to avoid errors at runtime, providing benefits from strongly type language without the rigidity.

[Python-Dev] Support for Linux perf

2014-11-17 Thread Francis Giraldeau
Hi, The PEP-418 is about performance counters, but there is no mention of performance management unit (PMU) counters, such as cache misses and instruction counts. The Linux perf tool aims at recording these samples at the system level. I ran linux perf on CPython for profiling. The resulting