diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-01-22 10:41:25 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-01-22 10:41:25 +0000 |
| commit | f8c68c7912da50451167fe4bcfd69717f2a30c98 (patch) | |
| tree | b0d03c2488adabfda26823d9bcd3eeaa422b3ce2 /apps/debug_menu.c | |
| parent | a3a303e440d751fbbb8c2532640098bfc969b75f (diff) | |
| download | rockbox-f8c68c7912da50451167fe4bcfd69717f2a30c98.zip rockbox-f8c68c7912da50451167fe4bcfd69717f2a30c98.tar.gz rockbox-f8c68c7912da50451167fe4bcfd69717f2a30c98.tar.bz2 rockbox-f8c68c7912da50451167fe4bcfd69717f2a30c98.tar.xz | |
Simple cpu boost tracker for LOGF builds. Shows the last 64 cpu_boost() calls from the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12087 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 081bf2f..22db43d 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2237,7 +2237,55 @@ static bool dbg_write_eeprom(void) return false; } #endif /* defined(HAVE_EEPROM) && !defined(HAVE_EEPROM_SETTINGS) */ - +#ifdef CPU_BOOST_LOGGING +static bool cpu_boost_log(void) +{ + int i = 0,j=0; + int count = cpu_boost_log_getcount(); + int lines = LCD_HEIGHT/SYSFONT_HEIGHT; + char *str; + bool done; + lcd_setmargins(0, 0); + lcd_setfont(FONT_SYSFIXED); + str = cpu_boost_log_getlog_first(); + while (i < count) + { + lcd_clear_display(); + for(j=0; j<lines; j++,i++) + { + if (!str) + str = cpu_boost_log_getlog_next(); + if (str) + { + lcd_puts(0, j,str); + } + str = NULL; + } + lcd_update(); + done = false; + action_signalscreenchange(); + while (!done) + { + switch(get_action(CONTEXT_STD,TIMEOUT_BLOCK)) + { + case ACTION_STD_OK: + case ACTION_STD_PREV: + case ACTION_STD_NEXT: + done = true; + break; + case ACTION_STD_CANCEL: + i = count; + done = true; + break; + } + } + } + get_action(CONTEXT_STD,TIMEOUT_BLOCK); + lcd_setfont(FONT_UI); + action_signalscreenchange(); + return false; +} +#endif bool debug_menu(void) { int m; @@ -2312,6 +2360,9 @@ bool debug_menu(void) {"logf", logfdisplay }, {"logfdump", logfdump }, #endif +#ifdef CPU_BOOST_LOGGING + {"cpu_boost log",cpu_boost_log}, +#endif }; m=menu_init( items, sizeof items / sizeof(struct menu_item), NULL, |