Skip to content

Commit a62785a

Browse files
committed
More cleanup.
1 parent 16ebbaa commit a62785a

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

Doc/c-api/profiling.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Profiling and Tracing
66
=====================
77

8-
98
The Python interpreter provides some low-level support for attaching profiling
109
and execution tracing facilities. These are used for profiling, debugging, and
1110
coverage analysis tools.
@@ -123,6 +122,7 @@ Python-level trace functions in previous versions.
123122
124123
The caller must have an :term:`attached thread state`.
125124
125+
126126
.. c:function:: void PyEval_SetProfileAllThreads(Py_tracefunc func, PyObject *obj)
127127
128128
Like :c:func:`PyEval_SetProfile` but sets the profile function in all running threads
@@ -149,6 +149,7 @@ Python-level trace functions in previous versions.
149149
150150
The caller must have an :term:`attached thread state`.
151151
152+
152153
.. c:function:: void PyEval_SetTraceAllThreads(Py_tracefunc func, PyObject *obj)
153154
154155
Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running threads
@@ -161,11 +162,13 @@ Python-level trace functions in previous versions.
161162
162163
.. versionadded:: 3.12
163164
165+
164166
Reference tracing
165167
=================
166168
167169
.. versionadded:: 3.13
168170
171+
169172
.. c:type:: int (*PyRefTracer)(PyObject *, int event, void* data)
170173
171174
The type of the trace function registered using :c:func:`PyRefTracer_SetTracer`.
@@ -181,23 +184,27 @@ Reference tracing
181184
182185
.. versionadded:: 3.13
183186
187+
184188
.. c:var:: int PyRefTracer_CREATE
185189
186190
The value for the *event* parameter to :c:type:`PyRefTracer` functions when a Python
187191
object has been created.
188192
193+
189194
.. c:var:: int PyRefTracer_DESTROY
190195
191196
The value for the *event* parameter to :c:type:`PyRefTracer` functions when a Python
192197
object has been destroyed.
193198
199+
194200
.. c:var:: int PyRefTracer_TRACKER_REMOVED
195201
196202
The value for the *event* parameter to :c:type:`PyRefTracer` functions when the
197203
current tracer is about to be replaced by a new one.
198204
199205
.. versionadded:: 3.14
200206
207+
201208
.. c:function:: int PyRefTracer_SetTracer(PyRefTracer tracer, void *data)
202209
203210
Register a reference tracer function. The function will be called when a new
@@ -219,6 +226,7 @@ Reference tracing
219226
220227
.. versionadded:: 3.13
221228
229+
222230
.. c:function:: PyRefTracer PyRefTracer_GetTracer(void** data)
223231
224232
Get the registered reference tracer function and the value of the opaque data

Doc/c-api/subinterpreters.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ function. You can create and destroy them using the following functions:
246246
A Per-Interpreter GIL
247247
---------------------
248248
249+
.. versionadded:: 3.12
250+
249251
Using :c:func:`Py_NewInterpreterFromConfig` you can create
250252
a sub-interpreter that is completely isolated from other interpreters,
251253
including having its own GIL. The most important benefit of this
@@ -279,8 +281,6 @@ any standard approach to this yet. A future stdlib module would help
279281
mitigate the effort of preserving isolation and expose effective tools
280282
for communicating (and sharing) data between interpreters.
281283
282-
.. versionadded:: 3.12
283-
284284
285285
Bugs and caveats
286286
----------------
@@ -332,6 +332,7 @@ High-level APIs
332332
of a :ref:`per-interpreter GIL <per-interpreter-gil>`.
333333
See :c:func:`Py_NewInterpreterFromConfig`.
334334

335+
335336
.. c:function:: PyInterpreterState* PyInterpreterState_Get(void)
336337
337338
Get the current interpreter.
@@ -380,6 +381,7 @@ High-level APIs
380381
.. versionchanged:: 3.11
381382
The *frame* parameter changed from ``PyFrameObject*`` to ``_PyInterpreterFrame*``.
382383
384+
383385
.. c:function:: _PyFrameEvalFunction _PyInterpreterState_GetEvalFrameFunc(PyInterpreterState *interp)
384386
385387
Get the frame evaluation function.
@@ -388,6 +390,7 @@ High-level APIs
388390
389391
.. versionadded:: 3.9
390392
393+
391394
.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame)
392395
393396
Set the frame evaluation function.
@@ -430,6 +433,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
430433
:term:`attached thread state` for the target interpreter. The interpreter
431434
state must have been reset with a previous call to :c:func:`PyInterpreterState_Clear`.
432435
436+
433437
.. _advanced-debugging:
434438
435439
Advanced Debugger Support

Doc/c-api/threads.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ pointer and a void pointer argument.
710710
.. versionchanged:: 3.7
711711
The type of the *id* parameter changed from :c:expr:`long` to
712712
:c:expr:`unsigned long`
713-
.
713+
714714
715715
.. _thread-local-storage:
716716
@@ -768,7 +768,7 @@ CPython interpreter. This API uses a new type :c:type:`Py_tss_t` instead of
768768
769769
770770
Dynamic Allocation
771-
~~~~~~~~~~~~~~~~~~
771+
------------------
772772
773773
Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules
774774
built with :ref:`Py_LIMITED_API <stable>`, where static allocation of this type
@@ -795,7 +795,7 @@ is not possible due to its implementation being opaque at build time.
795795
796796
797797
Methods
798-
~~~~~~~
798+
-------
799799
800800
The parameter *key* of these functions must not be ``NULL``. Moreover, the
801801
behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are
@@ -843,8 +843,8 @@ undefined if the given :c:type:`Py_tss_t` has not been initialized by
843843
844844
.. _thread-local-storage-api:
845845
846-
Thread Local Storage (TLS) API
847-
------------------------------
846+
Legacy API
847+
----------
848848
849849
.. deprecated:: 3.7
850850
This API is superseded by

0 commit comments

Comments
 (0)