summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDaniel Ankers <dan@weirdo.org.uk>2006-08-31 20:19:18 +0000
committerDaniel Ankers <dan@weirdo.org.uk>2006-08-31 20:19:18 +0000
commitc1e454508e0bfca10b6c616bc38194948adfdd74 (patch)
treee1a0021b0b0505146615cd6ba99a0e117a121501 /apps
parent41997d3d89ed72c49a2dc5ac7f0aaa15093f5aba (diff)
downloadrockbox-c1e454508e0bfca10b6c616bc38194948adfdd74.tar.gz
rockbox-c1e454508e0bfca10b6c616bc38194948adfdd74.zip
Save a few bytes on non-Portalplayer builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c4bec5a487..d9d1e85d11 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -88,8 +88,10 @@ bool dbg_os(void)
char buf[32];
int i;
int usage;
+#if NUM_CORES > 1
unsigned int core;
int line;
+#endif
lcd_setmargins(0, 0);
lcd_setfont(FONT_SYSFIXED);
@@ -97,6 +99,7 @@ bool dbg_os(void)
while(1)
{
+#if NUM_CORES > 1
lcd_puts(0, 0, "Core and stack usage:");
line = 0;
for(core = 0; core < NUM_CORES; core++)
@@ -108,6 +111,15 @@ bool dbg_os(void)
lcd_puts(0, ++line, buf);
}
}
+#else
+ lcd_puts(0, 0, "Stack usage:");
+ for(i = 0; i < num_threads[CURRENT_CORE];i++)
+ {
+ usage = thread_stack_usage(i);
+ snprintf(buf, 32, "%s: %d%%", thread_name[CURRENT_CORE][i], usage);
+ lcd_puts(0, 1+i, buf);
+ }
+#endif
lcd_update();