| 200 | } |
| 201 | |
| 202 | void record_py_backtrace() { |
| 203 | auto& context = Transformation::get_context(); |
| 204 | FrameInfoPtr info; |
| 205 | if (enable_py_bt) { |
| 206 | auto frame = PyEval_GetFrame(); |
| 207 | info = get_frameinfo_from_pyframe(frame); |
| 208 | } |
| 209 | context.bt = std::make_shared<BackTraceInfo>(std::move(info)); |
| 210 | context.record_bt_trans_id = context.next_transformation; |
| 211 | context.record_trans_bt = enable_trans_bt; |
| 212 | } |
| 213 | |
| 214 | void record_scope(PyFrameObject* frame, std::string scope) { |
| 215 | if (enable_py_bt) { |
no test coverage detected