diff options
author | Fred Drake <fdrake@acm.org> | 2001-10-03 21:52:51 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-10-03 21:52:51 (GMT) |
commit | 6f3d82693ab9a4b0f4f366f7ead4e50cd8e4934e (patch) | |
tree | 803dcf6e9f01c4e09eb4d44fedeb9c9a8d1596ae /Doc | |
parent | 0099ba73de547ff6127928d8eeca1e276731a650 (diff) | |
download | cpython-6f3d82693ab9a4b0f4f366f7ead4e50cd8e4934e.zip cpython-6f3d82693ab9a4b0f4f366f7ead4e50cd8e4934e.tar.gz cpython-6f3d82693ab9a4b0f4f366f7ead4e50cd8e4934e.tar.bz2 |
Expand the documentation of the low-level tracing/profiling interface.
This reflects what is currently in CVS, which may change before 2.2 is final.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/api.tex | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex index 7858058..6549e86 100644 --- a/Doc/api/api.tex +++ b/Doc/api/api.tex @@ -5225,15 +5225,36 @@ previous versions. The type of the trace function registered using \cfunction{PyEval_SetProfile()} and \cfunction{PyEval_SetTrace()}. The first parameter is the object passed to the registration - function, + function as \var{obj}, \var{frame} is the frame object to which the + event pertains, \var{what} is one of the constants + \constant{PyTrace_CALL}, \constant{PyTrace_EXCEPT}, + \constant{PyTrace_LINE} or \constant{PyTrace_RETURN}, and \var{arg} + depends on the value of \var{what}: + + \begin{tableii}{l|l}{constant}{Value of \var{what}}{Meaning of \var{arg}} + \lineii{PyTrace_CALL}{Always \NULL.} + \lineii{PyTrace_EXCEPT}{Exception information as returned by + \function{sys.exc_info()}.} + \lineii{PyTrace_LINE}{Always \NULL.} + \lineii{PyTrace_RETURN}{Value being returned to the caller.} + \end{tableii} \end{ctypedesc} \begin{cvardesc}{int}{PyTrace_CALL} The value of the \var{what} parameter to a \ctype{Py_tracefunc} - function when a new function or method call is being reported. + function when a new call to a function or method is being reported, + or a new entry into a generator. Note that the creation of the + iterator for a generator function is not reported as there is no + control transfer to the Python bytecode in the corresponding frame. \end{cvardesc} \begin{cvardesc}{int}{PyTrace_EXCEPT} + The value of the \var{what} parameter to a \ctype{Py_tracefunc} + function when an exception has been raised by Python code as the + result of an operation. The operation may have explictly intended + to raise the operation (as with a \keyword{raise} statement), or may + have triggered an exception in the runtime as a result of the + specific operation. \end{cvardesc} \begin{cvardesc}{int}{PyTrace_LINE} |