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 17:48:03 +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=2mkl25w3mbARHyVt4QQ8EmihwBPvtIuESlO4bg0/zFI=; b=lBJS0zFcOYhMpexoN8lcS7Q+o7cIpFiiHXqSSXksJBQTsxCqBPoFHqYtP+mPQfT8I9d8THT6/vupOl5U2Ltc9iz+CdxyU5o1hHkslKF83XDwCCE8bORSP7tcnFzAJejmERCM46TYN+7iyW8B470nXR3wA8NxsslVhqNF+Z4NhvyYXoPpDUKPILdZq0bjdDXAyx+ba0q0h2IBi8g3u4T9VUc3HdPmk6nAtYklAaqMIQTlGcs2yWBcI9M3cuGX7/3SV/KTyW/ffpqv5fdVZ8wND1lpRnCYACjYwaPMZr9QKa12y2KO2hIarDXpMfaI6qoJlM/2q6Mnocsvq6H9l5znkg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JqPa29Q7U+WnA5ryHQ+uWYa3qhdn3XNwBiaHRCXdDSgJBAEwth7iLe3CYDJ2HJLTem1Gy7sbniMmNntrdeaBBrdlrMUzhiIiU+rMHkIYt03FSXi0I37Izq8wt6z8YtRImcOm+dImNb3rFVV+/o482VStRNdb26S11qCwTRCm5PD+FLRX4flyyJX0LnCITIySsR3PcekkveviAQi/XUQvPBg6cqC+Drl/F6DA4bL1ylygdbO7g6rTgwttnGasIo/I5UQjyuA3OiAv6Y2mOXOX8nWXDLGvdlqsfiHHovEz56x1aKwrbr4Ejo2yg0qInqQQWxYU5EqHmL6RO/Oh6Bg3TQ==
  • 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: AQHbGLFGbu4yqeC6C0WQlrqg46fB37KAP9VW
  • Thread-topic: [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