[issue13405] Add DTrace probes

Jesús Cea Avión report at bugs.python.org
Fri Jan 20 04:51:36 CET 2012


Jesús Cea Avión <jcea at jcea.es> added the comment:

NOTE to myself: In OpenIndiana we could have this error:

"""
dtrace: failed to compile script ./Include/phelper.d: Preprocessor not found
"""

In that case, we must install the C preprocessor:

"""
pfexec pkg install cpp
"""

I confirm that current 3.3 patch works in the 32 bits OpenIndiana Python buildbots, after adding this patch (already available in my mercurial repository, but not in the patch published in this issue):

"""
diff --git a/Lib/test/test_dtrace.py b/Lib/test/test_dtrace.py
--- a/Lib/test/test_dtrace.py
+++ b/Lib/test/test_dtrace.py
@@ -173,7 +173,7 @@
         # Verify that we are checking:
         opcodes = set(["CALL_FUNCTION", "CALL_FUNCTION_VAR",
             "CALL_FUNCTION_KW", "CALL_FUNCTION_VAR_KW"])
-        obj = compile(open(sample).read(), "sample", "exec")
+        obj = compile(open(sample, encoding="utf-8").read(), "sample", "exec")
         class dump() :
             def __init__(self) :
                 self.buf = []
"""

Also, of course, the user must have dtrace permissions, as documented in a previous message.

----------

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


More information about the Python-bugs-list mailing list