Skip to content

Add tracing feature#99

Merged
marcmo merged 1 commit intoeclipse-openbsw:mainfrom
esrlabs:cr-124650
May 7, 2025
Merged

Add tracing feature#99
marcmo merged 1 commit intoeclipse-openbsw:mainfrom
esrlabs:cr-124650

Conversation

@marcmo
Copy link
Contributor

@marcmo marcmo commented Apr 24, 2025

originates from CR #124650

Copy link
Contributor

@hbragge-acn hbragge-acn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Added some minor comments

@@ -0,0 +1,59 @@
// Copyright 2025 Accenture.

#ifndef GUARD_FE5C7F2F_D5EC_4301_BBAC_55D1A020394D
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use "#pragma once" instead of include guards now

* Store a trace event with id argument.
*
* There are two types a frames: normal frames and extended frames.
* Each frames stores the relative time since the last tracing event.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each frames -> Each frame

*
* There are two types a frames: normal frames and extended frames.
* Each frames stores the relative time since the last tracing event.
* If that time is too long for a normal frame, and extended frame will be used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and extended -> an extended

Once the trace buffer is full, the tracing will stop automatically.
You can use the `init()` method to start over with an empty trace buffer.

In order to trace their own custom events, users may use method `traceUser(uint8_t usrIdx)`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use method -> use the method

The tracing feature enables collection of scheduling events.
This data can be used by tracing tools (e.g. babeltrace2) running on a host
to visualize the kernel's inner workings and the behavior of its subsystems
(e.g. when a task is switched in or out).

Tracing events are stored in RAM in binary format and can later be
converted to human readable format using trace_convert.py script or
babeltrace2 with the bt_plugin_openbsw.py plugin.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
@marcmo marcmo merged commit 59868e9 into eclipse-openbsw:main May 7, 2025
38 checks passed
@marcmo marcmo deleted the cr-124650 branch May 7, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants