From bfec325aded112dbad1194494e53c11ef4713ae3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 7 Dec 2016 09:08:55 -0600 Subject: [PATCH] Add support for new scheduler instrumentation. --- system/sched_note/note_main.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/sched_note/note_main.c b/system/sched_note/note_main.c index 8bdd37194..c0dc6ea55 100644 --- a/system/sched_note/note_main.c +++ b/system/sched_note/note_main.c @@ -232,6 +232,46 @@ static void dump_notes(size_t nread) break; #ifdef CONFIG_SMP + case NOTE_CPU_START: + { + FAR struct note_cpu_start_s *note_start = + (FAR struct note_cpu_start_s *)note; + + if (note->nc_length != sizeof(struct note_cpu_start_s)) + { + syslog(LOG_INFO, + "ERROR: note size incorrect for CPU start note: %d\n", + note->nc_length); + return; + } + + syslog(LOG_INFO, + "%08lx: Task %u CPU%u requests CPU%u to start, priority %u\n", + (unsigned long)systime, (unsigned int)pid, + (unsigned int)note->nc_cpu, + (unsigned int)note_start->ncs_target, + (unsigned int)note->nc_priority); + } + break; + + case NOTE_CPU_STARTED: + { + if (note->nc_length != sizeof(struct note_cpu_started_s)) + { + syslog(LOG_INFO, + "ERROR: note size incorrect for CPU started note: %d\n", + note->nc_length); + return; + } + + syslog(LOG_INFO, + "%08lx: Task %u CPU%u has started, priority %u\n", + (unsigned long)systime, (unsigned int)pid, + (unsigned int)note->nc_cpu, + (unsigned int)note->nc_priority); + } + break; + case NOTE_CPU_PAUSE: { FAR struct note_cpu_pause_s *note_pause =