drivers/segger: inline note_sysview_get_timestamp
Avoid another layer of function call to get time. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
48dd8bca58
commit
cef56fbdb6
|
@ -26,6 +26,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/clock.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -55,6 +56,16 @@
|
|||
|
||||
#define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE CONFIG_SEGGER_RTT_CPU_CACHE_LINE_SIZE
|
||||
|
||||
/****************************************************************************
|
||||
* Name: note_sysview_get_timestamp
|
||||
*
|
||||
* Description:
|
||||
* Retrieve a system timestamp for SYSVIEW events.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define note_sysview_get_timestamp() perf_gettime()
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
@ -72,8 +83,15 @@ extern "C"
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: note_sysview_get_interrupt_id
|
||||
*
|
||||
* Description:
|
||||
* Retrieve the Id of the currently active interrupt.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int note_sysview_get_interrupt_id(void);
|
||||
unsigned long note_sysview_get_timestamp(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -454,19 +454,6 @@ unsigned int note_sysview_get_interrupt_id(void)
|
|||
return g_note_sysview_driver.irq[this_cpu()];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: note_sysview_get_timestamp
|
||||
*
|
||||
* Description:
|
||||
* Retrieve a system timestamp for SYSVIEW events.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned long note_sysview_get_timestamp(void)
|
||||
{
|
||||
return perf_gettime();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: note_sysview_initialize
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue