summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-10-05 10:07:03 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-10-05 10:07:03 +0000
commitd49c810ec9c6010bf41e0ef7ebad101a79373438 (patch)
tree26755e1026276ed7f88071a7739497f93dd3ef6a /apps/debug_menu.c
parent3eb9e70b6467becb2aa88cc8d24a82a7c288f1fd (diff)
downloadrockbox-d49c810ec9c6010bf41e0ef7ebad101a79373438.zip
rockbox-d49c810ec9c6010bf41e0ef7ebad101a79373438.tar.gz
rockbox-d49c810ec9c6010bf41e0ef7ebad101a79373438.tar.bz2
rockbox-d49c810ec9c6010bf41e0ef7ebad101a79373438.tar.xz
Add CPU boost tracker to see where boosts are coming from
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11125 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 70fc3ac..fa65073 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1258,7 +1258,6 @@ bool dbg_ports(void)
#endif /* !SIMULATOR */
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-extern int boost_counter;
bool dbg_cpufreq(void)
{
char buf[128];
@@ -1278,7 +1277,11 @@ bool dbg_cpufreq(void)
snprintf(buf, sizeof(buf), "Frequency: %ld", FREQ);
lcd_puts(0, line++, buf);
- snprintf(buf, sizeof(buf), "boost_counter: %d", boost_counter);
+#ifdef CPU_BOOST_TRACKING
+ snprintf(buf, sizeof(buf), "boost_counter: %d %s", get_cpu_boost_counter(), get_cpu_boost_tracker());
+#else
+ snprintf(buf, sizeof(buf), "boost_counter: %d", get_cpu_boost_counter());
+#endif
lcd_puts(0, line++, buf);
lcd_update();
@@ -1287,15 +1290,16 @@ bool dbg_cpufreq(void)
switch(button)
{
case ACTION_STD_PREV:
- cpu_boost(true);
+ cpu_boost_id(true, CPUBOOSTID_DEBUGMENU_MANUAL);
break;
+
case ACTION_STD_NEXT:
- cpu_boost(false);
+ cpu_boost_id(false, CPUBOOSTID_DEBUGMENU_MANUAL);
break;
case ACTION_STD_OK:
- set_cpu_frequency(CPUFREQ_DEFAULT);
- boost_counter = 0;
+ while (get_cpu_boost_counter() > 0)
+ cpu_boost_id(false, CPUBOOSTID_DEBUGMENU_MANUAL);
break;
case ACTION_STD_CANCEL: