1
0
Fork 0
forked from nuttx/nuttx-update

note: remove SCHED_INSTRUMENTATION_HIRES

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-02-23 16:31:02 +08:00 committed by Xiang Xiao
parent 8b4ecac6c2
commit 55ce5d0511
4 changed files with 7 additions and 28 deletions

View file

@ -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.

View file

@ -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
}
/****************************************************************************

View file

@ -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 */

View file

@ -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