summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-12-05 20:01:48 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-12-05 20:01:48 +0000
commitc5d57f0aaec039de4a72a94d103ace64c0553b3d (patch)
treeae2f61a6deb7d65d174d175eef02b5be5c8c0cb6 /apps
parent5f15f8f021abc08db88e95371ceda194f5717893 (diff)
downloadrockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.zip
rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.gz
rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.bz2
rockbox-c5d57f0aaec039de4a72a94d103ace64c0553b3d.tar.xz
Removed the cpu boost tracking debug feature for now because of
different kind of problems. Better implementation can be done later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11665 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c10
-rw-r--r--apps/playlist.c12
-rw-r--r--apps/tagcache.c14
-rw-r--r--apps/tagtree.c16
-rw-r--r--apps/talk.c4
5 files changed, 26 insertions, 30 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index ca8b056..6caae2d 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1280,11 +1280,7 @@ bool dbg_cpufreq(void)
snprintf(buf, sizeof(buf), "Frequency: %ld", FREQ);
lcd_puts(0, line++, buf);
-#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();
@@ -1293,16 +1289,16 @@ bool dbg_cpufreq(void)
switch(button)
{
case ACTION_STD_PREV:
- cpu_boost_id(true, CPUBOOSTID_DEBUGMENU_MANUAL);
+ cpu_boost(true);
break;
case ACTION_STD_NEXT:
- cpu_boost_id(false, CPUBOOSTID_DEBUGMENU_MANUAL);
+ cpu_boost(false);
break;
case ACTION_STD_OK:
while (get_cpu_boost_counter() > 0)
- cpu_boost_id(false, CPUBOOSTID_DEBUGMENU_MANUAL);
+ cpu_boost(false);
set_cpu_frequency(CPUFREQ_DEFAULT);
break;
diff --git a/apps/playlist.c b/apps/playlist.c
index 2469c0f..e8f9d48 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2872,14 +2872,14 @@ int playlist_insert_directory(struct playlist_info* playlist,
context.queue = queue;
context.count = 0;
- cpu_boost_id(true, CPUBOOSTID_PLAYLIST);
+ cpu_boost(true);
result = playlist_directory_tracksearch(dirname, recurse,
directory_search_callback, &context);
sync_control(playlist, false);
- cpu_boost_id(false, CPUBOOSTID_PLAYLIST);
+ cpu_boost(false);
display_playlist_count(context.count, count_str);
@@ -2941,7 +2941,7 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename,
display_playlist_count(count, count_str);
- cpu_boost_id(true, CPUBOOSTID_PLAYLIST);
+ cpu_boost(true);
while ((max = read_line(fd, temp_buf, sizeof(temp_buf))) > 0)
{
@@ -3000,7 +3000,7 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename,
sync_control(playlist, false);
- cpu_boost_id(false, CPUBOOSTID_PLAYLIST);
+ cpu_boost(false);
display_playlist_count(count, count_str);
@@ -3347,7 +3347,7 @@ int playlist_save(struct playlist_info* playlist, char *filename)
display_playlist_count(count, str(LANG_PLAYLIST_SAVE_COUNT));
- cpu_boost_id(true, CPUBOOSTID_PLAYLIST);
+ cpu_boost(true);
index = playlist->first_index;
for (i=0; i<playlist->amount; i++)
@@ -3440,7 +3440,7 @@ int playlist_save(struct playlist_info* playlist, char *filename)
}
- cpu_boost_id(false, CPUBOOSTID_PLAYLIST);
+ cpu_boost(false);
return result;
}
diff --git a/apps/tagcache.c b/apps/tagcache.c
index dea2039..02b8430 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -3534,7 +3534,7 @@ void build_tagcache(const char *path)
filenametag_fd = open_tag_fd(&header, tag_filename, false);
- cpu_boost_id(true, CPUBOOSTID_TAGCACHE);
+ cpu_boost(true);
logf("Scanning files...");
/* Scan for new files. */
@@ -3562,7 +3562,7 @@ void build_tagcache(const char *path)
if (!ret)
{
logf("Aborted.");
- cpu_boost_id(false, CPUBOOSTID_TAGCACHE);
+ cpu_boost(false);
return ;
}
@@ -3588,7 +3588,7 @@ void build_tagcache(const char *path)
}
#endif
- cpu_boost_id(false, CPUBOOSTID_TAGCACHE);
+ cpu_boost(false);
}
#ifdef HAVE_TC_RAMCACHE
@@ -3597,7 +3597,7 @@ static void load_ramcache(void)
if (!hdr)
return ;
- cpu_boost_id(true, CPUBOOSTID_TAGCACHE);
+ cpu_boost(true);
/* At first we should load the cache (if exists). */
tc_stat.ramcache = load_tagcache();
@@ -3610,7 +3610,7 @@ static void load_ramcache(void)
hdr = NULL;
}
- cpu_boost_id(false, CPUBOOSTID_TAGCACHE);
+ cpu_boost(false);
}
void tagcache_unload_ramcache(void)
@@ -3656,7 +3656,7 @@ static void tagcache_thread(void)
/* If the previous cache build/update was interrupted, commit
* the changes first in foreground. */
- cpu_boost_id(true, CPUBOOSTID_TAGCACHE);
+ cpu_boost(true);
allocate_tempbuf();
commit();
free_tempbuf();
@@ -3674,7 +3674,7 @@ static void tagcache_thread(void)
allocate_tagcache();
#endif
- cpu_boost_id(false, CPUBOOSTID_TAGCACHE);
+ cpu_boost(false);
tc_stat.initialized = true;
/* Don't delay bootup with the header check but do it on background. */
diff --git a/apps/tagtree.c b/apps/tagtree.c
index dbb1b89..7f95f55 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -1284,9 +1284,9 @@ int tagtree_load(struct tree_context* c)
case allsubentries:
case navibrowse:
logf("navibrowse...");
- cpu_boost_id(true, CPUBOOSTID_TAGTREE);
+ cpu_boost(true);
count = retrieve_entries(c, &tcs, 0, true);
- cpu_boost_id(false, CPUBOOSTID_TAGTREE);
+ cpu_boost(false);
break;
default:
@@ -1460,11 +1460,11 @@ bool insert_all_playlist(struct tree_context *c, int position, bool queue)
int from, to, direction;
int files_left = c->filesindir;
- cpu_boost_id(true, CPUBOOSTID_TAGTREE);
+ cpu_boost(true);
if (!tagcache_search(&tcs, tag_filename))
{
gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY));
- cpu_boost_id(false, CPUBOOSTID_TAGTREE);
+ cpu_boost(false);
return false;
}
@@ -1502,7 +1502,7 @@ bool insert_all_playlist(struct tree_context *c, int position, bool queue)
}
playlist_sync(NULL);
tagcache_search_finish(&tcs);
- cpu_boost_id(false, CPUBOOSTID_TAGTREE);
+ cpu_boost(false);
return true;
}
@@ -1606,16 +1606,16 @@ struct tagentry* tagtree_get_entry(struct tree_context *c, int id)
/* Load the next chunk if necessary. */
if (realid >= current_entry_count || realid < 0)
{
- cpu_boost_id(true, CPUBOOSTID_TAGTREE);
+ cpu_boost(true);
if (retrieve_entries(c, &tcs2, MAX(0, id - (current_entry_count / 2)),
false) < 0)
{
logf("retrieve failed");
- cpu_boost_id(false, CPUBOOSTID_TAGTREE);
+ cpu_boost(false);
return NULL;
}
realid = id - current_offset;
- cpu_boost_id(false, CPUBOOSTID_TAGTREE);
+ cpu_boost(false);
}
return &entry[realid];
diff --git a/apps/talk.c b/apps/talk.c
index 107cb72..a880500 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -219,7 +219,7 @@ static void load_voicefile(void)
/* Do a bitswap as necessary. */
#if CONFIG_CODEC == SWCODEC
logf("Bitswapping voice file.");
- cpu_boost_id(true, CPUBOOSTID_TALK);
+ cpu_boost(true);
buf = (unsigned char *)(&p_voicefile->index) +
(p_voicefile->id1_max + p_voicefile->id2_max) * sizeof(struct clip_entry);
length = file_size - (buf - (unsigned char *) p_voicefile);
@@ -231,7 +231,7 @@ static void load_voicefile(void)
temp = ((temp >> 2) & 0x33) | ((temp & 0x33) << 2);
buf[i] = ((temp >> 1) & 0x55) | ((temp & 0x55) << 1);
}
- cpu_boost_id(false, CPUBOOSTID_TALK);
+ cpu_boost(false);
#endif