mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
py/profile: Add debugging for sys.settrace feature.
This commit is contained in:
committed by
Damien George
parent
498e35219e
commit
b295df4b08
10
py/profile.h
10
py/profile.h
@@ -65,5 +65,15 @@ mp_obj_t mp_prof_frame_update(const mp_code_state_t *code_state);
|
||||
// For every VM instruction tick this function deduces events from the state
|
||||
mp_obj_t mp_prof_instr_tick(mp_code_state_t *code_state, bool is_exception);
|
||||
|
||||
// This section is for debugging the settrace feature itself, and is not intended
|
||||
// to be included in production/release builds.
|
||||
#define MICROPY_PROF_INSTR_DEBUG_PRINT_ENABLE 0
|
||||
#if MICROPY_PROF_INSTR_DEBUG_PRINT_ENABLE
|
||||
void mp_prof_print_instr(const byte* ip, mp_code_state_t *code_state);
|
||||
#define MP_PROF_INSTR_DEBUG_PRINT(current_ip) mp_prof_print_instr((current_ip), code_state)
|
||||
#else
|
||||
#define MP_PROF_INSTR_DEBUG_PRINT(current_ip)
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_PY_SYS_SETTRACE
|
||||
#endif // MICROPY_INCLUDED_PY_PROFILING_H
|
||||
|
||||
Reference in New Issue
Block a user