mirror of https://github.com/thesofproject/sof.git
telemetry: add abstraction to time measurement
Adds abstract function to change time source for performance measurement via config. Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
This commit is contained in:
parent
9d1177acf4
commit
3cce247d84
|
@ -7,6 +7,9 @@
|
|||
#define __SOF_TELEMETRY_H__
|
||||
|
||||
#include <ipc4/base_fw.h>
|
||||
#ifdef __ZEPHYR__
|
||||
#include <zephyr/timing/timing.h>
|
||||
#endif
|
||||
|
||||
/* Slot in memory window 2 (Debug Window) to be used as telemetry slot */
|
||||
#define SOF_DW_TELEMETRY_SLOT 1
|
||||
|
@ -85,4 +88,10 @@ struct telemetry_perf_queue {
|
|||
|
||||
void telemetry_update(uint32_t begin_ccount, uint32_t current_ccount);
|
||||
|
||||
#ifdef CONFIG_TIMING_FUNCTIONS
|
||||
#define telemetry_timestamp timing_counter_get
|
||||
#else
|
||||
#define telemetry_timestamp sof_cycle_get_64
|
||||
#endif
|
||||
|
||||
#endif /*__SOF_TELEMETRY_H__ */
|
||||
|
|
Loading…
Reference in New Issue