All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/1] extending low-level markers
@ 2007-08-01 21:57 nwatkins
  2007-08-02 16:44 ` Mathieu Desnoyers
  0 siblings, 1 reply; 8+ messages in thread
From: nwatkins @ 2007-08-01 21:57 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: nwatkins, linux-kernel

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

-- 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-08-07 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01 21:57 [patch 0/1] extending low-level markers nwatkins
2007-08-02 16:44 ` Mathieu Desnoyers
2007-08-02 18:32   ` Noah Watkins
2007-08-02 19:02     ` Mathieu Desnoyers
2007-08-02 19:31       ` Noah Watkins
2007-08-02 19:38         ` Mathieu Desnoyers
2007-08-02 19:58           ` Noah Watkins
2007-08-07 19:50             ` Frank Ch. Eigler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.