note: correct systime with perf count
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
55ce5d0511
commit
29a7d267fb
@ -223,8 +223,15 @@ static void note_common(FAR struct tcb_s *tcb,
|
|||||||
FAR struct note_common_s *note,
|
FAR struct note_common_s *note,
|
||||||
uint8_t length, uint8_t type)
|
uint8_t length, uint8_t type)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_PERFCOUNT
|
||||||
|
struct timespec perftime;
|
||||||
|
#endif
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_systime_timespec(&ts);
|
clock_systime_timespec(&ts);
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_PERFCOUNT
|
||||||
|
up_perf_convert(up_perf_gettime(), &perftime);
|
||||||
|
ts.tv_nsec = perftime.tv_nsec;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Save all of the common fields */
|
/* Save all of the common fields */
|
||||||
|
|
||||||
|
@ -973,6 +973,14 @@ config SCHED_INSTRUMENTATION_CPUSET
|
|||||||
---help---
|
---help---
|
||||||
Monitor only CPUs in the bitset. Bit 0=CPU0, Bit1=CPU1, etc.
|
Monitor only CPUs in the bitset. Bit 0=CPU0, Bit1=CPU1, etc.
|
||||||
|
|
||||||
|
config SCHED_INSTRUMENTATION_PERFCOUNT
|
||||||
|
bool "Use perf count for instrumentation"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Enabling this option will use perfcount as the clock source for tv_nsec
|
||||||
|
to achieve higher precision time.
|
||||||
|
This requires calling up_perf_init at system startup.
|
||||||
|
|
||||||
config SCHED_INSTRUMENTATION_FILTER
|
config SCHED_INSTRUMENTATION_FILTER
|
||||||
bool "Instrumentation filter"
|
bool "Instrumentation filter"
|
||||||
default n
|
default n
|
||||||
|
Loading…
x
Reference in New Issue
Block a user