@@ -341,6 +341,84 @@ Available static markers
341341 .. versionadded :: 3.8
342342
343343
344+ C Entry Points
345+ ^^^^^^^^^^^^^^
346+
347+ To simplify triggering of DTrace markers, Python's C API comes with a number
348+ of helper functions that mirror each static marker. On builds of Python without
349+ DTrace enabled, these do nothing.
350+
351+ In general, it is not necessary to call these yourself, as Python will do
352+ it for you.
353+
354+ .. list-table ::
355+ :widths: 50 25 25
356+ :header-rows: 1
357+
358+ * * C API Function
359+ * Static Marker
360+ * Notes
361+ * * .. c:function: : void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2)
362+ * :c:func:`!line`
363+ *
364+ * * .. c:function:: void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2)
365+ * :c:func:`!function__entry`
366+ *
367+ * * .. c:function:: void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2)
368+ * :c:func:`!function__return`
369+ *
370+ * * .. c:function:: void PyDTrace_GC_START(int arg0)
371+ * :c:func:`!gc__start`
372+ *
373+ * * .. c:function:: void PyDTrace_GC_DONE(Py_ssize_t arg0)
374+ * :c:func:`!gc__done`
375+ *
376+ * * .. c:function:: void PyDTrace_INSTANCE_NEW_START(int arg0)
377+ * :c:func:`!instance__new__start`
378+ * Not used by Python
379+ * * .. c:function:: void PyDTrace_INSTANCE_NEW_DONE(int arg0)
380+ * :c:func:`!instance__new__done`
381+ * Not used by Python
382+ * * .. c:function:: void PyDTrace_INSTANCE_DELETE_START(int arg0)
383+ * :c:func:`!instance__delete__start`
384+ * Not used by Python
385+ * * .. c:function:: void PyDTrace_INSTANCE_DELETE_DONE(int arg0)
386+ * :c:func:`!instance__delete__done`
387+ * Not used by Python
388+ * * .. c:function:: void PyDTrace_IMPORT_FIND_LOAD_START(const char *arg0)
389+ * :c:func:`!import__find__load__start`
390+ *
391+ * * .. c:function:: void PyDTrace_IMPORT_FIND_LOAD_DONE(const char *arg0, int arg1)
392+ * :c:func:`!import__find__load__done`
393+ *
394+ * * .. c:function:: void PyDTrace_AUDIT(const char *arg0, void *arg1)
395+ * :c:func:`!audit`
396+ *
397+
398+
399+ C Probing Checks
400+ ^^^^^^^^^^^^^^^^
401+
402+ .. c :function :: int PyDTrace_LINE_ENABLED (void)
403+ .. c:function:: int PyDTrace_FUNCTION_ENTRY_ENABLED(void)
404+ .. c:function:: int PyDTrace_FUNCTION_RETURN_ENABLED(void)
405+ .. c:function:: int PyDTrace_GC_START_ENABLED(void)
406+ .. c:function:: int PyDTrace_GC_DONE_ENABLED(void)
407+ .. c:function:: int PyDTrace_INSTANCE_NEW_START_ENABLED(void)
408+ .. c:function:: int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void)
409+ .. c:function:: int PyDTrace_INSTANCE_DELETE_START_ENABLED(void)
410+ .. c:function:: int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void)
411+ .. c:function:: int PyDTrace_IMPORT_FIND_LOAD_START_ENABLED(void)
412+ .. c:function:: int PyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED(void)
413+ .. c:function:: int PyDTrace_AUDIT_ENABLED(void)
414+
415+ All calls to ``PyDTrace`` functions must be guarded by a call to one
416+ of these functions. This allows Python to minimize performance impact
417+ when probing is disabled.
418+
419+ On builds without DTrace enabled, these functions do nothing and return
420+ ``0``.
421+
344422SystemTap Tapsets
345423-----------------
346424
0 commit comments