Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 32396:2f76e72ad190 legacy-trunk
Making C profiling a configure option (at least temporarily)
| author | Nicholas Bastin <nick.bastin@gmail.com> |
|---|---|
| date | Tue, 22 Jun 2004 03:51:38 +0000 |
| parents | 6bc6abba8659 |
| children | 75861d8c5871 |
line wrap: on
line diff
--- a/Python/ceval.c Mon Jun 21 16:31:15 2004 +0000 +++ b/Python/ceval.c Tue Jun 22 03:51:38 2004 +0000 @@ -3502,15 +3502,23 @@ PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); if (flags & METH_NOARGS && na == 0) { +#ifdef WITH_C_PROF BEGIN_C_TRACE +#endif x = (*meth)(self, NULL); +#ifdef WITH_C_PROF END_C_TRACE +#endif } else if (flags & METH_O && na == 1) { PyObject *arg = EXT_POP(*pp_stack); +#ifdef WITH_C_PROF BEGIN_C_TRACE +#endif x = (*meth)(self, arg); +#ifdef WITH_C_PROF END_C_TRACE +#endif Py_DECREF(arg); } else { @@ -3521,7 +3529,9 @@ else { PyObject *callargs; callargs = load_args(pp_stack, na); +#ifdef WITH_C_PROF BEGIN_C_TRACE +#endif #ifdef WITH_TSC rdtscll(*pintr0); #endif @@ -3529,7 +3539,9 @@ #ifdef WITH_TSC rdtscll(*pintr1); #endif +#ifdef WITH_C_PROF END_C_TRACE +#endif Py_XDECREF(callargs); } } else {
