Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuttx-apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
nuttx-apps
Commits
4e6f5be0
Commit
4e6f5be0
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Stack monitor fixes
parent
2c39b811
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
system/stackmonitor/Makefile
+1
-1
1 addition, 1 deletion
system/stackmonitor/Makefile
system/stackmonitor/stackmonitor.c
+21
-0
21 additions, 0 deletions
system/stackmonitor/stackmonitor.c
with
22 additions
and
1 deletion
system/stackmonitor/Makefile
+
1
−
1
View file @
4e6f5be0
...
...
@@ -41,7 +41,7 @@ ifeq ($(WINTOOL),y)
INCDIROPT
=
-w
endif
#
USB
Monitor Application
#
Stack
Monitor Application
PRIORITY
=
SCHED_PRIORITY_DEFAULT
STACKSIZE
=
768
...
...
This diff is collapsed.
Click to expand it.
system/stackmonitor/stackmonitor.c
+
21
−
0
View file @
4e6f5be0
...
...
@@ -91,6 +91,21 @@ static struct stkmon_state_s g_stackmonitor;
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: stkmon_task
****************************************************************************/
static
void
stkmon_task
(
FAR
struct
tcb_s
*
tcb
,
FAR
void
*
arg
)
{
#if CONFIG_NAME_MAX > 0
syslog
(
"%5d %6d %6d %s
\n
"
,
tcb
->
pid
,
tcb
->
adj_stack_size
,
up_check_tcbstack
(
tcb
),
tcb
->
name
);
#else
syslog
(
"%5d %6d %6d
\n
"
,
tcb
->
pid
,
tcb
->
adj_stack_size
,
up_check_tcbstack
(
tcb
));
#endif
}
static
int
stackmonitor_daemon
(
int
argc
,
char
**
argv
)
{
syslog
(
STKMON_PREFIX
"Running: %d
\n
"
,
g_stackmonitor
.
pid
);
...
...
@@ -100,6 +115,12 @@ static int stackmonitor_daemon(int argc, char **argv)
while
(
!
g_stackmonitor
.
stop
)
{
sleep
(
CONFIG_SYSTEM_STACKMONITOR_INTERVAL
);
#if CONFIG_NAME_MAX > 0
syslog
(
"%-5s %-6s %-6s %s
\n
"
,
"PID"
,
"SIZE"
,
"USED"
,
"THREAD NAME"
);
#else
syslog
(
"%-5s %-6s %-6s
\n
"
,
"PID"
,
"SIZE"
,
"USED"
);
#endif
sched_foreach
(
stkmon_task
,
NULL
);
}
/* Stopped */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment