From 55ce5d0511e4c927beb63a96af330e8581de7457 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Thu, 23 Feb 2023 16:31:02 +0800 Subject: [PATCH] note: remove SCHED_INSTRUMENTATION_HIRES Signed-off-by: yinshengkai --- Documentation/guides/tasktraceuser.rst | 4 ---- drivers/note/note_driver.c | 12 ------------ include/nuttx/sched_note.h | 13 +++++++------ sched/Kconfig | 6 ------ 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/Documentation/guides/tasktraceuser.rst b/Documentation/guides/tasktraceuser.rst index d5495fdc50..375d7d0e4a 100644 --- a/Documentation/guides/tasktraceuser.rst +++ b/Documentation/guides/tasktraceuser.rst @@ -42,10 +42,6 @@ The following configurations are configurable parameters for trace. - Bit 2 = Enable IRQ instrumentation - Bit 3 = Enable collecting syscall arguments -- ``CONFIG_SCHED_INSTRUMENTATION_HIRES`` - - - If enabled, use higher resolution system timer for instrumentation. - - ``CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE`` - Specify the task name buffer size in bytes. diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c index 4594452572..fd3181e5f7 100644 --- a/drivers/note/note_driver.c +++ b/drivers/note/note_driver.c @@ -223,13 +223,8 @@ static void note_common(FAR struct tcb_s *tcb, FAR struct note_common_s *note, uint8_t length, uint8_t type) { -#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES struct timespec ts; - clock_systime_timespec(&ts); -#else - clock_t systime = clock_systime_ticks(); -#endif /* Save all of the common fields */ @@ -240,15 +235,8 @@ static void note_common(FAR struct tcb_s *tcb, note->nc_cpu = tcb->cpu; #endif sched_note_flatten(note->nc_pid, &tcb->pid, sizeof(tcb->pid)); - -#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES sched_note_flatten(note->nc_systime_nsec, &ts.tv_nsec, sizeof(ts.tv_nsec)); sched_note_flatten(note->nc_systime_sec, &ts.tv_sec, sizeof(ts.tv_sec)); -#else - /* Save the LS 32-bits of the system timer in little endian order */ - - sched_note_flatten(note->nc_systime, &systime, sizeof(systime)); -#endif } /**************************************************************************** diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h index 7a79e54423..9be8a950ba 100644 --- a/include/nuttx/sched_note.h +++ b/include/nuttx/sched_note.h @@ -217,12 +217,13 @@ struct note_common_s #endif uint8_t nc_pid[sizeof(pid_t)]; /* ID of the thread/task */ -#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES - uint8_t nc_systime_sec[sizeof(time_t)]; /* Time when note was buffered (sec) */ - uint8_t nc_systime_nsec[sizeof(long)]; /* Time when note was buffered (nsec) */ -#else - uint8_t nc_systime[sizeof(clock_t)]; /* Time when note was buffered */ -#endif + /* Time when note was buffered (sec) */ + + uint8_t nc_systime_sec[sizeof(time_t)]; + + /* Time when note was buffered (nsec) */ + + uint8_t nc_systime_nsec[sizeof(long)]; }; /* This is the specific form of the NOTE_START note */ diff --git a/sched/Kconfig b/sched/Kconfig index b274e6d8c0..cb90fca2a8 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -973,12 +973,6 @@ config SCHED_INSTRUMENTATION_CPUSET ---help--- Monitor only CPUs in the bitset. Bit 0=CPU0, Bit1=CPU1, etc. -config SCHED_INSTRUMENTATION_HIRES - bool "Use Hi-Res RTC for instrumentation" - default n - ---help--- - Use higher resolution system timer for instrumentation. - config SCHED_INSTRUMENTATION_FILTER bool "Instrumentation filter" default n