cortex_m: add profiling function