components/python/python34/patches/00-dtrace.patch
branchs11-update
changeset 3876 da37433d5103
parent 3786 fa9d2da4d216
child 5229 b7b91ddbbdce
equal deleted inserted replaced
3870:37ef66e7f75b 3876:da37433d5103
  1009 +    run_unittest(DTraceTestsOptimize)
  1009 +    run_unittest(DTraceTestsOptimize)
  1010 +
  1010 +
  1011 +if __name__ == '__main__':
  1011 +if __name__ == '__main__':
  1012 +    test_main()
  1012 +    test_main()
  1013 +
  1013 +
  1014 --- Python-3.4.2/Lib/test/test_sys.py.~1~	2014-09-22 05:57:02.000000000 -0700
  1014 --- Python-3.4.3/Lib/test/test_sys.py.~1~	2015-02-25 03:27:45.000000000 -0800
  1015 +++ Python-3.4.2/Lib/test/test_sys.py	2014-09-22 11:46:06.131047596 -0700
  1015 +++ Python-3.4.3/Lib/test/test_sys.py	2015-02-25 07:32:22.294936251 -0800
  1016 @@ -729,6 +729,7 @@
  1016 @@ -761,6 +761,7 @@
  1017          self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit)
  1017          self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit)
  1018  
  1018  
  1019      def test_objecttypes(self):
  1019      def test_objecttypes(self):
  1020 +        import dtrace
  1020 +        import dtrace
  1021          # check all types defined in Objects/
  1021          # check all types defined in Objects/
  1022          size = test.support.calcobjsize
  1022          size = test.support.calcobjsize
  1023          vsize = test.support.calcvobjsize
  1023          vsize = test.support.calcvobjsize
  1024 @@ -754,13 +755,17 @@
  1024 @@ -786,13 +787,17 @@
  1025              return inner
  1025              return inner
  1026          check(get_cell().__closure__[0], size('P'))
  1026          check(get_cell().__closure__[0], size('P'))
  1027          # code
  1027          # code
  1028 -        check(get_cell().__code__, size('5i9Pi3P'))
  1028 -        check(get_cell().__code__, size('5i9Pi3P'))
  1029 -        check(get_cell.__code__, size('5i9Pi3P'))
  1029 -        check(get_cell.__code__, size('5i9Pi3P'))
  1040 -        check(get_cell2.__code__, size('5i9Pi3P') + 1)
  1040 -        check(get_cell2.__code__, size('5i9Pi3P') + 1)
  1041 +        check(get_cell2.__code__, size(code) + 1)
  1041 +        check(get_cell2.__code__, size(code) + 1)
  1042          # complex
  1042          # complex
  1043          check(complex(0,1), size('2d'))
  1043          check(complex(0,1), size('2d'))
  1044          # method_descriptor (descriptor object)
  1044          # method_descriptor (descriptor object)
  1045 --- Python-3.4.2/Makefile.pre.in.~1~	2014-09-22 05:57:02.000000000 -0700
  1045 --- Python-3.4.3/Makefile.pre.in.~1~	2015-02-25 03:27:45.000000000 -0800
  1046 +++ Python-3.4.2/Makefile.pre.in	2014-09-22 11:47:52.199531636 -0700
  1046 +++ Python-3.4.3/Makefile.pre.in	2015-02-25 07:37:27.789785457 -0800
  1047 @@ -52,6 +52,13 @@
  1047 @@ -52,6 +52,13 @@
  1048  # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  1048  # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  1049  LN=		@LN@
  1049  LN=		@LN@
  1050  
  1050  
  1051 +DTRACE=         @DTRACE@
  1051 +DTRACE=         @DTRACE@
  1056 +
  1056 +
  1057 +
  1057 +
  1058  # Portable install script (configure doesn't always guess right)
  1058  # Portable install script (configure doesn't always guess right)
  1059  INSTALL=	@INSTALL@
  1059  INSTALL=	@INSTALL@
  1060  INSTALL_PROGRAM=@INSTALL_PROGRAM@
  1060  INSTALL_PROGRAM=@INSTALL_PROGRAM@
  1061 @@ -584,7 +591,7 @@
  1061 @@ -585,7 +592,7 @@
  1062  	$(AR) $(ARFLAGS) $@ $(MODOBJS)
  1062  	$(AR) $(ARFLAGS) $@ $(MODOBJS)
  1063  	$(RANLIB) $@
  1063  	$(RANLIB) $@
  1064  
  1064  
  1065 -libpython$(LDVERSION).so: $(LIBRARY_OBJS)
  1065 -libpython$(LDVERSION).so: $(LIBRARY_OBJS)
  1066 +libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACEOBJS)
  1066 +libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACEOBJS)
  1067  	if test $(INSTSONAME) != $(LDLIBRARY); then \
  1067  	if test $(INSTSONAME) != $(LDLIBRARY); then \
  1068  		$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  1068  		$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  1069  		$(LN) -f $(INSTSONAME) $@; \
  1069  		$(LN) -f $(INSTSONAME) $@; \
  1070 @@ -595,9 +602,8 @@
  1070 @@ -596,9 +603,8 @@
  1071  libpython3.so:	libpython$(LDVERSION).so
  1071  libpython3.so:	libpython$(LDVERSION).so
  1072  	$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
  1072  	$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
  1073  
  1073  
  1074 -libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
  1074 -libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
  1075 -	 $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  1075 -	 $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
  1077 +libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) $(DTRACEOBJS)
  1077 +libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) $(DTRACEOBJS)
  1078 +	 $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACEOBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
  1078 +	 $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACEOBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
  1079  
  1079  
  1080  libpython$(VERSION).sl: $(LIBRARY_OBJS)
  1080  libpython$(VERSION).sl: $(LIBRARY_OBJS)
  1081  	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
  1081  	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
  1082 @@ -697,12 +703,18 @@
  1082 @@ -698,12 +704,18 @@
  1083  		$(MODULE_OBJS) \
  1083  		$(MODULE_OBJS) \
  1084  		$(SIGNAL_OBJS) \
  1084  		$(SIGNAL_OBJS) \
  1085  		$(MODOBJS) \
  1085  		$(MODOBJS) \
  1086 +		$(DTRACEOBJS) \
  1086 +		$(DTRACEOBJS) \
  1087  		$(srcdir)/Modules/getbuildinfo.c
  1087  		$(srcdir)/Modules/getbuildinfo.c
  1096 +		mv [email protected] $@ ; \
  1096 +		mv [email protected] $@ ; \
  1097 +	fi;
  1097 +	fi;
  1098  
  1098  
  1099  Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  1099  Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  1100  	$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  1100  	$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  1101 @@ -835,6 +847,46 @@
  1101 @@ -836,6 +848,46 @@
  1102  Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
  1102  Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
  1103  	$(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
  1103  	$(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
  1104  
  1104  
  1105 +$(srcdir)/Include/pydtrace.h: $(srcdir)/Include/pydtrace.d
  1105 +$(srcdir)/Include/pydtrace.h: $(srcdir)/Include/pydtrace.d
  1106 +	if test "$(DTRACE)" != "" ; then \
  1106 +	if test "$(DTRACE)" != "" ; then \
  1143 +	fi;
  1143 +	fi;
  1144 +
  1144 +
  1145  ############################################################################
  1145  ############################################################################
  1146  # Header files
  1146  # Header files
  1147  
  1147  
  1148 @@ -1531,6 +1583,11 @@
  1148 @@ -1535,6 +1587,11 @@
  1149  	find build -name '*.py[co]' -exec rm -f {} ';' || true
  1149  	find build -name '*.py[co]' -exec rm -f {} ';' || true
  1150  	-rm -f pybuilddir.txt
  1150  	-rm -f pybuilddir.txt
  1151  	-rm -f Lib/lib2to3/*Grammar*.pickle
  1151  	-rm -f Lib/lib2to3/*Grammar*.pickle
  1152 +	rm -f Include/pydtrace.h
  1152 +	rm -f Include/pydtrace.h
  1153 +	rm -f Include/pydtrace_offsets Include/pydtrace_offsets.h
  1153 +	rm -f Include/pydtrace_offsets Include/pydtrace_offsets.h
  1155 +	rm -f Modules/gcmodule.o.ts_dtrace
  1155 +	rm -f Modules/gcmodule.o.ts_dtrace
  1156 +	rm -f Objects/typeobject.o.ts_dtrace
  1156 +	rm -f Objects/typeobject.o.ts_dtrace
  1157  	-rm -f Modules/_testembed Modules/_freeze_importlib
  1157  	-rm -f Modules/_testembed Modules/_freeze_importlib
  1158  
  1158  
  1159  profile-removal:
  1159  profile-removal:
  1160 @@ -1562,6 +1619,11 @@
  1160 @@ -1566,6 +1623,11 @@
  1161  				     -o -name '*.orig' -o -name '*.rej' \
  1161  				     -o -name '*.orig' -o -name '*.rej' \
  1162  				     -o -name '*.bak' ')' \
  1162  				     -o -name '*.bak' ')' \
  1163  				     -exec rm -f {} ';'
  1163  				     -exec rm -f {} ';'
  1164 +	rm -f Include/pydtrace.h
  1164 +	rm -f Include/pydtrace.h
  1165 +	rm -f Include/pydtrace_offsets Include/pydtrace_offsets.h
  1165 +	rm -f Include/pydtrace_offsets Include/pydtrace_offsets.h
  1353 +#endif
  1353 +#endif
  1354 +
  1354 +
  1355      _PyObject_GC_TRACK(f);
  1355      _PyObject_GC_TRACK(f);
  1356      return f;
  1356      return f;
  1357  }
  1357  }
  1358 --- Python-3.4.0/Objects/typeobject.c
  1358 --- Python-3.4.3/Objects/typeobject.c.~1~	2015-02-25 03:27:46.000000000 -0800
  1359 +++ Python-3.4.0/Objects/typeobject.c
  1359 +++ Python-3.4.3/Objects/typeobject.c	2015-02-25 07:39:20.467592808 -0800
  1360 @@ -4,6 +4,10 @@
  1360 @@ -4,6 +4,10 @@
  1361  #include "frameobject.h"
  1361  #include "frameobject.h"
  1362  #include "structmember.h"
  1362  #include "structmember.h"
  1363  
  1363  
  1364 +#ifdef WITH_DTRACE
  1364 +#ifdef WITH_DTRACE
  1366 +#endif
  1366 +#endif
  1367 +
  1367 +
  1368  #include <ctype.h>
  1368  #include <ctype.h>
  1369  
  1369  
  1370  
  1370  
  1371 @@ -880,8 +884,29 @@
  1371 @@ -909,8 +913,29 @@
  1372  PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
  1372  PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
  1373  {
  1373  {
  1374      PyObject *obj;
  1374      PyObject *obj;
  1375 -    const size_t size = _PyObject_VAR_SIZE(type, nitems+1);
  1375 -    const size_t size = _PyObject_VAR_SIZE(type, nitems+1);
  1376 +    size_t size;
  1376 +    size_t size;
  1397      /* note that we need to add one, for the sentinel */
  1397      /* note that we need to add one, for the sentinel */
  1398 +    size = _PyObject_VAR_SIZE(type, nitems+1);
  1398 +    size = _PyObject_VAR_SIZE(type, nitems+1);
  1399  
  1399  
  1400      if (PyType_IS_GC(type))
  1400      if (PyType_IS_GC(type))
  1401          obj = _PyObject_GC_Malloc(size);
  1401          obj = _PyObject_GC_Malloc(size);
  1402 @@ -903,6 +928,23 @@
  1402 @@ -932,6 +957,23 @@
  1403  
  1403  
  1404      if (PyType_IS_GC(type))
  1404      if (PyType_IS_GC(type))
  1405          _PyObject_GC_TRACK(obj);
  1405          _PyObject_GC_TRACK(obj);
  1406 +
  1406 +
  1407 +#ifdef WITH_DTRACE
  1407 +#ifdef WITH_DTRACE
  1421 +#endif
  1421 +#endif
  1422 +
  1422 +
  1423      return obj;
  1423      return obj;
  1424  }
  1424  }
  1425  
  1425  
  1426 @@ -1023,9 +1065,56 @@
  1426 @@ -1052,9 +1094,56 @@
  1427      return 0;
  1427      return 0;
  1428  }
  1428  }
  1429  
  1429  
  1430 +#ifdef WITH_DTRACE
  1430 +#ifdef WITH_DTRACE
  1431 +static void subtype_dealloc2(PyObject *);  /* Forward declaration */
  1431 +static void subtype_dealloc2(PyObject *);  /* Forward declaration */
  1478 +(PyObject *self)
  1478 +(PyObject *self)
  1479 +{
  1479 +{
  1480      PyTypeObject *type, *base;
  1480      PyTypeObject *type, *base;
  1481      destructor basedealloc;
  1481      destructor basedealloc;
  1482      PyThreadState *tstate = PyThreadState_GET();
  1482      PyThreadState *tstate = PyThreadState_GET();
  1483 --- Python-3.4.2/Python/ceval.c.~1~	2014-09-22 05:57:05.000000000 -0700
  1483 --- Python-3.4.3/Python/ceval.c.~1~	2015-02-25 03:27:46.000000000 -0800
  1484 +++ Python-3.4.2/Python/ceval.c	2014-09-22 11:50:27.740913482 -0700
  1484 +++ Python-3.4.3/Python/ceval.c	2015-02-25 07:40:45.132085013 -0800
  1485 @@ -18,6 +18,13 @@
  1485 @@ -18,6 +18,13 @@
  1486  
  1486  
  1487  #include <ctype.h>
  1487  #include <ctype.h>
  1488  
  1488  
  1489 +#ifdef WITH_DTRACE
  1489 +#ifdef WITH_DTRACE
  1494 +#endif
  1494 +#endif
  1495 +
  1495 +
  1496  #ifndef WITH_TSC
  1496  #ifndef WITH_TSC
  1497  
  1497  
  1498  #define READ_TIMESTAMP(var)
  1498  #define READ_TIMESTAMP(var)
  1499 @@ -119,6 +126,12 @@
  1499 @@ -121,6 +128,12 @@
  1500  #define CALL_FLAG_VAR 1
  1500  #define CALL_FLAG_VAR 1
  1501  #define CALL_FLAG_KW 2
  1501  #define CALL_FLAG_KW 2
  1502  
  1502  
  1503 +#ifdef WITH_DTRACE
  1503 +#ifdef WITH_DTRACE
  1504 +static void maybe_dtrace_line(PyFrameObject *frame,
  1504 +static void maybe_dtrace_line(PyFrameObject *frame,
  1507 +#endif
  1507 +#endif
  1508 +
  1508 +
  1509  #ifdef LLTRACE
  1509  #ifdef LLTRACE
  1510  static int lltrace;
  1510  static int lltrace;
  1511  static int prtrace(PyObject *, char *);
  1511  static int prtrace(PyObject *, char *);
  1512 @@ -778,6 +791,49 @@
  1512 @@ -780,6 +793,49 @@
  1513                        NULL, NULL);
  1513                        NULL, NULL);
  1514  }
  1514  }
  1515  
  1515  
  1516 +#ifdef WITH_DTRACE
  1516 +#ifdef WITH_DTRACE
  1517 +static void
  1517 +static void
  1557 +}
  1557 +}
  1558 +#endif
  1558 +#endif
  1559  
  1559  
  1560  /* Interpreter main loop */
  1560  /* Interpreter main loop */
  1561  
  1561  
  1562 @@ -789,8 +845,16 @@
  1562 @@ -791,8 +847,16 @@
  1563      return PyEval_EvalFrameEx(f, 0);
  1563      return PyEval_EvalFrameEx(f, 0);
  1564  }
  1564  }
  1565  
  1565  
  1566 +
  1566 +
  1567  PyObject *
  1567  PyObject *
  1574  PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
  1574  PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
  1575 +#endif
  1575 +#endif
  1576  {
  1576  {
  1577  #ifdef DXPAIRS
  1577  #ifdef DXPAIRS
  1578      int lastopcode = 0;
  1578      int lastopcode = 0;
  1579 @@ -911,7 +975,7 @@
  1579 @@ -913,7 +977,7 @@
  1580  #ifdef LLTRACE
  1580  #ifdef LLTRACE
  1581  #define FAST_DISPATCH() \
  1581  #define FAST_DISPATCH() \
  1582      { \
  1582      { \
  1583 -        if (!lltrace && !_Py_TracingPossible) { \
  1583 -        if (!lltrace && !_Py_TracingPossible) { \
  1584 +        if (!lltrace && !_Py_TracingPossible && !PYTHON_LINE_ENABLED()) { \
  1584 +        if (!lltrace && !_Py_TracingPossible && !PYTHON_LINE_ENABLED()) { \
  1585              f->f_lasti = INSTR_OFFSET(); \
  1585              f->f_lasti = INSTR_OFFSET(); \
  1586              goto *opcode_targets[*next_instr++]; \
  1586              goto *opcode_targets[*next_instr++]; \
  1587          } \
  1587          } \
  1588 @@ -920,7 +984,7 @@
  1588 @@ -922,7 +986,7 @@
  1589  #else
  1589  #else
  1590  #define FAST_DISPATCH() \
  1590  #define FAST_DISPATCH() \
  1591      { \
  1591      { \
  1592 -        if (!_Py_TracingPossible) { \
  1592 -        if (!_Py_TracingPossible) { \
  1593 +        if (!_Py_TracingPossible && !PYTHON_LINE_ENABLED()) { \
  1593 +        if (!_Py_TracingPossible && !PYTHON_LINE_ENABLED()) { \
  1594              f->f_lasti = INSTR_OFFSET(); \
  1594              f->f_lasti = INSTR_OFFSET(); \
  1595              goto *opcode_targets[*next_instr++]; \
  1595              goto *opcode_targets[*next_instr++]; \
  1596          } \
  1596          } \
  1597 @@ -1156,6 +1220,11 @@
  1597 @@ -1158,6 +1222,11 @@
  1598          }
  1598          }
  1599      }
  1599      }
  1600  
  1600  
  1601 +#ifdef WITH_DTRACE
  1601 +#ifdef WITH_DTRACE
  1602 +    if (PYTHON_FUNCTION_ENTRY_ENABLED())
  1602 +    if (PYTHON_FUNCTION_ENTRY_ENABLED())
  1604 +#endif
  1604 +#endif
  1605 +
  1605 +
  1606      co = f->f_code;
  1606      co = f->f_code;
  1607      names = co->co_names;
  1607      names = co->co_names;
  1608      consts = co->co_consts;
  1608      consts = co->co_consts;
  1609 @@ -1350,6 +1419,12 @@
  1609 @@ -1352,6 +1421,12 @@
  1610          /* Main switch on opcode */
  1610          /* Main switch on opcode */
  1611          READ_TIMESTAMP(inst0);
  1611          READ_TIMESTAMP(inst0);
  1612  
  1612  
  1613 +#ifdef WITH_DTRACE
  1613 +#ifdef WITH_DTRACE
  1614 +        if (PYTHON_LINE_ENABLED()) {
  1614 +        if (PYTHON_LINE_ENABLED()) {
  1617 +#endif
  1617 +#endif
  1618 +
  1618 +
  1619          switch (opcode) {
  1619          switch (opcode) {
  1620  
  1620  
  1621          /* BEWARE!
  1621          /* BEWARE!
  1622 @@ -3223,6 +3298,10 @@
  1622 @@ -3226,6 +3301,10 @@
  1623  
  1623  
  1624      /* pop frame */
  1624      /* pop frame */
  1625  exit_eval_frame:
  1625  exit_eval_frame:
  1626 +#ifdef WITH_DTRACE
  1626 +#ifdef WITH_DTRACE
  1627 +    if (PYTHON_FUNCTION_RETURN_ENABLED())
  1627 +    if (PYTHON_FUNCTION_RETURN_ENABLED())
  1628 +        dtrace_return(f);
  1628 +        dtrace_return(f);
  1629 +#endif
  1629 +#endif
  1630      Py_LeaveRecursiveCall();
  1630      Py_LeaveRecursiveCall();
  1631      f->f_executing = 0;
  1631      f->f_executing = 0;
  1632      tstate->frame = f->f_back;
  1632      tstate->frame = f->f_back;
  1633 @@ -3922,6 +4001,57 @@
  1633 @@ -3925,6 +4004,57 @@
  1634      return result;
  1634      return result;
  1635  }
  1635  }
  1636  
  1636  
  1637 +/*
  1637 +/*
  1638 + * These shenanigans look like utter madness, but what we're actually doing is
  1638 + * These shenanigans look like utter madness, but what we're actually doing is
  1686 +
  1686 +
  1687 +
  1687 +
  1688  PyObject *
  1688  PyObject *
  1689  _PyEval_CallTracing(PyObject *func, PyObject *args)
  1689  _PyEval_CallTracing(PyObject *func, PyObject *args)
  1690  {
  1690  {
  1691 @@ -3939,6 +4069,51 @@
  1691 @@ -3942,6 +4072,51 @@
  1692      return result;
  1692      return result;
  1693  }
  1693  }
  1694  
  1694  
  1695 +#ifdef WITH_DTRACE
  1695 +#ifdef WITH_DTRACE
  1696 +/* See Objects/lnotab_notes.txt for a description of how tracing works. */
  1696 +/* See Objects/lnotab_notes.txt for a description of how tracing works. */
  1738 +#endif
  1738 +#endif
  1739 +
  1739 +
  1740  /* See Objects/lnotab_notes.txt for a description of how tracing works. */
  1740  /* See Objects/lnotab_notes.txt for a description of how tracing works. */
  1741  static int
  1741  static int
  1742  maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
  1742  maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
  1743 --- Python-3.4.2/configure.~1~	2014-09-22 05:57:05.000000000 -0700
  1743 --- Python-3.4.3/configure.~1~	2015-02-25 03:27:46.000000000 -0800
  1744 +++ Python-3.4.2/configure	2014-09-22 12:48:32.849088475 -0700
  1744 +++ Python-3.4.3/configure	2015-02-25 07:42:00.367566318 -0800
  1745 @@ -642,6 +642,11 @@
  1745 @@ -642,6 +642,11 @@
  1746  MACHDEP_OBJS
  1746  MACHDEP_OBJS
  1747  DYNLOADFILE
  1747  DYNLOADFILE
  1748  DLINCLDIR
  1748  DLINCLDIR
  1749 +DTRACEOBJS
  1749 +DTRACEOBJS
  1752 +DFLAGS
  1752 +DFLAGS
  1753 +DTRACE
  1753 +DTRACE
  1754  THREADOBJ
  1754  THREADOBJ
  1755  LDLAST
  1755  LDLAST
  1756  USE_THREAD_MODULE
  1756  USE_THREAD_MODULE
  1757 @@ -812,6 +817,7 @@
  1757 @@ -814,6 +819,7 @@
  1758  with_tsc
  1758  with_tsc
  1759  with_pymalloc
  1759  with_pymalloc
  1760  with_valgrind
  1760  with_valgrind
  1761 +with_dtrace
  1761 +with_dtrace
  1762  with_fpectl
  1762  with_fpectl
  1763  with_libm
  1763  with_libm
  1764  with_libc
  1764  with_libc
  1765 @@ -1495,6 +1501,7 @@
  1765 @@ -1500,6 +1506,7 @@
  1766    --with(out)-tsc         enable/disable timestamp counter profile
  1766    --with(out)-tsc         enable/disable timestamp counter profile
  1767    --with(out)-pymalloc    disable/enable specialized mallocs
  1767    --with(out)-pymalloc    disable/enable specialized mallocs
  1768    --with-valgrind         Enable Valgrind support
  1768    --with-valgrind         Enable Valgrind support
  1769 +  --with(out)-dtrace      disable/enable dtrace support
  1769 +  --with(out)-dtrace      disable/enable dtrace support
  1770    --with-fpectl           enable SIGFPE catching
  1770    --with-fpectl           enable SIGFPE catching
  1771    --with-libm=STRING      math library
  1771    --with-libm=STRING      math library
  1772    --with-libc=STRING      C library
  1772    --with-libc=STRING      C library
  1773 @@ -10386,6 +10393,174 @@
  1773 @@ -10460,6 +10467,174 @@
  1774      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  1774      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  1775  fi
  1775  fi
  1776  
  1776  
  1777 +# Check for dtrace support
  1777 +# Check for dtrace support
  1778 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
  1778 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
  1943 +
  1943 +
  1944 +
  1944 +
  1945  # -I${DLINCLDIR} is added to the compile rule for importdl.o
  1945  # -I${DLINCLDIR} is added to the compile rule for importdl.o
  1946  
  1946  
  1947  DLINCLDIR=.
  1947  DLINCLDIR=.
  1948 --- Python-3.4.2/configure.ac.~1~	2014-09-22 05:57:05.000000000 -0700
  1948 --- Python-3.4.3/configure.ac.~1~	2015-02-25 03:27:46.000000000 -0800
  1949 +++ Python-3.4.2/configure.ac	2014-09-22 12:51:15.173895356 -0700
  1949 +++ Python-3.4.3/configure.ac	2015-02-25 07:45:54.186719967 -0800
  1950 @@ -2874,6 +2874,62 @@
  1950 @@ -2877,6 +2877,62 @@
  1951      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  1951      OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
  1952  fi
  1952  fi
  1953  
  1953  
  1954 +# Check for dtrace support
  1954 +# Check for dtrace support
  1955 +AC_MSG_CHECKING(for --with-dtrace)
  1955 +AC_MSG_CHECKING(for --with-dtrace)
  2008 +AC_SUBST(DTRACEOBJS)
  2008 +AC_SUBST(DTRACEOBJS)
  2009 +
  2009 +
  2010  # -I${DLINCLDIR} is added to the compile rule for importdl.o
  2010  # -I${DLINCLDIR} is added to the compile rule for importdl.o
  2011  AC_SUBST(DLINCLDIR)
  2011  AC_SUBST(DLINCLDIR)
  2012  DLINCLDIR=.
  2012  DLINCLDIR=.
  2013 --- Python-3.4.0/pyconfig.h.in
  2013 --- Python-3.4.3/pyconfig.h.in.~1~	2015-02-25 03:27:46.000000000 -0800
  2014 +++ Python-3.4.0/pyconfig.h.in
  2014 +++ Python-3.4.3/pyconfig.h.in	2015-02-25 07:51:33.792536393 -0800
  2015 @@ -1328,6 +1328,9 @@
  2015 @@ -1334,6 +1334,9 @@
  2016  /* Define if you want documentation strings in extension modules */
  2016  /* Define if you want documentation strings in extension modules */
  2017  #undef WITH_DOC_STRINGS
  2017  #undef WITH_DOC_STRINGS
  2018  
  2018  
  2019 +/* Define if you want to compile in Dtrace support */
  2019 +/* Define if you want to compile in Dtrace support */
  2020 +#undef WITH_DTRACE
  2020 +#undef WITH_DTRACE