mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
sched/instrument: rename stack_record.c to stack_monitor.c
to align with gprof naming convention. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
set(SRCS instrument.c)
|
set(SRCS instrument.c)
|
||||||
|
|
||||||
if(NOT "${CONFIG_SCHED_STACK_RECORD}" STREQUAL "0")
|
if(NOT "${CONFIG_SCHED_STACK_RECORD}" STREQUAL "0")
|
||||||
list(APPEND SRCS stack_record.c)
|
list(APPEND SRCS stack_monitor.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SCHED_GPROF)
|
if(CONFIG_SCHED_GPROF)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
CSRCS += instrument.c
|
CSRCS += instrument.c
|
||||||
|
|
||||||
ifneq ($(CONFIG_SCHED_STACK_RECORD),0)
|
ifneq ($(CONFIG_SCHED_STACK_RECORD),0)
|
||||||
CSRCS += stack_record.c
|
CSRCS += stack_monitor.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SCHED_GPROF),y)
|
ifeq ($(CONFIG_SCHED_GPROF),y)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if CONFIG_SCHED_STACK_RECORD > 0
|
#if CONFIG_SCHED_STACK_RECORD > 0
|
||||||
extern struct instrument_s g_stack_record;
|
extern struct instrument_s g_stack_monitor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -55,6 +55,6 @@ extern struct instrument_s g_stack_record;
|
|||||||
void instrument_initialize(void)
|
void instrument_initialize(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_SCHED_STACK_RECORD > 0
|
#if CONFIG_SCHED_STACK_RECORD > 0
|
||||||
instrument_register(&g_stack_record);
|
instrument_register(&g_stack_monitor);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/instrument/stack_record.c
|
* sched/instrument/stack_monitor.c
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@@ -33,21 +33,21 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void stack_record_enter(FAR void *this_fn, FAR void *call_site,
|
static void stack_monitor_enter(FAR void *this_fn, FAR void *call_site,
|
||||||
FAR void *arg) noinstrument_function
|
FAR void *arg) noinstrument_function
|
||||||
nooptimiziation_function;
|
nooptimiziation_function;
|
||||||
static void stack_record_leave(FAR void *this_fn, FAR void *call_site,
|
static void stack_monitor_leave(FAR void *this_fn, FAR void *call_site,
|
||||||
FAR void *arg) noinstrument_function
|
FAR void *arg) noinstrument_function
|
||||||
nooptimiziation_function;
|
nooptimiziation_function;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
struct instrument_s g_stack_record =
|
struct instrument_s g_stack_monitor =
|
||||||
{
|
{
|
||||||
.enter = stack_record_enter,
|
.enter = stack_monitor_enter,
|
||||||
.leave = stack_record_leave
|
.leave = stack_monitor_leave
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -58,8 +58,8 @@ struct instrument_s g_stack_record =
|
|||||||
* Name: stack_statistics
|
* Name: stack_statistics
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void stack_record_enter(FAR void *this_fn, FAR void *call_site,
|
static void stack_monitor_enter(FAR void *this_fn, FAR void *call_site,
|
||||||
FAR void *arg)
|
FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tcb_s *tcb = running_task();
|
FAR struct tcb_s *tcb = running_task();
|
||||||
FAR void *sp = &tcb;
|
FAR void *sp = &tcb;
|
||||||
@@ -98,8 +98,8 @@ static void stack_record_enter(FAR void *this_fn, FAR void *call_site,
|
|||||||
* Name: stackrecord_leave
|
* Name: stackrecord_leave
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void stack_record_leave(FAR void *this_fn, FAR void *call_site,
|
static void stack_monitor_leave(FAR void *this_fn, FAR void *call_site,
|
||||||
FAR void *arg)
|
FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tcb_s *tcb = running_task();
|
FAR struct tcb_s *tcb = running_task();
|
||||||
FAR void *sp = &tcb;
|
FAR void *sp = &tcb;
|
||||||
Reference in New Issue
Block a user