diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-09-28 23:42:33 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-09-30 21:13:22 -0400 |
commit | 95b10ac74e7a996b9b1ce7ce88c205e39b67502b (patch) | |
tree | 111391688167f6dd7abd46610bc05e4e5bc8a6de /firmware/kernel | |
parent | 5883cb4a5254048d59a2d600b5f63b8d1c06d306 (diff) |
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
Diffstat (limited to 'firmware/kernel')
-rw-r--r-- | firmware/kernel/thread.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/kernel/thread.c b/firmware/kernel/thread.c index 307be7116a..a422624df7 100644 --- a/firmware/kernel/thread.c +++ b/firmware/kernel/thread.c @@ -1501,7 +1501,14 @@ static inline void boost_thread(struct thread_entry *thread, bool boost) if ((thread->cpu_boost != 0) != boost) { thread->cpu_boost = boost; +#ifdef CPU_BOOST_LOGGING + const char fmt[] = __FILE__" thread[%s]"; + char pathbuf[sizeof(fmt) + 32]; /* thread name 32 */ + snprintf(pathbuf, sizeof(pathbuf), fmt, thread->name); + cpu_boost_(boost, pathbuf, __LINE__); +#else cpu_boost(boost); +#endif } } |