summaryrefslogtreecommitdiff
path: root/py/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/profile.c')
-rw-r--r--py/profile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/profile.c b/py/profile.c
index 89af8640a..274089d70 100644
--- a/py/profile.c
+++ b/py/profile.c
@@ -31,6 +31,12 @@
#if MICROPY_PY_SYS_SETTRACE
+#if !MICROPY_PERSISTENT_CODE_SAVE
+// The settrace feature requires that we maintain additional metadata on the raw
+// code object which is normally only done when writing .mpy files.
+#error "MICROPY_PY_SYS_SETTRACE requires MICROPY_PERSISTENT_CODE_SAVE to be enabled"
+#endif
+
#define prof_trace_cb MP_STATE_THREAD(prof_trace_callback)
#define QSTR_MAP(context, idx) (context->constants.qstr_table[idx])