• Home
  • Raw
  • Download

Lines Matching refs:tstate

86     PyThreadState *tstate = PyThreadState_Get();  in dump_tsc()  local
87 if (!tstate->interp->tscdump) in dump_tsc()
271 PyEval_AcquireThread(PyThreadState *tstate) in PyEval_AcquireThread() argument
273 if (tstate == NULL) in PyEval_AcquireThread()
278 if (PyThreadState_Swap(tstate) != NULL) in PyEval_AcquireThread()
284 PyEval_ReleaseThread(PyThreadState *tstate) in PyEval_ReleaseThread() argument
286 if (tstate == NULL) in PyEval_ReleaseThread()
288 if (PyThreadState_Swap(NULL) != tstate) in PyEval_ReleaseThread()
302 PyThreadState *tstate; in PyEval_ReInitThreads() local
317 tstate = PyThreadState_GET(); in PyEval_ReInitThreads()
318 threading = PyMapping_GetItemString(tstate->interp->modules, in PyEval_ReInitThreads()
341 PyThreadState *tstate = PyThreadState_Swap(NULL); in PyEval_SaveThread() local
342 if (tstate == NULL) in PyEval_SaveThread()
348 return tstate; in PyEval_SaveThread()
352 PyEval_RestoreThread(PyThreadState *tstate) in PyEval_RestoreThread() argument
354 if (tstate == NULL) in PyEval_RestoreThread()
363 PyThreadState_Swap(tstate); in PyEval_RestoreThread()
620 PyThreadState *tstate = PyThreadState_GET(); in _Py_CheckRecursiveCall() local
624 --tstate->recursion_depth; in _Py_CheckRecursiveCall()
629 if (tstate->recursion_depth > recursion_limit) { in _Py_CheckRecursiveCall()
630 --tstate->recursion_depth; in _Py_CheckRecursiveCall()
802 PyThreadState *tstate = PyThreadState_GET(); in PyEval_EvalFrameEx() local
976 tstate->frame = f; in PyEval_EvalFrameEx()
978 if (tstate->use_tracing) { in PyEval_EvalFrameEx()
979 if (tstate->c_tracefunc != NULL) { in PyEval_EvalFrameEx()
993 if (call_trace_protected(tstate->c_tracefunc, in PyEval_EvalFrameEx()
994 tstate->c_traceobj, in PyEval_EvalFrameEx()
1000 if (tstate->c_profilefunc != NULL) { in PyEval_EvalFrameEx()
1003 if (call_trace_protected(tstate->c_profilefunc, in PyEval_EvalFrameEx()
1004 tstate->c_profileobj, in PyEval_EvalFrameEx()
1093 tstate->tick_counter++; in PyEval_EvalFrameEx()
1113 if (PyThreadState_Swap(NULL) != tstate) in PyEval_EvalFrameEx()
1121 if (PyThreadState_Swap(tstate) != NULL) in PyEval_EvalFrameEx()
1126 if (tstate->async_exc != NULL) { in PyEval_EvalFrameEx()
1127 x = tstate->async_exc; in PyEval_EvalFrameEx()
1128 tstate->async_exc = NULL; in PyEval_EvalFrameEx()
1144 tstate->c_tracefunc != NULL && !tstate->tracing) { in PyEval_EvalFrameEx()
1149 err = maybe_call_line_trace(tstate->c_tracefunc, in PyEval_EvalFrameEx()
1150 tstate->c_traceobj, in PyEval_EvalFrameEx()
3196 if (tstate->c_tracefunc != NULL) in PyEval_EvalFrameEx()
3197 call_exc_trace(tstate->c_tracefunc, in PyEval_EvalFrameEx()
3198 tstate->c_traceobj, f); in PyEval_EvalFrameEx()
3253 set_exc_info(tstate, in PyEval_EvalFrameEx()
3295 if (tstate->use_tracing) { in PyEval_EvalFrameEx()
3296 if (tstate->c_tracefunc) { in PyEval_EvalFrameEx()
3298 if (call_trace(tstate->c_tracefunc, in PyEval_EvalFrameEx()
3299 tstate->c_traceobj, f, in PyEval_EvalFrameEx()
3307 call_trace_protected(tstate->c_tracefunc, in PyEval_EvalFrameEx()
3308 tstate->c_traceobj, f, in PyEval_EvalFrameEx()
3312 if (tstate->c_profilefunc) { in PyEval_EvalFrameEx()
3314 call_trace_protected(tstate->c_profilefunc, in PyEval_EvalFrameEx()
3315 tstate->c_profileobj, f, in PyEval_EvalFrameEx()
3317 else if (call_trace(tstate->c_profilefunc, in PyEval_EvalFrameEx()
3318 tstate->c_profileobj, f, in PyEval_EvalFrameEx()
3327 if (tstate->frame->f_exc_type != NULL) in PyEval_EvalFrameEx()
3328 reset_exc_info(tstate); in PyEval_EvalFrameEx()
3330 assert(tstate->frame->f_exc_value == NULL); in PyEval_EvalFrameEx()
3331 assert(tstate->frame->f_exc_traceback == NULL); in PyEval_EvalFrameEx()
3337 tstate->frame = f->f_back; in PyEval_EvalFrameEx()
3354 PyThreadState *tstate = PyThreadState_GET(); in PyEval_EvalCodeEx() local
3363 assert(tstate != NULL); in PyEval_EvalCodeEx()
3365 f = PyFrame_New(tstate, co, globals, locals); in PyEval_EvalCodeEx()
3593 assert(tstate != NULL); in PyEval_EvalCodeEx()
3594 ++tstate->recursion_depth; in PyEval_EvalCodeEx()
3596 --tstate->recursion_depth; in PyEval_EvalCodeEx()
3699 set_exc_info(PyThreadState *tstate, in set_exc_info() argument
3702 PyFrameObject *frame = tstate->frame; in set_exc_info()
3712 if (tstate->exc_type == NULL) { in set_exc_info()
3715 tstate->exc_type = Py_None; in set_exc_info()
3717 Py_INCREF(tstate->exc_type); in set_exc_info()
3718 Py_XINCREF(tstate->exc_value); in set_exc_info()
3719 Py_XINCREF(tstate->exc_traceback); in set_exc_info()
3720 frame->f_exc_type = tstate->exc_type; in set_exc_info()
3721 frame->f_exc_value = tstate->exc_value; in set_exc_info()
3722 frame->f_exc_traceback = tstate->exc_traceback; in set_exc_info()
3725 tmp_type = tstate->exc_type; in set_exc_info()
3726 tmp_value = tstate->exc_value; in set_exc_info()
3727 tmp_tb = tstate->exc_traceback; in set_exc_info()
3731 tstate->exc_type = type; in set_exc_info()
3732 tstate->exc_value = value; in set_exc_info()
3733 tstate->exc_traceback = tb; in set_exc_info()
3744 reset_exc_info(PyThreadState *tstate) in reset_exc_info() argument
3752 assert(tstate != NULL); in reset_exc_info()
3753 frame = tstate->frame; in reset_exc_info()
3758 tmp_type = tstate->exc_type; in reset_exc_info()
3759 tmp_value = tstate->exc_value; in reset_exc_info()
3760 tmp_tb = tstate->exc_traceback; in reset_exc_info()
3764 tstate->exc_type = frame->f_exc_type; in reset_exc_info()
3765 tstate->exc_value = frame->f_exc_value; in reset_exc_info()
3766 tstate->exc_traceback = frame->f_exc_traceback; in reset_exc_info()
3795 PyThreadState *tstate = PyThreadState_GET(); in do_raise() local
3796 type = tstate->exc_type == NULL ? Py_None : tstate->exc_type; in do_raise()
3797 value = tstate->exc_value; in do_raise()
3798 tb = tstate->exc_traceback; in do_raise()
4017 register PyThreadState *tstate = frame->f_tstate; in call_trace() local
4019 if (tstate->tracing) in call_trace()
4021 tstate->tracing++; in call_trace()
4022 tstate->use_tracing = 0; in call_trace()
4024 tstate->use_tracing = ((tstate->c_tracefunc != NULL) in call_trace()
4025 || (tstate->c_profilefunc != NULL)); in call_trace()
4026 tstate->tracing--; in call_trace()
4034 PyThreadState *tstate = frame->f_tstate; in _PyEval_CallTracing() local
4035 int save_tracing = tstate->tracing; in _PyEval_CallTracing()
4036 int save_use_tracing = tstate->use_tracing; in _PyEval_CallTracing()
4039 tstate->tracing = 0; in _PyEval_CallTracing()
4040 tstate->use_tracing = ((tstate->c_tracefunc != NULL) in _PyEval_CallTracing()
4041 || (tstate->c_profilefunc != NULL)); in _PyEval_CallTracing()
4043 tstate->tracing = save_tracing; in _PyEval_CallTracing()
4044 tstate->use_tracing = save_use_tracing; in _PyEval_CallTracing()
4081 PyThreadState *tstate = PyThreadState_GET(); in PyEval_SetProfile() local
4082 PyObject *temp = tstate->c_profileobj; in PyEval_SetProfile()
4084 tstate->c_profilefunc = NULL; in PyEval_SetProfile()
4085 tstate->c_profileobj = NULL; in PyEval_SetProfile()
4087 tstate->use_tracing = tstate->c_tracefunc != NULL; in PyEval_SetProfile()
4089 tstate->c_profilefunc = func; in PyEval_SetProfile()
4090 tstate->c_profileobj = arg; in PyEval_SetProfile()
4092 tstate->use_tracing = (func != NULL) || (tstate->c_tracefunc != NULL); in PyEval_SetProfile()
4098 PyThreadState *tstate = PyThreadState_GET(); in PyEval_SetTrace() local
4099 PyObject *temp = tstate->c_traceobj; in PyEval_SetTrace()
4100 _Py_TracingPossible += (func != NULL) - (tstate->c_tracefunc != NULL); in PyEval_SetTrace()
4102 tstate->c_tracefunc = NULL; in PyEval_SetTrace()
4103 tstate->c_traceobj = NULL; in PyEval_SetTrace()
4105 tstate->use_tracing = tstate->c_profilefunc != NULL; in PyEval_SetTrace()
4107 tstate->c_tracefunc = func; in PyEval_SetTrace()
4108 tstate->c_traceobj = arg; in PyEval_SetTrace()
4110 tstate->use_tracing = ((func != NULL) in PyEval_SetTrace()
4111 || (tstate->c_profilefunc != NULL)); in PyEval_SetTrace()
4147 PyThreadState *tstate = PyThreadState_GET(); in PyEval_GetFrame() local
4148 return _PyThreadState_GetFrame(tstate); in PyEval_GetFrame()
4279 if (tstate->use_tracing && tstate->c_profilefunc) { \
4280 if (call_trace(tstate->c_profilefunc, \
4281 tstate->c_profileobj, \
4282 tstate->frame, PyTrace_C_CALL, \
4288 if (tstate->c_profilefunc != NULL) { \
4290 call_trace_protected(tstate->c_profilefunc, \
4291 tstate->c_profileobj, \
4292 tstate->frame, PyTrace_C_EXCEPTION, \
4296 if (call_trace(tstate->c_profilefunc, \
4297 tstate->c_profileobj, \
4298 tstate->frame, PyTrace_C_RETURN, \
4329 PyThreadState *tstate = PyThreadState_GET(); in call_function() local
4415 PyThreadState *tstate = PyThreadState_GET(); in fast_function() local
4425 assert(tstate != NULL); in fast_function()
4426 f = PyFrame_New(tstate, co, globals, NULL); in fast_function()
4438 ++tstate->recursion_depth; in fast_function()
4440 --tstate->recursion_depth; in fast_function()
4565 PyThreadState *tstate = PyThreadState_GET(); in do_call() local
4662 PyThreadState *tstate = PyThreadState_GET(); in ext_do_call() local