extending low-level markers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 1 patch 7 repliesIn review
Patches in v1 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/1] extending low-level markers
Mathieu
I have been working with your Kernel Markers infrastructure now for some time and have run into an extendability issue.
Essentially I am failing to find a way to extend the current __trace_mark macro with site-specific context. That is, I would like the ability to create different 'types' of instrumentation points by bulding upon the __trace_mark macro. A consumer of this marker could examine the type of marker, and attach an appropriate callback function / private data.
I have included a patch which adds a flavor field to the __trace_mark macro. This simplified example demonstrates the functionality I'm looking for:
#define __trace_mark(flavor, name, format, args...)
<current macro plus the flavor field>
#define marker_flavor_XXX(name, format, args...)
__trace_mark(XXX, name, format, args)
Here a marker of type XXX is build upon the __trace_mark macro. When a consumer of type XXX finds markers with the XXX flavor appropriate registration can take place.
Unless I don't fully understand all the use cases of the markers, I don't see any other way to do this except to encode the 'type' information in the name of the marker, and require the consumer to parse the string to determine the type. Restricting the names of the markers in this way seems like a bad solution.
Any help and feedback is greatly appreciated.
- Noah