mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Enable the profiling of C functions (builtins and extensions)
This commit is contained in:
parent
a1dde13389
commit
c69ebe8d50
10 changed files with 145 additions and 15 deletions
|
@ -272,15 +272,16 @@ operating system filenames."
|
|||
* Cached interned string objects used for calling the profile and
|
||||
* trace functions. Initialized by trace_init().
|
||||
*/
|
||||
static PyObject *whatstrings[4] = {NULL, NULL, NULL, NULL};
|
||||
static PyObject *whatstrings[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
|
||||
static int
|
||||
trace_init(void)
|
||||
{
|
||||
static char *whatnames[4] = {"call", "exception", "line", "return"};
|
||||
static char *whatnames[7] = {"call", "exception", "line", "return",
|
||||
"c_call", "c_exception", "c_return"};
|
||||
PyObject *name;
|
||||
int i;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
for (i = 0; i < 7; ++i) {
|
||||
if (whatstrings[i] == NULL) {
|
||||
name = PyString_InternFromString(whatnames[i]);
|
||||
if (name == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue