[issue5654] Add C hook in PyDict_SetItem for debuggers

STINNER Victor report at bugs.python.org
Tue Nov 29 20:11:32 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> the cost in the normal case is a single pointer comparison with NULL,
> something very cheap.

The Linux kernel patchs dynamically the code: disabling a probe writes NOP instruction in memory to avoid the cost of the test. Probes are completly disabled by default.

See kernel markers (introduced in Linux 2.6.24) and the more recent kernel tracepoints (introduced in Linux 2.6.28).
http://lwn.net/Articles/300992/

> If something like this goes in, it should be #ifdef'd out
> by default

I agree.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5654>
_______________________________________


More information about the Python-bugs-list mailing list