On 09/06/2020 08:18, Gedare Bloom wrote:
Richi,
On Mon, Jun 8, 2020 at 8:52 AM Sebastian Huber
<sebastian.hu...@embedded-brains.de> wrote:
On 08/06/2020 16:33, Richi Dubey wrote:
Thanks for telling me about the uniprocessor rule for having a single
scheduler for all the tasks. It makes sense. However I still cannot
find the code which actually links our processor to that scheduler!
Talking on a high level, I cannot find a code anywhere that tells
kernel/processor to use Simple scheduler for all the tasks when we
write #define CONFIGURE_SCHEDULER_SIMPLE inside a testcase(I could not
find anything related in the scheduler.h configuration file too). I
hope my doubt makes sense.
Depending on the configuration options, the header file
<rtems/confdefs/scheduler.h> defines a couple of data structures. One is
the _Scheduler_Table:
https://git.rtems.org/rtems/tree/cpukit/include/rtems/confdefs/scheduler.h#n239
This is how the scheduler is defined for an application. You can look a
the preprocessed header file to see all the data structures.
You will need to learn some techniques for navigating a large code
base. I don't know if there is a good tutorial out there, but check
out information about:
* ctags
* cscope
They can integrate with editors on *nix and provide you with
identifier/name/text search in an indexed database built from a
filesystem directory tree. Or you can use them from the command line
also. This is the best way to find code definitions and to navigate
code quickly. You can push/pop searches on a stack also, so you can
easily follow a function's control flow down, and then backtrace up.
UNIX utilities:
* grep
* ack (an updated variant of grep)
* find
To get an overview of the control flow, you can also use
-finstrument-functions combined with the Event Records:
https://docs.rtems.org/branches/master/user/tracing/eventrecording.html
With the data you can create a flame graph:
http://www.brendangregg.com/flamegraphs.html
It is not a five minute job to set this up.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel