@@ -5225,15 +5225,36 @@ \section{Profiling and Tracing \label{profiling}}
52255225 The type of the trace function registered using
52265226 \cfunction {PyEval_SetProfile()} and \cfunction {PyEval_SetTrace()}.
52275227 The first parameter is the object passed to the registration
5228- function,
5228+ function as \var {obj}, \var {frame} is the frame object to which the
5229+ event pertains, \var {what} is one of the constants
5230+ \constant {PyTrace_CALL}, \constant {PyTrace_EXCEPT},
5231+ \constant {PyTrace_LINE} or \constant {PyTrace_RETURN}, and \var {arg}
5232+ depends on the value of \var {what}:
5233+
5234+ \begin {tableii }{l|l}{constant}{Value of \var {what}}{Meaning of \var {arg}}
5235+ \lineii {PyTrace_CALL}{Always \NULL .}
5236+ \lineii {PyTrace_EXCEPT}{Exception information as returned by
5237+ \function {sys.exc_info()}.}
5238+ \lineii {PyTrace_LINE}{Always \NULL .}
5239+ \lineii {PyTrace_RETURN}{Value being returned to the caller.}
5240+ \end {tableii }
52295241\end {ctypedesc }
52305242
52315243\begin {cvardesc }{int}{PyTrace_CALL}
52325244 The value of the \var {what} parameter to a \ctype {Py_tracefunc}
5233- function when a new function or method call is being reported.
5245+ function when a new call to a function or method is being reported,
5246+ or a new entry into a generator. Note that the creation of the
5247+ iterator for a generator function is not reported as there is no
5248+ control transfer to the Python bytecode in the corresponding frame.
52345249\end {cvardesc }
52355250
52365251\begin {cvardesc }{int}{PyTrace_EXCEPT}
5252+ The value of the \var {what} parameter to a \ctype {Py_tracefunc}
5253+ function when an exception has been raised by Python code as the
5254+ result of an operation. The operation may have explictly intended
5255+ to raise the operation (as with a \keyword {raise} statement), or may
5256+ have triggered an exception in the runtime as a result of the
5257+ specific operation.
52375258\end {cvardesc }
52385259
52395260\begin {cvardesc }{int}{PyTrace_LINE}
0 commit comments