[Python-checkins] CVS: python/dist/src/Include pystate.h,2.15,2.16

Fred L. Drake fdrake@users.sourceforge.net
2001年7月03日 16:39:54 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv21594/Include
Modified Files:
	pystate.h 
Log Message:
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.
Index: pystate.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -r2.15 -r2.16
*** pystate.h	2001年06月27日 19:18:03	2.15
--- pystate.h	2001年07月03日 23:39:52	2.16
***************
*** 50,53 ****
--- 50,54 ----
 int ticker;
 int tracing;
+ int use_tracing;
 
 Py_tracefunc c_profilefunc;

AltStyle によって変換されたページ (->オリジナル) /