|
@@ -337,7 +337,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx)
|
|
PyObject *ret = NULL;
|
|
PyObject *ret = NULL;
|
|
PyThreadState *pstate = NULL;
|
|
PyThreadState *pstate = NULL;
|
|
PyFrameObject *pframe = NULL;
|
|
PyFrameObject *pframe = NULL;
|
|
-#if PY_VERSION_HEX >= 0x03100000
|
|
|
|
|
|
+#if PY_VERSION_HEX >= 0x030B0000
|
|
PyCodeObject *pcode = NULL;
|
|
PyCodeObject *pcode = NULL;
|
|
#endif
|
|
#endif
|
|
struct timeval tvb = {0}, tve = {0};
|
|
struct timeval tvb = {0}, tve = {0};
|
|
@@ -363,7 +363,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx)
|
|
if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) {
|
|
if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) {
|
|
pstate = PyThreadState_GET();
|
|
pstate = PyThreadState_GET();
|
|
if (pstate != NULL) {
|
|
if (pstate != NULL) {
|
|
-#if PY_VERSION_HEX >= 0x03100000
|
|
|
|
|
|
+#if PY_VERSION_HEX >= 0x030B0000
|
|
pframe = PyThreadState_GetFrame(pstate);
|
|
pframe = PyThreadState_GetFrame(pstate);
|
|
if(pframe != NULL) {
|
|
if(pframe != NULL) {
|
|
pcode = PyFrame_GetCode(pframe);
|
|
pcode = PyFrame_GetCode(pframe);
|
|
@@ -373,7 +373,7 @@ PyObject *sr_apy_kemi_exec_func(PyObject *self, PyObject *args, int idx)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
-#if PY_VERSION_HEX >= 0x03100000
|
|
|
|
|
|
+#if PY_VERSION_HEX >= 0x030B0000
|
|
LOG(cfg_get(core, core_cfg, latency_log),
|
|
LOG(cfg_get(core, core_cfg, latency_log),
|
|
"alert - action KSR.%s%s%s(...)"
|
|
"alert - action KSR.%s%s%s(...)"
|
|
" took too long [%u ms] (file:%s func:%s line:%d)\n",
|
|
" took too long [%u ms] (file:%s func:%s line:%d)\n",
|