mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 22:22:33 -05:00
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
This commit is contained in:
parent
5f15f8f021
commit
c5d57f0aae
9 changed files with 33 additions and 99 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue