7#ifndef BH_DMFW_APP_JTAG_UGLY_SRC_JTAG_PROFILE_FUNCTIONS_H_
8#define BH_DMFW_APP_JTAG_UGLY_SRC_JTAG_PROFILE_FUNCTIONS_H_
16#ifdef CONFIG_JTAG_PROFILE_FUNCTIONS
18#define CYCLES_ENTRY() \
19 static struct cycle_cnt __cnt; \
24 __cyc = k_cycle_get_32(); \
28#define CYCLES_EXIT() \
31 __cnt.func = __func__; \
32 __cnt.cycles = k_cycle_get_32() - __cyc; \
33 __cnt.io_ops = io_ops - __ops; \
34 printk("%s(): %d: finished in %u ms (%u cycles), %u " \
37 __cnt.cycles / (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 1000), \
38 __cnt.cycles, __cnt.io_ops); \
48#define IO_OPS_INC() io_ops++
Definition jtag_profile_functions.h:58
uint32_t io_ops
Definition jtag_profile_functions.h:61
const char * func
Definition jtag_profile_functions.h:59
uint32_t cycles
Definition jtag_profile_functions.h:60