Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] [Question] Using Trace Compass with Custom Scheduler on TMS570LS1114 MCU
  • From: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>
  • Date: Thu, 10 Oct 2024 18:01:48 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1m6luUa+PYWidi5xHvVpmDXEEPaFn2LFaCwNtBx9DaQ=; b=xG850hcuhErZt2y6MMltUviXY+eqbWNBY3oqfjLL2PTIDykAJv2mE7n+Mbt2pg9jaVaMyEvdl2PlfKyB3CdlCDqCiyTo8Out50svQegBLVEqel8avVSjVrIWnSkjQRloZyohDZsrzcPGnKvS0V4GmM+jpjPNNwkfSFbDinINXfzj2aK0nx0LxES678olY/zCgHNcdmIUmOYhKG7BGOHTToutpGYPuy64L+hERC6DkeRAnSKywGS+AYe59PBW2WqYt1rqzhQdmyav/sJQNsENlsz3xIsnWIrJpme4/WylpwdTRWXcwBtT39Z7zU7jWAcXa1x+8ILGhMMgIDZQaXCgdw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WfPgZXA9FDuMVeahAFenAB+CmX4P60fgLpFJA1/J3kjn34ndHd3uDHHWYWqkfwPRArT+QnGaGqLNtz0ND2XlXhLAJGmkL6+SA/1bZpHux1Xi1rEzbWGH1P9UdLaHDH5wVWXkl0HRrQ+YG02KirKXxoAAB3o/DK6kUBcMnG5bKWISduVHS8TtRZvB553OMX0csHlonKX65ZdR1NmMG7Re4Jfbi2+HgGf4hwkJl5AqaCsp0E+Tu7FXJwG8g7X3VMK5gtSlRWv+FTYeWlxLCCnsdvhmLZkykvQr7rkU8V1oPNopeYl13efa9awaFlcGc/W3+SdsFoW6jAq5trlYGY5s0g==
  • Delivered-to: tracecompass-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tracecompass-dev/>
  • List-help: <mailto:tracecompass-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tracecompass-dev>, <mailto:tracecompass-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tracecompass-dev>, <mailto:tracecompass-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHbGLFGbu4yqeC6C0WQlrqg46fB37KAP9VWgAAJTWM=
  • Thread-topic: [tracecompass-dev] [Question] Using Trace Compass with Custom Scheduler on TMS570LS1114 MCU


Additional Questions:

  1. Are there any existing examples of using Trace Compass with custom RTOS/schedulers?
Linux analyses are a great example. However, there are others, such as https://link.springer.com/article/10.1007/s11219-016-9311-0 if academic research is OK. It reads windows traces!

  1. What are the minimum trace data points needed to create a meaningful visualization?
If you look at our test cases, sched_switch is the minimum necessary. I like having sched_wakeup, sched_ttwu, irq* and system calls too. But minimum is sched_switch.


  1. Are there any performance considerations when implementing tracing on an embedded target?

Many, if there weren't, it would be a solved problem.  1- You have limited memory, 2- you have limited IO, 3- you have limited CPU, 4- you have limited storage.

So I would recommend logging little and logging compressed unconverted data then letting the trace viewer do the heavy lifting.

Hope this helps.




From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Matthew Khouzam via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: Thursday, October 10, 2024 1:48 PM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>
Subject: Re: [tracecompass-dev] [Question] Using Trace Compass with Custom Scheduler on TMS570LS1114 MCU
 
Hi Ahmed,

I will give personal opinions with some years of experience backing them, please treat them as such.

  1. What is the recommended approach for:
    • Collecting trace data from a custom scheduler on an embedded target
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. 


    • Converting the collected data into a format that Trace Compass can understand
The CTF format is very embedded friendly as it requires little computation. Look at barectf(https://github.com/efficios/barectf) as a writer to help out on this side. I think   normand (https://github.com/efficios/normand) can help.
    • Visualizing task switches and execution times
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.
  1. Specifically, I need to know:
    • What trace data format would be most suitable for this use case
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.
    • How to implement the necessary trace points in the scheduler
for sched* events, you will populate all the views.
    • How to create a custom parser/analyzer in Trace Compass if needed
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



From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Ahmed Saeed via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: Monday, October 7, 2024 8:05 AM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Ahmed Saeed <ahmed.saeed@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: [tracecompass-dev] [Question] Using Trace Compass with Custom Scheduler on TMS570LS1114 MCU
 

Question: I am working on implementing trace visualization for a custom scheduler running on a TMS570 microcontroller. I need guidance on:

  1. What is the recommended approach for:
    • Collecting trace data from a custom scheduler on an embedded target
    • Converting the collected data into a format that Trace Compass can understand
    • Visualizing task switches and execution times
  2. Specifically, I need to know:
    • What trace data format would be most suitable for this use case
    • How to implement the necessary trace points in the scheduler
    • How to create a custom parser/analyzer in Trace Compass if needed

Current Setup:

  • Custom scheduler running on TMS570 MCU
  • safe RTOS tracealyzer 

Additional Questions:

  1. Are there any existing examples of using Trace Compass with custom RTOS/schedulers?
  2. What are the minimum trace data points needed to create a meaningful visualization?
  3. Are there any performance considerations when implementing tracing on an embedded target?

Thank you for your help.

Ahmed Saeed,
Embedded SW Engineer

+2 (0)  1096886761

Coretech Innovations EGYPT
Smart Village - LINX Business Park
Building F5 - (A05) - Giza - 12577

Back to the top