@@ -265,6 +265,14 @@ Profile with real-time sampling statistics::
265265
266266 Sample all threads in the process instead of just the main thread
267267
268+ .. option :: --no-native
269+
270+ Don't include artificial ``<native> `` frames to denote calls to non-Python code.
271+
272+ .. option :: --no-gc
273+
274+ Don't include artificial ``<GC> `` frames to denote active garbage collection.
275+
268276.. option :: --realtime-stats
269277
270278 Print real-time sampling statistics during profiling
@@ -349,7 +357,7 @@ This section documents the programmatic interface for the :mod:`!profiling.sampl
349357For command-line usage, see :ref: `sampling-profiler-cli `. For conceptual information
350358about statistical profiling, see :ref: `statistical-profiling `
351359
352- .. function :: sample(pid, *, sort=2, sample_interval_usec=100, duration_sec=10, filename=None, all_threads=False, limit=None, show_summary=True, output_format="pstats", realtime_stats=False)
360+ .. function :: sample(pid, *, sort=2, sample_interval_usec=100, duration_sec=10, filename=None, all_threads=False, limit=None, show_summary=True, output_format="pstats", realtime_stats=False, native=True, gc=True )
353361
354362 Sample a Python process and generate profiling data.
355363
@@ -367,8 +375,10 @@ about statistical profiling, see :ref:`statistical-profiling`
367375 :param bool show_summary: Whether to show summary statistics (default: True)
368376 :param str output_format: Output format - 'pstats' or 'collapsed' (default: 'pstats')
369377 :param bool realtime_stats: Whether to display real-time statistics (default: False)
378+ :param bool native: Whether to include ``<native> `` frames (default: True)
379+ :param bool gc: Whether to include ``<GC> `` frames (default: True)
370380
371- :raises ValueError: If output_format is not 'pstats' or 'collapsed'
381+ :raises ValueError: If output_format is not 'pstats' or 'collapsed
372382
373383 Examples::
374384
0 commit comments