diff options
| author | Fred Drake <fdrake@acm.org> | 2001-07-03 23:39:52 +0000 |
|---|---|---|
| committer | Fred Drake <fdrake@acm.org> | 2001-07-03 23:39:52 +0000 |
| commit | cbc215a7e320407ce58cb7cdbce34ef36b3f9c8c (patch) | |
| tree | a516eba55ddf60edce62af0627ab608d3ac5965a /Python/pystate.c | |
| parent | 42190a85345e9be8bf9b0bfb47b2a0695b5ef704 (diff) | |
| download | cpython-cbc215a7e320407ce58cb7cdbce34ef36b3f9c8c.tar.gz | |
This change adjusts the profiling/tracing support so that the common
path (with no profile/trace function) through eval_code2() and
eval_frame() avoids several checks.
In the common cases of calls, returns, and exception propogation,
eval_code2() and eval_frame() used to test two values in the
thread-state: the profiling function and the tracing function. With
this change, a flag is set in the thread-state if either of these is
active, allowing a single check to suffice when both are NULL. This
also simplifies the code needed when either function is in use but is
already active (to avoid profiling/tracing the profiler/tracer); the
flag is set to 0 when the profile/trace code is entered, allowing the
same check to suffice for "already in the tracer" for call/return/
exception events.
Diffstat (limited to 'Python/pystate.c')
| -rw-r--r-- | Python/pystate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 192c4c14f6..cca1e7cdbe 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -109,6 +109,7 @@ PyThreadState_New(PyInterpreterState *interp) tstate->recursion_depth = 0; tstate->ticker = 0; tstate->tracing = 0; + tstate->use_tracing = 0; tstate->dict = NULL; |
