[Python-Dev] DTRACE support

Xavier Morel python-dev at masklinn.net
Sat Sep 7 08:57:07 CEST 2013

On 2013-09-07, at 05:40 , Jesus Cea wrote:

> Hash: SHA1
> On 06/09/13 20:33, Antoine Pitrou wrote:
>> On Fri, 06 Sep 2013 18:14:26 +0200 Jesus Cea <jcea at jcea.es> wrote:
>>> It is intrusive. Yes. I think it must be, by its own nature.
>>> Probably room for improvement and code transparency. But... are
>>> Python-DEVs interested in the project?. That is the point :)
>> As a concrete data point: - here are Dave's modifications to
>> ceval.c for systemtap: 
>> http://bugs.python.org/review/14776/diff/5177/Python/ceval.c - here
>> are your modifications to ceval.c for dtrace: 
>> http://bugs.python.org/review/13405/diff/6151/Python/ceval.c
> Unfair, because that code is not doing the same thing.
> Most of the extra complexity is there to deal with DTRACE ability to
> provide meaningful stackframes, with Python code instead of CPython
> evaluation loop. This is kind of magical.

Antoine will correct me if I'm wrong, but I believe his point is less
about the complexity of dtrace provision and more about how much of it
lives in ceval.c: the systemtap provision also takes quite a bit of
code, but almost all of that code is extracted into a separate file and
only a pair of calls live in ceval.c

You patch, because it adds quite a bit of complexity to ceval.c, makes
reading it significantly more difficult (especially for people who don't
care for probe implementations). Dave's more or less doesn't change the
complexity of that file (people who don't care for probes don't have to
follow the macros to know what they do).

More information about the Python-Dev mailing list