forked from len0rd/rockbox
Add ability to dump cpu boost log to disk, include thread names
0.) B 0 /rockbox/apps/main.c:405 1.) B 1 /rockbox/firmware/kernel/thread.c thread[dircache]:1508 2.) B 2 /rockbox/apps/tagcache.c:4772 3.) U 3 /rockbox/apps/tagcache.c:4793 add logic to show count after log rolls over clean-up Change-Id: Ibda0a56e5d8d89aa8b7649f4f9fa64eb1ff0e08f
This commit is contained in:
parent
5883cb4a52
commit
95b10ac74e
3 changed files with 58 additions and 3 deletions
|
@ -89,6 +89,7 @@ char * cpu_boost_log_getlog_next(void)
|
|||
|
||||
void cpu_boost_(bool on_off, char* location, int line)
|
||||
{
|
||||
int item = cpu_boost_calls_count;
|
||||
if (!cpu_boost_lock())
|
||||
return;
|
||||
|
||||
|
@ -98,12 +99,13 @@ void cpu_boost_(bool on_off, char* location, int line)
|
|||
cpu_boost_calls_count--;
|
||||
if (cpu_boost_calls_count < 0)
|
||||
cpu_boost_calls_count = 0;
|
||||
item += cpu_boost_first;
|
||||
}
|
||||
if (cpu_boost_calls_count < MAX_BOOST_LOG)
|
||||
{
|
||||
int message = (cpu_boost_first+cpu_boost_calls_count)%MAX_BOOST_LOG;
|
||||
snprintf(cpu_boost_calls[message], MAX_PATH,
|
||||
"%c %s:%d",on_off?'B':'U',location,line);
|
||||
snprintf(cpu_boost_calls[message], MAX_PATH,"%d.) %c %d %s:%d",
|
||||
item,on_off?'B':'U',boost_counter,location,line);
|
||||
cpu_boost_calls_count++;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue