[lttng-dev] Question about performance and tracepoint structure

Amit Margalit AMITM at il.ibm.com
Wed Jul 10 13:16:53 EDT 2013


Hi,

This may be a bit of a noob question, and I think I read about this 
somewhere but I can't find it now.

When I declare a tracepoint that's made up of a uint8_t, followed by a 
uint16_t followed by a uint32_t, for example, there are 2 ways to handle 
this - packed or unpacked.

If we're doing packed, then we have to include some code that does the 
packing properly as alignment issues can creep up. This code causes us to 
incur some CPU cycles at that point.

If we're doing unpacked, then we incur some cycles on passing the event to 
the sessiond, and sessiond suffers by having to write down some extra 
bytes, which is less efficient.

Either way, I think it means I can gain some minor performance 
improvements if I reorder my tracepoint arguments to a more efficient 
order - alignment-wise.

Am I barking up the wrong tree here?

Thanks,

Amit Margalit
IBM XIV - Storage Reinvented
XIV-NAS Development Team
Tel. 03-689-7774
Fax. 03-689-7230
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20130710/99876e57/attachment-0001.html>


More information about the lttng-dev mailing list