Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: remove CONFIG_ENABLE_STACKMONITOR dependency from kernel #6693

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion os/include/tinyara/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#include <mqueue.h>
#include <time.h>

#if defined(CONFIG_ENABLE_STACKMONITOR) && defined(CONFIG_DEBUG)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to have separate config for the stack monitor.

#ifdef CONFIG_DEBUG
#include <tinyara/clock.h>
#ifdef CONFIG_DEBUG_MM_HEAPINFO
#include <tinyara/mm/mm.h>
Expand Down
2 changes: 1 addition & 1 deletion os/kernel/debug/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ifeq ($(CONFIG_DEBUG_MM_WARN),y)
CSRCS += memdbg.c
endif

ifeq ($(CONFIG_ENABLE_STACKMONITOR)$(CONFIG_DEBUG),yy)
ifeq ($(CONFIG_DEBUG),y)
CSRCS += stackinfo_save_terminated.c
endif

Expand Down
2 changes: 1 addition & 1 deletion os/kernel/debug/dbg_termination_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
****************************************************************************/
void dbg_save_termination_info(struct tcb_s *tcb)
{
#if defined(CONFIG_ENABLE_STACKMONITOR) && defined(CONFIG_DEBUG)
#ifdef CONFIG_DEBUG
stackinfo_save_terminated(tcb);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to save this even if stkmon is not enabled?

#endif

Expand Down
2 changes: 1 addition & 1 deletion os/kernel/task/task_prctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ int prctl(int option, ...)
#endif /* CONFIG_MESSAGING_IPC */
case PR_GET_STKLOG:
{
#if defined(CONFIG_ENABLE_STACKMONITOR) && defined(CONFIG_DEBUG)
#ifdef CONFIG_DEBUG
struct stkmon_save_s *dest_buf = va_arg(ap, struct stkmon_save_s *);
stkmon_copy_log(dest_buf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must have some config in kernel for stack mon.
Please check why the issue is happening in ecode and fix it by a different method.

#else
Expand Down