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:
parent
26a2e74897
commit
c7661eb981
13 changed files with 32 additions and 32 deletions
|
@ -55,7 +55,7 @@ struct init_stack_frame {
|
|||
|
||||
tNANO _NanoKernel = {0};
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
#define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs)
|
||||
#else
|
||||
#define TOOLS_SUPPORT_INIT(pCcs) \
|
||||
|
@ -63,7 +63,7 @@ tNANO _NanoKernel = {0};
|
|||
} while ((0))
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
/*
|
||||
* toolsSupportInit - initialize host-tools support when needed
|
||||
*
|
||||
|
@ -89,7 +89,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */
|
|||
_NanoKernel.contexts = pCcs;
|
||||
irq_unlock_inline(key);
|
||||
}
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
/*
|
||||
* _NewContext - initialize a new context (thread) from its stack space
|
||||
|
|
|
@ -184,7 +184,7 @@ struct s_CCS {
|
|||
#endif
|
||||
struct coop coopReg;
|
||||
struct preempt preempReg;
|
||||
#ifdef CONFIG_HOST_TOOLS_SUPPORT
|
||||
#ifdef CONFIG_CONTEXT_MONITOR
|
||||
struct s_CCS *activeLink; /* link to next context in the active list */
|
||||
#endif
|
||||
};
|
||||
|
@ -194,7 +194,7 @@ struct s_NANO {
|
|||
tCCS *task; /* current task the nanokernel knows about */
|
||||
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 */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ architecture.
|
|||
|
||||
tNANO _NanoKernel = {0};
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
#define TOOLS_SUPPORT_INIT(pCcs) toolsSupportInit(pCcs)
|
||||
#else
|
||||
#define TOOLS_SUPPORT_INIT(pCcs) \
|
||||
|
@ -52,7 +52,7 @@ tNANO _NanoKernel = {0};
|
|||
} while ((0))
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
/*******************************************************************************
|
||||
*
|
||||
* toolsSupportInit - initialize host-tools support when needed
|
||||
|
@ -79,7 +79,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */
|
|||
_NanoKernel.contexts = pCcs;
|
||||
irq_unlock(key);
|
||||
}
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
|
@ -134,7 +134,7 @@ struct s_CCS {
|
|||
#endif
|
||||
struct coop coopReg;
|
||||
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 */
|
||||
#endif
|
||||
};
|
||||
|
@ -145,7 +145,7 @@ struct s_NANO {
|
|||
tCCS *current; /* currently scheduled context (fiber or task) */
|
||||
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 */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ static void _NewContextInternal(
|
|||
|
||||
PRINTK("\ntCCS * = 0x%x", ccs);
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
{
|
||||
unsigned int imask;
|
||||
|
||||
|
@ -203,7 +203,7 @@ static void _NewContextInternal(
|
|||
_NanoKernel.contexts = ccs;
|
||||
irq_unlock(imask);
|
||||
}
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
|
|
|
@ -683,7 +683,7 @@ struct s_CCS {
|
|||
tCoopReg coopReg; /* non-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 */
|
||||
#endif
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
|
@ -737,7 +737,7 @@ typedef struct s_NANO {
|
|||
tCCS *fiber; /* singly linked list of runnable fiber contexts */
|
||||
tCCS *task; /* pointer to runnable task context */
|
||||
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 */
|
||||
#endif
|
||||
unsigned nested; /* nested interrupt count */
|
||||
|
|
|
@ -80,13 +80,13 @@ extern void _NanoEssentialContextSet(void);
|
|||
extern void _NanoEssentialContextClear(void);
|
||||
|
||||
/* 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);
|
||||
#else
|
||||
#define _context_exit(ccs) \
|
||||
do {/* nothing */ \
|
||||
} while (0)
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ ending the context, be it a task or a fiber.
|
|||
#include <nanocontextentry.h>
|
||||
#include <misc/printk.h>
|
||||
|
||||
#if defined(CONFIG_HOST_TOOLS_SUPPORT)
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
/*******************************************************************************
|
||||
*
|
||||
* _context_exit - context exit routine
|
||||
|
@ -85,7 +85,7 @@ void _context_exit(tCCS *pContext)
|
|||
pPrevContext->activeLink = pContext->activeLink;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
|
@ -136,10 +136,10 @@ $ nm offsets.o
|
|||
* 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)
|
||||
#else
|
||||
#define GEN_OFFSET_SYM_HOST(s, m)
|
||||
#endif /* CONFIG_HOST_TOOLS_SUPPORT */
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
#endif /* _GEN_OFFSET_H */
|
||||
|
|
|
@ -38,7 +38,7 @@ config GDB_INFO
|
|||
bool
|
||||
prompt "Task-aware debugging with GDB [EXPERIMENTAL]"
|
||||
default n
|
||||
depends on HOST_TOOLS_SUPPORT
|
||||
depends on CONTEXT_MONITOR
|
||||
help
|
||||
This option enables the kernel to collect additional information
|
||||
during interrupts, exceptions, and context switches. This information
|
||||
|
|
|
@ -93,6 +93,15 @@ config OBJECT_MONITOR
|
|||
This option instructs the kernel to record statistics about
|
||||
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
|
||||
bool
|
||||
prompt "Initialize stack areas"
|
||||
|
@ -126,12 +135,3 @@ config BOOT_TIME_MEASUREMENT
|
|||
executing, while __main_tsc records when main() begins executing,
|
||||
and __idle_tsc records when the CPU becomes idle. All values are
|
||||
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.
|
||||
|
|
|
@ -35,7 +35,7 @@ CONFIG_PRINTK=y
|
|||
#
|
||||
CONFIG_BOOT_TIME_MEASUREMENT=y
|
||||
CONFIG_CPU_CLOCK_FREQ_MHZ=20
|
||||
CONFIG_HOST_TOOLS_SUPPORT=y
|
||||
CONFIG_CONTEXT_MONITOR=y
|
||||
|
||||
#
|
||||
# Miscellaneous Kernel Options
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG_IRQ_VECTOR_TABLE_CUSTOM=y
|
||||
CONFIG_NUM_IRQS=3
|
||||
CONFIG_GDB_INFO=y
|
||||
CONFIG_HOST_TOOLS_SUPPORT=y
|
||||
CONFIG_CONTEXT_MONITOR=y
|
||||
CONFIG_COMPILER_OPT="-O0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue