Skip to content

Instantly share code, notes, and snippets.

View msabramo's full-sized avatar

Marc Abramowitz msabramo

View GitHub Profile
@msabramo
msabramo / gist:2892431
Created June 7, 2012 23:38
Tweak to jcea's Python configure.in to make DTrace work on OS X
diff -r 07656ca4aff7 configure.in
--- a/configure.in Fri Apr 13 14:34:03 2012 +0200
+++ b/configure.in Thu Jun 07 16:38:42 2012 -0700
@@ -2664,8 +2664,7 @@
then
DTRACE_NM=OTHER
DTRACE_LINKER=ld
- #if dtrace -G -o /dev/null Include/pydtrace.d 2>/dev/null
- if true
+ if dtrace -G -o /dev/null Include/pydtrace.d 2>/dev/null
== CPython 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
== Darwin-10.8.0-x86_64-i386-64bit little-endian
== /Users/marca/src/python-hg/cpython-2011-marca/build/test_python_44982
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_dtrace
test_function_entry_return (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_garbage_collection (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_instance_creation_destruction (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_line (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_stack (test.test_dtrace.DTraceTestsNormal) ... skipped "MacOS X doesn't support jstack()"
/*
* Generated by dtrace(1M).
*/
#ifndef _PYDTRACE_H
#define _PYDTRACE_H
#include <unistd.h>
#ifdef __cplusplus
/usr/local/bin/ginstall -c -d -m 755 Python.framework/Versions/2.7
gcc -o Python.framework/Versions/2.7/Python -dynamiclib \
-all_load libpython2.7.a -Wl,-single_module \
-install_name /Library/Frameworks/Python.framework/Versions/2.7/Python \
-compatibility_version 2.7 \
-current_version 2.7;
Undefined symbols:
"___dtraceenabled_python___line", referenced from:
_PyEval_EvalFrameExReal in libpython2.7.a(ceval.o)
"___dtrace_python___gc__start", referenced from:
/*
* Generated by dtrace(1M).
*/
#ifndef _Z_H
#define _Z_H
#include <unistd.h>
#ifdef __cplusplus
== CPython 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
== Darwin-10.8.0-x86_64-i386-64bit little-endian
== /Users/marca/src/python-hg/cpython-2011-marca/build/test_python_80733
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_dtrace
test_function_entry_return (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_garbage_collection (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_instance_creation_destruction (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_line (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_stack (test.test_dtrace.DTraceTestsNormal) ... skipped "MacOS X doesn't support jstack()"
/*
* Generated by dtrace(1M).
*/
#ifndef _Z_H
#define _Z_H
#include <unistd.h>
#ifdef __cplusplus
== CPython 2.7.3 (dtrace-issue13405_2.7:f90a7bc1b307+, Jun 7 2012, 21:07:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
== Darwin-10.8.0-x86_64-i386-64bit little-endian
== /Users/marca/src/python-hg/cpython-2011-marca/build/test_python_63327
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_dtrace
test_function_entry_return (test.test_dtrace.DTraceTestsNormal) ... ok
test_garbage_collection (test.test_dtrace.DTraceTestsNormal) ... ok
test_instance_creation_destruction (test.test_dtrace.DTraceTestsNormal) ... ok
test_line (test.test_dtrace.DTraceTestsNormal) ... ok
test_stack (test.test_dtrace.DTraceTestsNormal) ... skipped "MacOS X doesn't support jstack()"
== CPython 2.7.3 (dtrace-issue13405_2.7:f90a7bc1b307+, Jun 7 2012, 21:07:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
== Darwin-10.8.0-x86_64-i386-64bit little-endian
== /Users/marca/src/python-hg/cpython-2011-marca/build/test_python_63506
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_dtrace
test_function_entry_return (test.test_dtrace.DTraceTestsNormal) ... ok
test_garbage_collection (test.test_dtrace.DTraceTestsNormal) ... FAIL
test_instance_creation_destruction (test.test_dtrace.DTraceTestsNormal) ... ok
test_line (test.test_dtrace.DTraceTestsNormal) ... ok
test_stack (test.test_dtrace.DTraceTestsNormal) ... skipped "MacOS X doesn't support jstack()"
== CPython 2.7.3 (dtrace-issue13405_2.7:f90a7bc1b307+, Jun 7 2012, 21:07:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
== Darwin-10.8.0-x86_64-i386-64bit little-endian
== /Users/marca/src/python-hg/cpython-2011-marca/build/test_python_63643
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
test_dtrace
test_function_entry_return (test.test_dtrace.DTraceTestsNormal) ... ok
test_garbage_collection (test.test_dtrace.DTraceTestsNormal) ... ok
test_instance_creation_destruction (test.test_dtrace.DTraceTestsNormal) ... ok
test_line (test.test_dtrace.DTraceTestsNormal) ... ok
test_stack (test.test_dtrace.DTraceTestsNormal) ... skipped "MacOS X doesn't support jstack()"