Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11176 - Keep track of threads' CPU runtime

Attached to Project: Rockbox
Opened by Maurus Cuelenaere (mcuelenaere) - Monday, 05 April 2010, 19:41 GMT+2
Task Type Patches
Category Operating System/Drivers
Status New
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

This patch adds a per-thread runtime variable which indicates the ticks the particular thread has been running.

This can for example help identifying threads that occupy the CPU for a long period of time.
   runtime.diff (2.8 KiB)
 b/apps/debug_menu.c        |    4 ++--
 b/firmware/export/thread.h |    1 +
 b/firmware/thread.c        |    4 ++++
 3 files changed, 7 insertions(+), 2 deletions(-)

This task depends upon

Comment by Marcin Bukat (MarcinBukat) - Tuesday, 13 April 2010, 14:41 GMT+2
It shows thread total cpu time which is in my opinion rather usless. I think it would be better to setup some timeframe to present how cpu time is distributed (I mean thread tics count/tics per timeframe).
Comment by Maurus Cuelenaere (mcuelenaere) - Wednesday, 14 April 2010, 13:04 GMT+2
I know the current implementation is rather limited, but it's very simple and not really intrusive (it could easily be #ifdef'ed).

I've thought about being able to reset the thread running time in the debug menu or making a (background) plugin which logs and displays/graphs the running time in a more usable way, but haven't gotten to it yet.

This patch is more a proof of concept than actually usable for mainline.

Loading...