LTTng 0.6.78 : new compact channel
Mathieu Desnoyers <[email protected]>
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <20070315230133.GA1886@Krystal> |
Hi,
I just released LTTng 0.6.78 (which needs a complete update of all the
packages). It adds support for a "compact" channel. It aims at providing
the most compact representation of an event (data, event ID, TSC) on a
given system (cycle counter frequency and HZ setting) packed in 32 bits.
How to use it :
Make sure the HEARTBEAT and HEARTBEAT_EVENT kernel config options are
set, as well as FACILITY_COMPACT.
Change the compact.xml facility to add the high rate events you care
about (don't remove the heartbeat events, they are needed). There are
some examples of events in this facility : feel free to try them.
Regenerate the headers with genevent and copy them into your kernel tree
(follow QUICKSTART guide).
Quick example taken from compact.xml :
...
<event name="event_e" attribute="compact_data">
<description>Compact data event</description>
<field name="data1"> <uint_fixed size="4"/> </field>
<field name="data2"> <uint_fixed size="8"/> </field>
</event>
...
This event will write as much bits from the data1 field as possible
in the 32 bits header, given that it must also fit the event id and
the TSC. The MSB of the data that doesn't git are simply lost. It will
then put the data2 field right after the header.
You can see, in printks generated by ltt-heartbeat.ko module loading,
the number of bits available for data and used by the event ID. You can
request more bits of data by changing a define in ltt-heartbeat.c, but
the code will check that you can actually pack that much data given your
system's limitation (TSC frequency vs interval of the heartbeat timer) :
it will make sure a TSC wrap around should always be detectable. If you
ask for too much data, it will cap it to the maximum value supported by
your system. It sets the heartbeat timer interval accordingly. If you
want to pack more bits, try setting HZ to 1000 instead of 100 or 250 :
it will give you a finer-grained heartbeat timer.
Mathieu
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68