On Oct 29, 2013, at 4:42 AM, Amit Margalit <[email protected]> wrote:
> Additionally, there is a ton of code to calculate the event size, its
> alignment, and to verify that the names are not longer than the 256 byte
> buffer, and more.
A couple of thoughts:
(a) there may be a way to share fewer definitions of events across more event
emit sites. Especially if LTTng supported optional/missing fields :) For
example, define a single "function.entry" and a single "function.exit" instead
of a unique definition for each function you have. Disambiguate using a
parameter.
(b) this is not something that could be done in kernel but in a C++ user app
it's fairly easy to statically compute everything that depends on information
known at compile time. I use a custom EDSL implemented via boost.proto. As a
result, only the stuff that gets used is embedded in object code and all event
emit calls inline in very fast assembly that's optimal for each particular
combination of actual argument values.
Cheers,
Vlad
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev