Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
GH-98894: Fixfunction__return
andfunction__entry
dTrace probe missing afterGH-103083
#125019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes from1 commit
f11b7c4
ac683c0
b4d457f
4810510
128e856
e98e3a2
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
function__return
andfunction__entry
dTrace probe missing aft……er `GH-103083`
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fix `function__return` and `function__entry` dTrace probe missing after | ||
`GH-103083` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -275,6 +275,8 @@ static void monitor_throw(PyThreadState *tstate, | ||
_Py_CODEUNIT *instr); | ||
static int get_exception_handler(PyCodeObject *, int, int*, int*, int*); | ||
static void dtrace_function_entry(_PyInterpreterFrame *); | ||
static void dtrace_function_return(_PyInterpreterFrame *); | ||
static _PyInterpreterFrame * | ||
_PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func, | ||
PyObject *locals, Py_ssize_t nargs, PyObject *callargs, PyObject *kwargs, _PyInterpreterFrame *previous); | ||
@@ -820,9 +822,9 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int | ||
_Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); | ||
monitor_throw(tstate, frame, frame->instr_ptr); | ||
/* TO DO -- Monitor throw entry. */ | ||
DTRACE_FUNCTION_ENTRY(); | ||
goto resume_with_error; | ||
} | ||
Zheaoli marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
/* Local "register" variables. | ||
* These are cached values from the frame and code object. */ | ||
_Py_CODEUNIT *next_instr; | ||
@@ -840,6 +842,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int | ||
} | ||
next_instr = frame->instr_ptr; | ||
DTRACE_FUNCTION_ENTRY(); | ||
resume_frame: | ||
stack_pointer = _PyFrame_GetStackPointer(frame); | ||
@@ -3068,6 +3071,37 @@ PyUnstable_Eval_RequestCodeExtraIndex(freefunc free) | ||
return new_index; | ||
} | ||
static void | ||
dtrace_function_entry(_PyInterpreterFrame *frame) | ||
{ | ||
const char *filename; | ||
const char *funcname; | ||
int lineno; | ||
PyCodeObject *code = _PyFrame_GetCode(frame); | ||
filename = PyUnicode_AsUTF8(code->co_filename); | ||
funcname = PyUnicode_AsUTF8(code->co_name); | ||
lineno = PyUnstable_InterpreterFrame_GetLine(frame); | ||
PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno); | ||
picnixz marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
} | ||
static void | ||
dtrace_function_return(_PyInterpreterFrame *frame) | ||
{ | ||
const char *filename; | ||
const char *funcname; | ||
int lineno; | ||
PyCodeObject *code = _PyFrame_GetCode(frame); | ||
filename = PyUnicode_AsUTF8(code->co_filename); | ||
funcname = PyUnicode_AsUTF8(code->co_name); | ||
lineno = PyUnstable_InterpreterFrame_GetLine(frame); | ||
PyDTrace_FUNCTION_RETURN(filename, funcname, lineno); | ||
picnixz marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
} | ||
/* Implement Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() as functions | ||
for the limited API. */ | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.