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

tracing: add user event trace #74037

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danieldegrasse
Copy link
Collaborator

Add support for a "user event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.

@danieldegrasse danieldegrasse force-pushed the feature/user-tracing branch 2 times, most recently from a993d24 to d1c8540 Compare June 11, 2024 16:23
@nashif nashif added this to the v4.0.0 milestone Jun 20, 2024
@MaureenHelm
Copy link
Member

@nashif please take a look

@nashif
Copy link
Member

nashif commented Aug 13, 2024

@nashif please take a look

yep, looking at this.

@danieldegrasse
Copy link
Collaborator Author

Rebased to clear conflicts

@teburd
Copy link
Collaborator

teburd commented Sep 20, 2024

I can see this being useful for quickly looking at some tracing points, but the reality is the string name here will limit how many points can be sent over a wire quickly I'd think, perhaps renaming this to NAMED_EVENT or so would be more apt, as users are welcome to add tracing points of their own with their own TIDs ideally.

@danieldegrasse
Copy link
Collaborator Author

I can see this being useful for quickly looking at some tracing points, but the reality is the string name here will limit how many points can be sent over a wire quickly I'd think, perhaps renaming this to NAMED_EVENT or so would be more apt, as users are welcome to add tracing points of their own with their own TIDs ideally.

IE names like:

  • sys_trace_named_event
  • CTF_EVENT_NAMED_EVENT

I have no issue with this change- the primary goals here are to provide an example for users of how to extend tracing support, and to add a simple function to quickly extend tracing while debugging an issue

@danieldegrasse
Copy link
Collaborator Author

danieldegrasse commented Oct 1, 2024

I can see this being useful for quickly looking at some tracing points, but the reality is the string name here will limit how many points can be sent over a wire quickly I'd think, perhaps renaming this to NAMED_EVENT or so would be more apt, as users are welcome to add tracing points of their own with their own TIDs ideally.

IE names like:

* `sys_trace_named_event`

* `CTF_EVENT_NAMED_EVENT`

I have no issue with this change- the primary goals here are to provide an example for users of how to extend tracing support, and to add a simple function to quickly extend tracing while debugging an issue

@teburd wanted to clarify here, were you asking me to make this name change? Happy to do so if you are

@teburd
Copy link
Collaborator

teburd commented Oct 1, 2024

I can see this being useful for quickly looking at some tracing points, but the reality is the string name here will limit how many points can be sent over a wire quickly I'd think, perhaps renaming this to NAMED_EVENT or so would be more apt, as users are welcome to add tracing points of their own with their own TIDs ideally.

IE names like:

* `sys_trace_named_event`

* `CTF_EVENT_NAMED_EVENT`

I have no issue with this change- the primary goals here are to provide an example for users of how to extend tracing support, and to add a simple function to quickly extend tracing while debugging an issue

@teburd wanted to clarify here, were you asking me to make this name change? Happy to do so if you are

It's not a blocker but I do think the name would, at least for me, signal the right things better than the current user event naming.

I leave it up to you @danieldegrasse as you are the author.

Add support for a "named event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.

Signed-off-by: Daniel DeGrasse <[email protected]>
Document availability of sys_trace_user_event, for users who are trying
to add custom trace events to their application.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add usage example for sys_trace_user_event, to demonstrate how users
could add tracing functionality to their application.

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse
Copy link
Collaborator Author

I leave it up to you @danieldegrasse as you are the author.

No problem with the name change- I've update the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants