aboutsummaryrefslogtreecommitdiff
path: root/src/target/cortex_m.h
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2017-09-08 10:49:30 +0000
committerPaul Fertser <fercerpav@gmail.com>2018-01-13 09:31:36 +0000
commit4e0371bf718c9eb3a862e3c9b113c95cd4c3a479 (patch)
treeb71a6a5c06fbe54b27142bb077958e3f72ef8b73 /src/target/cortex_m.h
parent64b0d5aac0c5214db01f938550e8b126891d5a08 (diff)
hla_target: allow non-intrusive profiling on cortex-m
Leverages the existing work that added profiling via DWT_PCSR. hla_target doesn't have direct access to the mem_ap for doing a bulk repeated read, but simply reading the DWT_PCSR register repeatedly is still ~2 order of magnitude faster than halt/resume. Change-Id: Ibe451aa95143694398370fdad6939cfb6191d56f Signed-off-by: Karl Palsson <karlp@tweak.net.au> Reviewed-on: http://openocd.zylin.com/4220 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target/cortex_m.h')
-rw-r--r--src/target/cortex_m.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h
index dbf9ac8a..9500acc1 100644
--- a/src/target/cortex_m.h
+++ b/src/target/cortex_m.h
@@ -213,5 +213,7 @@ void cortex_m_enable_breakpoints(struct target *target);
void cortex_m_enable_watchpoints(struct target *target);
void cortex_m_dwt_setup(struct cortex_m_common *cm, struct target *target);
void cortex_m_deinit_target(struct target *target);
+int cortex_m_profiling(struct target *target, uint32_t *samples,
+ uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds);
#endif /* OPENOCD_TARGET_CORTEX_M_H */