Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract tracer and create an internal one for test purposes #267

Merged
merged 3 commits into from
Nov 2, 2024

Conversation

cochicde
Copy link
Contributor

This PR is part a branch with some other things, so some things are still not used here.
The folllowing was done here:

  • Abstract tracer: any mention of the barectf tracer was removed from the main code and hidden in BarectfPlatformFORTE. To do that, a CForteTracer typedef was created which can be set to other tracers during compilation time. BarectfPlatformFORTE (and others tracers) have methods such as traceInstanceData, traceReceiveInputEvent, etc. which mirror the ones from barectf. The Function Blocks then call these methods in CForteTracer class.
  • Internal tracer: Is a tracer that instead of tracing into a file, it traces into a vector of EventMessage which contains the same information as the barectf traces. This is only compile if the tracer tests are enabled.
  • Flexible Tracer: A shell over both BarectfPlatformFORTE and the internal tracer, which allows selecting one or the other during runtime. This is the default tracer if tracer tests are enabled.
  • Babeltrace2 Message Factory: everything related to babeltrace2 was moved out of the EventMessages and this factory allows creating EventMessages from the bt_field (and other) types defined by babeltrace2.

The main idea of this new code is to be able generate traces using barectf but also directly into memory and be able to have the same class to compare them (EventMessage)

@cochicde cochicde requested a review from mx990 October 29, 2024 18:36
@cochicde cochicde requested a review from azoitl October 30, 2024 06:01
@diplfranzhoepfinger
Copy link

we have a Tracer ?
@azoitl
this would be VERY helpful.
such a Thing which X/Y Coordinates and writing Diagramms of Variables ?
I am Impressed !

@azoitl
Copy link
Contributor

azoitl commented Oct 30, 2024

we have a Tracer ? @azoitl this would be VERY helpful. such a Thing which X/Y Coordinates and writing Diagramms of Variables ? I am Impressed !

I don't think this is what you can to with that. Currently tracing is more for getting deeper insights on what is going on. But it heavily impacts performance and is not suitable for non-linux platforms.

@diplfranzhoepfinger
Copy link

ahhhhhhhhhhhhhhhh ....

so this would be a totally different thing:
having a Chart Draw module in IDE, to make Plots during a Watch ?

* @brief A tracer that can be changed to use the existing tracers: BarectfPlatformFORTE and CInternalTracer
*
*/
class CFlexibelTracer final {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class CFlexibelTracer final {
class CFlexibleTracer final {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yes, when I click the link you posted, I get:

The word you've entered isn't in the dictionary.

It even suggests the correct spelling: https://www.merriam-webster.com/dictionary/flexible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently I was very tired

@azoitl
Copy link
Contributor

azoitl commented Oct 30, 2024

ahhhhhhhhhhhhhhhh ....

so this would be a totally different thing: having a Chart Draw module in IDE, to make Plots during a Watch ?

yes

@cochicde cochicde merged commit b2aaf06 into eclipse-4diac:develop Nov 2, 2024
6 checks passed
@cochicde cochicde deleted the cleanup-tracer branch November 2, 2024 09:17
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.

4 participants