You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2020/09/14 20:43:52 UTC
[incubator-nuttx] branch master updated: sched: Refine the comment
for SCHED_INSTRUMENTATION_EXTERNAL
This is an automated email from the ASF dual-hosted git repository.
davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 539a033 sched: Refine the comment for SCHED_INSTRUMENTATION_EXTERNAL
539a033 is described below
commit 539a0338dd3b3c5fcc25cefcbb0f7633397a7c33
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Sep 10 20:59:38 2020 -0700
sched: Refine the comment for SCHED_INSTRUMENTATION_EXTERNAL
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
sched/Kconfig | 11 ++++++++++-
sched/sched/Make.defs | 2 ++
sched/sched/sched_note.c | 2 --
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/sched/Kconfig b/sched/Kconfig
index 572d2ec..1ff8969 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -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"
diff --git a/sched/sched/Make.defs b/sched/sched/Make.defs
index 57546ac..21dd5cc 100644
--- a/sched/sched/Make.defs
+++ b/sched/sched/Make.defs
@@ -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
diff --git a/sched/sched/sched_note.c b/sched/sched/sched_note.c
index efbc57a..71425b0 100644
--- a/sched/sched/sched_note.c
+++ b/sched/sched/sched_note.c
@@ -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 *)¬e, sizeof(struct note_irqhandler_s));
}
#endif
-#endif /* CONFIG_SCHED_INSTRUMENTATION_EXTERNAL */