Transform HOST_TOOLS_SUPPORT config option to CONTEXT_MONITOR

Revises this option to make its purpose clearer, and to align it
with other experimantal monitoring-type configuration options.

Change-Id: I593bb7560b5a0544eb05affaa07b59dd78ea907e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-04-23 12:30:50 -04:00 committed by Anas Nashif
commit c7661eb981
13 changed files with 32 additions and 32 deletions

View file

@ -55,7 +55,7 @@ struct init_stack_frame {
tNANO _NanoKernel = {0}; tNANO _NanoKernel = {0};
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
#define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs) #define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs)
#else #else
#define TOOLS_SUPPORT_INIT(pCcs) \ #define TOOLS_SUPPORT_INIT(pCcs) \
@ -63,7 +63,7 @@ tNANO _NanoKernel = {0};
} while ((0)) } while ((0))
#endif #endif
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
/* /*
* toolsSupportInit - initialize host-tools support when needed * toolsSupportInit - initialize host-tools support when needed
* *
@ -89,7 +89,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */
_NanoKernel.contexts = pCcs; _NanoKernel.contexts = pCcs;
irq_unlock_inline(key); irq_unlock_inline(key);
} }
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
/* /*
* _NewContext - initialize a new context (thread) from its stack space * _NewContext - initialize a new context (thread) from its stack space

View file

@ -184,7 +184,7 @@ struct s_CCS {
#endif #endif
struct coop coopReg; struct coop coopReg;
struct preempt preempReg; struct preempt preempReg;
#ifdef CONFIG_HOST_TOOLS_SUPPORT #ifdef CONFIG_CONTEXT_MONITOR
struct s_CCS *activeLink; /* link to next context in the active list */ struct s_CCS *activeLink; /* link to next context in the active list */
#endif #endif
}; };
@ -194,7 +194,7 @@ struct s_NANO {
tCCS *task; /* current task the nanokernel knows about */ tCCS *task; /* current task the nanokernel knows about */
tCCS *current; /* currently scheduled context (fiber or task) */ tCCS *current; /* currently scheduled context (fiber or task) */
#ifdef CONFIG_HOST_TOOLS_SUPPORT #ifdef CONFIG_CONTEXT_MONITOR
tCCS *contexts; /* singly linked list of ALL fiber+tasks */ tCCS *contexts; /* singly linked list of ALL fiber+tasks */
#endif #endif

View file

@ -44,7 +44,7 @@ architecture.
tNANO _NanoKernel = {0}; tNANO _NanoKernel = {0};
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
#define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs) #define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs)
#else #else
#define TOOLS_SUPPORT_INIT(pCcs) \ #define TOOLS_SUPPORT_INIT(pCcs) \
@ -52,7 +52,7 @@ tNANO _NanoKernel = {0};
} while ((0)) } while ((0))
#endif #endif
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
/******************************************************************************* /*******************************************************************************
* *
* toolsSupportInit - initialize host-tools support when needed * toolsSupportInit - initialize host-tools support when needed
@ -79,7 +79,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */
_NanoKernel.contexts = pCcs; _NanoKernel.contexts = pCcs;
irq_unlock(key); irq_unlock(key);
} }
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
/******************************************************************************* /*******************************************************************************
* *

View file

@ -134,7 +134,7 @@ struct s_CCS {
#endif #endif
struct coop coopReg; struct coop coopReg;
struct preempt preempReg; struct preempt preempReg;
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
struct s_CCS *activeLink; /* link to next context in the active list */ struct s_CCS *activeLink; /* link to next context in the active list */
#endif #endif
}; };
@ -145,7 +145,7 @@ struct s_NANO {
tCCS *current; /* currently scheduled context (fiber or task) */ tCCS *current; /* currently scheduled context (fiber or task) */
int flags; /* tCCS->flags of 'current' context */ int flags; /* tCCS->flags of 'current' context */
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
tCCS *contexts; /* singly linked list of ALL fiber+tasks */ tCCS *contexts; /* singly linked list of ALL fiber+tasks */
#endif #endif

View file

@ -185,7 +185,7 @@ static void _NewContextInternal(
PRINTK("\ntCCS * = 0x%x", ccs); PRINTK("\ntCCS * = 0x%x", ccs);
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
{ {
unsigned int imask; unsigned int imask;
@ -203,7 +203,7 @@ static void _NewContextInternal(
_NanoKernel.contexts = ccs; _NanoKernel.contexts = ccs;
irq_unlock(imask); irq_unlock(imask);
} }
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
} }
#ifdef CONFIG_GDB_INFO #ifdef CONFIG_GDB_INFO

View file

@ -683,7 +683,7 @@ struct s_CCS {
tCoopReg coopReg; /* non-volatile integer register storage */ tCoopReg coopReg; /* non-volatile integer register storage */
tPreempReg preempReg; /* volatile integer register storage */ tPreempReg preempReg; /* volatile integer register storage */
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
struct s_CCS *activeLink; /* link to next context in the active list */ struct s_CCS *activeLink; /* link to next context in the active list */
#endif #endif
#ifdef CONFIG_GDB_INFO #ifdef CONFIG_GDB_INFO
@ -737,7 +737,7 @@ typedef struct s_NANO {
tCCS *fiber; /* singly linked list of runnable fiber contexts */ tCCS *fiber; /* singly linked list of runnable fiber contexts */
tCCS *task; /* pointer to runnable task context */ tCCS *task; /* pointer to runnable task context */
tCCS *current; /* currently scheduled context (fiber or task) */ tCCS *current; /* currently scheduled context (fiber or task) */
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
tCCS *contexts; /* singly linked list of ALL fiber+tasks */ tCCS *contexts; /* singly linked list of ALL fiber+tasks */
#endif #endif
unsigned nested; /* nested interrupt count */ unsigned nested; /* nested interrupt count */

View file

@ -80,13 +80,13 @@ extern void _NanoEssentialContextSet(void);
extern void _NanoEssentialContextClear(void); extern void _NanoEssentialContextClear(void);
/* Private API to clean up when a context is aborted */ /* Private API to clean up when a context is aborted */
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
extern void _context_exit(tCCS *ccs); extern void _context_exit(tCCS *ccs);
#else #else
#define _context_exit(ccs) \ #define _context_exit(ccs) \
do {/* nothing */ \ do {/* nothing */ \
} while (0) } while (0)
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -48,7 +48,7 @@ ending the context, be it a task or a fiber.
#include <nanocontextentry.h> #include <nanocontextentry.h>
#include <misc/printk.h> #include <misc/printk.h>
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
/******************************************************************************* /*******************************************************************************
* *
* _context_exit - context exit routine * _context_exit - context exit routine
@ -85,7 +85,7 @@ void _context_exit(tCCS *pContext)
pPrevContext->activeLink = pContext->activeLink; pPrevContext->activeLink = pContext->activeLink;
} }
} }
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
/******************************************************************************* /*******************************************************************************
* *

View file

@ -136,10 +136,10 @@ $ nm offsets.o
* within an existing structure) requires consultation. * within an existing structure) requires consultation.
*/ */
#if defined(CONFIG_HOST_TOOLS_SUPPORT) #if defined(CONFIG_CONTEXT_MONITOR)
#define GEN_OFFSET_SYM_HOST(s, m) GEN_OFFSET_SYM(s, m) #define GEN_OFFSET_SYM_HOST(s, m) GEN_OFFSET_SYM(s, m)
#else #else
#define GEN_OFFSET_SYM_HOST(s, m) #define GEN_OFFSET_SYM_HOST(s, m)
#endif /* CONFIG_HOST_TOOLS_SUPPORT */ #endif /* CONFIG_CONTEXT_MONITOR */
#endif /* _GEN_OFFSET_H */ #endif /* _GEN_OFFSET_H */

View file

@ -38,7 +38,7 @@ config GDB_INFO
bool bool
prompt "Task-aware debugging with GDB [EXPERIMENTAL]" prompt "Task-aware debugging with GDB [EXPERIMENTAL]"
default n default n
depends on HOST_TOOLS_SUPPORT depends on CONTEXT_MONITOR
help help
This option enables the kernel to collect additional information This option enables the kernel to collect additional information
during interrupts, exceptions, and context switches. This information during interrupts, exceptions, and context switches. This information

View file

@ -93,6 +93,15 @@ config OBJECT_MONITOR
This option instructs the kernel to record statistics about This option instructs the kernel to record statistics about
microkernel object usage. microkernel object usage.
config CONTEXT_MONITOR
bool
prompt "Task and fiber monitoring [EXPERIMENTAL]"
default n
help
This option instructs the kernel to maintain a list of all tasks
and fibers (excluding those that have not yet started or have
already terminated).
config INIT_STACKS config INIT_STACKS
bool bool
prompt "Initialize stack areas" prompt "Initialize stack areas"
@ -126,12 +135,3 @@ config BOOT_TIME_MEASUREMENT
executing, while __main_tsc records when main() begins executing, executing, while __main_tsc records when main() begins executing,
and __idle_tsc records when the CPU becomes idle. All values are and __idle_tsc records when the CPU becomes idle. All values are
recorded in terms of CPU clock cycles since system reset. recorded in terms of CPU clock cycles since system reset.
config HOST_TOOLS_SUPPORT
bool
prompt "Host tools support [EXPERIMENTAL]"
default n
help
This option allows the kernel to interact with VxMicro host tools.
These tools allow users to monitor the behavior of the target system,
as well to debug it.

View file

@ -35,7 +35,7 @@ CONFIG_PRINTK=y
# #
CONFIG_BOOT_TIME_MEASUREMENT=y CONFIG_BOOT_TIME_MEASUREMENT=y
CONFIG_CPU_CLOCK_FREQ_MHZ=20 CONFIG_CPU_CLOCK_FREQ_MHZ=20
CONFIG_HOST_TOOLS_SUPPORT=y CONFIG_CONTEXT_MONITOR=y
# #
# Miscellaneous Kernel Options # Miscellaneous Kernel Options

View file

@ -1,5 +1,5 @@
CONFIG_IRQ_VECTOR_TABLE_CUSTOM=y CONFIG_IRQ_VECTOR_TABLE_CUSTOM=y
CONFIG_NUM_IRQS=3 CONFIG_NUM_IRQS=3
CONFIG_GDB_INFO=y CONFIG_GDB_INFO=y
CONFIG_HOST_TOOLS_SUPPORT=y CONFIG_CONTEXT_MONITOR=y
CONFIG_COMPILER_OPT="-O0" CONFIG_COMPILER_OPT="-O0"