sched: Refine the comment for SCHED_INSTRUMENTATION_EXTERNAL

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-09-10 20:59:38 -07:00 committed by David Sidrane
parent 027e2eed28
commit 539a0338dd
3 changed files with 12 additions and 3 deletions

View File

@ -920,7 +920,16 @@ config SCHED_INSTRUMENTATION_EXTERNAL
bool "System performance monitor endpoints are external"
default n
---help---
Monitor only CPUs in the bitset. Bit 0=CPU0, Bit1=CPU1, etc.
When this option is enabled, the board specific logic must implment all
callbacks listed in SCHED_INSTRUMENTATION, SCHED_INSTRUMENTATION_CSECTION,
SCHED_INSTRUMENTATION_SPINLOCKS, SCHED_INSTRUMENTATION_SYSCALL and
SCHED_INSTRUMENTATION_IRQHANDLER. Otherwise the common code will implement
these callbacks and packet the arguments into note_ struct. Then the board
-specific logic just need to implement one callback:
void sched_note_add(FAR const void *note, size_t notelen);
and send the data to the suitable transport hardware.
config SCHED_INSTRUMENTATION_CPUSET
hex "CPU bit set"

View File

@ -90,8 +90,10 @@ CSRCS += sched_thistask.c
endif
ifeq ($(CONFIG_SCHED_INSTRUMENTATION),y)
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_EXTERNAL),)
CSRCS += sched_note.c
endif
endif
ifeq ($(CONFIG_SCHED_CRITMONITOR),y)
CSRCS += sched_critmonitor.c

View File

@ -36,7 +36,6 @@
#include "sched/sched.h"
#if !defined(CONFIG_SCHED_INSTRUMENTATION_EXTERNAL)
/****************************************************************************
* Private Types
****************************************************************************/
@ -611,4 +610,3 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter)
note_add((FAR const uint8_t *)&note, sizeof(struct note_irqhandler_s));
}
#endif
#endif /* CONFIG_SCHED_INSTRUMENTATION_EXTERNAL */