mirror of
https://github.com/python/cpython.git
synced 2024-11-30 18:51:15 +01:00
6f6a4e6cc5
We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
55 lines
1.8 KiB
C
Generated
55 lines
1.8 KiB
C
Generated
/*[clinic input]
|
|
preserve
|
|
[clinic start generated code]*/
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
# include "pycore_gc.h" // PyGC_Head
|
|
# include "pycore_runtime.h" // _Py_ID()
|
|
#endif
|
|
|
|
|
|
PyDoc_STRVAR(_lsprof_Profiler_getstats__doc__,
|
|
"getstats($self, /)\n"
|
|
"--\n"
|
|
"\n"
|
|
"list of profiler_entry objects.\n"
|
|
"\n"
|
|
"getstats() -> list of profiler_entry objects\n"
|
|
"\n"
|
|
"Return all information collected by the profiler.\n"
|
|
"Each profiler_entry is a tuple-like object with the\n"
|
|
"following attributes:\n"
|
|
"\n"
|
|
" code code object\n"
|
|
" callcount how many times this was called\n"
|
|
" reccallcount how many times called recursively\n"
|
|
" totaltime total time in this entry\n"
|
|
" inlinetime inline time in this entry (not in subcalls)\n"
|
|
" calls details of the calls\n"
|
|
"\n"
|
|
"The calls attribute is either None or a list of\n"
|
|
"profiler_subentry objects:\n"
|
|
"\n"
|
|
" code called code object\n"
|
|
" callcount how many times this is called\n"
|
|
" reccallcount how many times this is called recursively\n"
|
|
" totaltime total time spent in this call\n"
|
|
" inlinetime inline time (not in further subcalls)");
|
|
|
|
#define _LSPROF_PROFILER_GETSTATS_METHODDEF \
|
|
{"getstats", _PyCFunction_CAST(_lsprof_Profiler_getstats), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _lsprof_Profiler_getstats__doc__},
|
|
|
|
static PyObject *
|
|
_lsprof_Profiler_getstats_impl(ProfilerObject *self, PyTypeObject *cls);
|
|
|
|
static PyObject *
|
|
_lsprof_Profiler_getstats(ProfilerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
|
{
|
|
if (nargs) {
|
|
PyErr_SetString(PyExc_TypeError, "getstats() takes no arguments");
|
|
return NULL;
|
|
}
|
|
return _lsprof_Profiler_getstats_impl(self, cls);
|
|
}
|
|
/*[clinic end generated code: output=7425d3481349629a input=a9049054013a1b77]*/
|