components/python/python35/patches/00-dtrace.patch
changeset 6447 56a2f066191a
parent 5184 6c2a9525f3a4
child 7095 6469e6424607
equal deleted inserted replaced
6446:b54de573b4e9 6447:56a2f066191a
  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.5.0a4/Lib/test/test_sys.py.~1~	2015-04-20 00:37:52.000000000 -0700
  1014 --- Python-3.5.2/Lib/test/test_sys.py.~1~	2016-06-25 14:38:37.000000000 -0700
  1015 +++ Python-3.5.0a4/Lib/test/test_sys.py	2015-04-20 12:38:22.235939749 -0700
  1015 +++ Python-3.5.2/Lib/test/test_sys.py	2016-07-07 15:09:04.689495337 -0700
  1016 @@ -868,6 +868,7 @@
  1016 @@ -882,6 +882,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          calcsize = struct.calcsize
  1022          size = test.support.calcobjsize
  1023          size = test.support.calcobjsize
  1023          vsize = test.support.calcvobjsize
  1024 @@ -911,13 +912,17 @@
  1024 @@ -896,13 +897,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.5.1rc1/Makefile.pre.in.~1~	2015-11-22 22:19:07.000000000 -0800
  1045 --- Python-3.5.2/Makefile.pre.in.~1~	2016-06-25 14:38:37.000000000 -0700
  1046 +++ Python-3.5.1rc1/Makefile.pre.in	2015-12-04 07:32:55.999196503 -0800
  1046 +++ Python-3.5.2/Makefile.pre.in	2016-07-07 15:10:50.572816003 -0700
  1047 @@ -57,6 +57,13 @@
  1047 @@ -57,6 +57,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 @@ -611,7 +618,7 @@
  1061 @@ -618,7 +625,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 @@ -622,9 +629,8 @@
  1070 @@ -629,9 +636,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 @@ -729,12 +735,18 @@
  1082 @@ -740,12 +746,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 @@ -868,6 +880,46 @@
  1101 @@ -890,6 +902,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 @@ -1582,6 +1634,11 @@
  1148 @@ -1608,6 +1660,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 Programs/_testembed Programs/_freeze_importlib
  1157  	-rm -f Programs/_testembed Programs/_freeze_importlib
  1158  	-rm -rf build
  1158  	-rm -rf build
  1159  
  1159  
  1160 @@ -1615,6 +1672,11 @@
  1160 @@ -1642,6 +1699,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
  1337      return co;
  1337      return co;
  1338  }
  1338  }
  1339  
  1339  
  1340 --- Python-3.5.0rc2/Objects/frameobject.c.~1~	2015-08-25 10:19:14.000000000 -0700
  1340 --- Python-3.5.0rc2/Objects/frameobject.c.~1~	2015-08-25 10:19:14.000000000 -0700
  1341 +++ Python-3.5.0rc2/Objects/frameobject.c	2015-09-02 11:31:53.362348226 -0700
  1341 +++ Python-3.5.0rc2/Objects/frameobject.c	2015-09-02 11:31:53.362348226 -0700
  1342 @@ -737,6 +737,15 @@
  1342 @@ -735,6 +735,15 @@
  1343      f->f_executing = 0;
  1343      f->f_executing = 0;
  1344      f->f_gen = NULL;
  1344      f->f_gen = NULL;
  1345  
  1345  
  1346 +#ifdef WITH_DTRACE
  1346 +#ifdef WITH_DTRACE
  1347 +    /*
  1347 +    /*
  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.5.0a4/Objects/typeobject.c.~1~	2015-04-20 00:37:53.000000000 -0700
  1358 --- Python-3.5.2/Objects/typeobject.c.~1~	2016-06-25 14:38:38.000000000 -0700
  1359 +++ Python-3.5.0a4/Objects/typeobject.c	2015-04-20 12:55:28.246913689 -0700
  1359 +++ Python-3.5.2/Objects/typeobject.c	2016-07-07 15:17:01.001120208 -0700
  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 @@ -934,8 +938,29 @@
  1371 @@ -916,8 +920,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 @@ -957,6 +982,23 @@
  1402 @@ -939,6 +964,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 @@ -1077,9 +1119,56 @@
  1426 @@ -1059,9 +1101,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.5.0rc2/Python/ceval.c.~1~	2015-08-25 10:19:14.000000000 -0700
  1483 --- Python-3.5.2/Python/ceval.c.~1~	2016-06-25 14:38:38.000000000 -0700
  1484 +++ Python-3.5.0rc2/Python/ceval.c	2015-09-02 11:33:12.745496843 -0700
  1484 +++ Python-3.5.2/Python/ceval.c	2016-07-08 06:34:15.786356054 -0700
  1485 @@ -20,6 +20,13 @@
  1485 @@ -20,6 +20,13 @@
  1486  
  1486  
  1487  #include <ctype.h>
  1487  #include <ctype.h>
  1488  
  1488  
  1489 +#ifdef WITH_DTRACE
  1489 +#ifdef WITH_DTRACE
  1617 +#endif
  1617 +#endif
  1618 +
  1618 +
  1619          switch (opcode) {
  1619          switch (opcode) {
  1620  
  1620  
  1621          /* BEWARE!
  1621          /* BEWARE!
  1622 @@ -3573,6 +3648,10 @@
  1622 @@ -3625,6 +3700,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 @@ -4323,6 +4402,57 @@
  1633 @@ -4375,6 +4454,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 @@ -4340,6 +4470,51 @@
  1691 @@ -4392,6 +4522,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.5.0a4/configure.~1~	2015-04-20 00:37:53.000000000 -0700
  1743 --- Python-3.5.2/configure.~1~	2016-06-25 14:38:39.000000000 -0700
  1744 +++ Python-3.5.0a4/configure	2015-04-20 12:58:28.386851213 -0700
  1744 +++ Python-3.5.2/configure	2016-07-08 06:36:50.661156099 -0700
  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 @@ -824,6 +829,7 @@
  1757 @@ -828,6 +833,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 @@ -1512,6 +1518,7 @@
  1765 @@ -1519,6 +1525,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 @@ -10866,6 +10873,174 @@
  1773 @@ -11074,6 +11081,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.5.0a4/configure.ac.~1~	2015-04-20 00:37:53.000000000 -0700
  1948 --- Python-3.5.2/configure.ac.~1~	2016-06-25 14:38:39.000000000 -0700
  1949 +++ Python-3.5.0a4/configure.ac	2015-04-20 12:59:58.383305870 -0700
  1949 +++ Python-3.5.2/configure.ac	2016-07-08 06:38:36.346837325 -0700
  1950 @@ -3129,6 +3129,62 @@
  1950 @@ -3211,6 +3211,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.5.0a4/pyconfig.h.in.~1~	2015-04-20 00:37:53.000000000 -0700
  2013 --- Python-3.5.2/pyconfig.h.in.~1~	2016-06-25 14:38:39.000000000 -0700
  2014 +++ Python-3.5.0a4/pyconfig.h.in	2015-04-20 13:00:52.054987861 -0700
  2014 +++ Python-3.5.2/pyconfig.h.in	2016-07-08 06:40:11.272340748 -0700
  2015 @@ -1358,6 +1358,9 @@
  2015 @@ -1360,6 +1360,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
  2021 +
  2021 +
  2022  /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
  2022  /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
  2023     linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
  2023     linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
  2024     Dyld is necessary to support frameworks. */
  2024     Dyld is necessary to support frameworks. */
  2025 --- Python-3.5.0a4/setup.py.~1~	2015-04-20 00:37:53.000000000 -0700
  2025 --- Python-3.5.2/setup.py.~1~	2016-06-25 14:38:39.000000000 -0700
  2026 +++ Python-3.5.0a4/setup.py	2015-04-20 13:01:49.596181289 -0700
  2026 +++ Python-3.5.2/setup.py	2016-07-08 06:41:09.939900823 -0700
  2027 @@ -663,6 +663,9 @@
  2027 @@ -690,6 +690,9 @@
  2028          # syslog daemon interface
  2028          # syslog daemon interface
  2029          exts.append( Extension('syslog', ['syslogmodule.c']) )
  2029          exts.append( Extension('syslog', ['syslogmodule.c']) )
  2030  
  2030  
  2031 +        # jcea DTRACE probes
  2031 +        # jcea DTRACE probes
  2032 +        exts.append( Extension('dtrace', ['dtracemodule.c']) )
  2032 +        exts.append( Extension('dtrace', ['dtracemodule.c']) )