[INFO] Tickless mode for ChibiOS/RT 3.0

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] Tickless mode for ChibiOS/RT 3.0

Post by Giovanni »

Hi Leon,

It's been a while :)

Years after first discussing this tickless mode and high resolution timers... it is finally here :D

Tomorrow it is the release day.

Giovanni
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [INFO] Tickless mode for ChibiOS/RT 3.0

Post by alex31 »

Hello

what about
2) Thread profiling debug option is not functional in tickless mode. It will be reimplemented when the kernel will receive the RT timer handling currently in the HAL.
?

I have found that there is a statistic subsystem, but i have not found examples using it, and it doesn't seems to collect per thread data but
global scheduler data.

So the question is, using current ChibiOS dev branch, is there a mean to get Thread profiling data ?

Thanks
Alexandre
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] Tickless mode for ChibiOS/RT 3.0

Post by Giovanni »

No, statistics do it better (much better).

Once activated statistics are accessible via the ChibiOS/RT 4 debug plugin in eclipse, there should be screenshots on the forum somewhere or just try it in ChibiStudio, it is included.

Giovanni
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: [INFO] Tickless mode for ChibiOS/RT 3.0

Post by alex31 »

No, statistics do it better (much better).

Once activated statistics are accessible via the ChibiOS/RT 4 debug plugin in eclipse, there should be screenshots on the forum somewhere or just try it in ChibiStudio, it is included.



Ok, looks promising, thanks :-)

In fact, i need to let the program do his own introspection an take decision based on threads load, so i need to be able to
get data from chibios, can one imagine a public api to get this data instead of working with chibios private data ?

Alexandre
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] Tickless mode for ChibiOS/RT 3.0

Post by Giovanni »

Hi,

The data can be accessed at runtime using the registry API then accessing the statistics structure in each thread.

If you just need thread load then statistics are overkill probably and would slow down the system, you better disable tickless mode and use profiling. Profiling is just a counter incremented in the current thread when a system tick occurs (this is why it is not compatible with tickless mode).

There is another solution for threads load: use the idle-enter and idle-leave macros together with the realtime counter, you can measure how much time is spent into the idle thread and it is compatible with tickless mode.

Giovanni
Post Reply