<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 29, 2013, at 4:42 AM, Amit Margalit <<a href="mailto:AMITM@il.ibm.com">AMITM@il.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><font size="2" face="sans-serif" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">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.</font><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; "> </span></blockquote></div><br><div>A couple of thoughts:</div><div><br></div><div>(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.</div><div><br></div><div>(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.</div><div><br></div><div>Cheers,</div><div>Vlad</div></body></html>