| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b8d6799 commit f9cf3db
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -801,6 +801,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int | |||
| 801 | 801 | } | |
| 802 | 802 | if (_PyOpcode_Caches[original_opcode]) { | |
| 803 | 803 | _PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr+1); | |
| 804 | + /* Prevent the underlying instruction from specializing | ||
| 805 | + * and overwriting the instrumentation. */ | ||
| 804 | 806 | INCREMENT_ADAPTIVE_COUNTER(cache->counter); | |
| 805 | 807 | } | |
| 806 | 808 | opcode = original_opcode; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1108,6 +1108,9 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame, | |||
| 1108 | 1108 | int prev_line = _Py_Instrumentation_GetLine(code, prev_index); | |
| 1109 | 1109 | if (prev_line == line) { | |
| 1110 | 1110 | int prev_opcode = _PyCode_CODE(code)[prev_index].op.code; | |
| 1111 | + /* RESUME and INSTRUMENTED_RESUME are needed for the operation of | ||
| 1112 | + * instrumentation, so must never be hidden by an INSTRUMENTED_LINE. | ||
| 1113 | + */ | ||
| 1111 | 1114 | if (prev_opcode != RESUME && prev_opcode != INSTRUMENTED_RESUME) { | |
| 1112 | 1115 | goto done; | |
| 1113 | 1116 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments