I will give personal opinions with some years of experience backing them, please treat them as such.
-
What is the recommended approach for:
MATTHEW: I see a few ways to do this. I would base myself on pre-existing solutions to save headaches/time/money/sanity.
Trace event Traces (google chrome traces): they are json, easy to read as a human, they give decent results. You will be able to visualize the scheduler on a flame chart. But they are not specialized in embedded. For that, you can look into....
BTF: you can make a btf compliant trace, it would be good if you want to also trace actuators, SPI busses or something like that.
I find it good for simple MCUs, but when you go multi-core, I really prefer....
Linux style traces. This is my personal favorite because it gives more liberty. If you have a sched_switch event going from last to current, you can measure stuff like time to wakeup, time to schedule and more.
Depending on your approach you can use the control flow view, resources view and other like flame graph. I am biased, I think the latest trace compass version is the greatest. However,
https://www.ti.com/tool/CCSTUDIO if you use code composer studio, it is based on eclipse IDE or Theia IDE, and you can integrate trace compass into it.
-
Specifically, I need to know:
If you want something long term, I suggest CTF is by far the best and most efficient. If it's a weekend project, I would suggest looking at BTF. No the formats are NOT related.
for sched* events, you will populate all the views.
You can, we have tutorials here:
and here
But you may be able to get away with using vanilla trace compass.
Please keep us in the loop! I'd love to see some cool results! 🙂
Matthew