Re: Flight recorder mode

Jan Kiszka <[email protected]> Wed, 20 Feb 2008 11:31:40 +0100
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
Jan Kiszka wrote:
> Mathieu Desnoyers wrote:
>> * Jan Kiszka ([email protected]) wrote:
>>> Mathieu Desnoyers wrote:
>>>> * Jan Kiszka ([email protected]) wrote:
>>>>> Hi,
>>>>>
>>>>> I'm trying to understand the flight recorder mode (including the hybrid
>>>>> one) of LTTng. I originally expected that this mode means:
>>>>>
>>>>>  1. Fixed set of buffers, older data will be overwritten on wrap-around
>>>>>  2. Limited size of trace files
>>>>>
>>>>> While 1. seems to be true, 2. is neither what I observe in the output
>>>>> directory (flight-cpu_* get larger and larger) nor what I can find in
>>>>> lttd's code. Intentionally?
>>>>>
>>>> Yep, see the other lttctl options and the quickstart guide to see how to
>>>> spawn one lttd for the "normal" channels and a different one for the
>>>> flight recorder channels (should be done after you stop tracing).
>>> Sorry, /me is too blind: The quickstart guide is not mentioning flight
>>> recorder or hybrid mode, and also lttctl --help gives me no hint what
>>> pattern to apply for achieving limited trace file sizes.
>>>
>> Hrm, or do I recall doing documentaion I haven't done, let's see :)
>>
>> Ah, it's in a mailing list, not in the documentation yet :
>>
>> http://osdir.com/ml/linux.kernel.tracing/2006-09/msg00015.html
>>
>> It explains how to use the hybrid mode.  I'll cut'n'paste it at the end
>> of the quickstart guide.
>>
>> There is not trace file size limit you can give to lttctl nor lttd. You
>> can only specify the buffer size. The idea is that you can decide at
>> which moment you want to take you flight recorder "snapshot" by running
>> lttctl -f at the correct moment.
> 
> OK, -EBRAINSUSPENDED, you just woke it up again:
> 
> lttctl -b -n mytrace -m flight -l <debugfs>/ltt
> <run application>
> <when something happened:>
> lttctl -f -n mytrace -t <trace-out> -l <debugfs>/ltt

Hmm, in fact this won't fly yet. It looks like I need the hybrid mode,
because flight recorder traces generated like above are lacking some
basic information (stuff under /control I guess) to make lttv happy.

That leaves me with a (for now) acceptable tracing procedure via hybrid
traces. But I'm still lacking some howto for pure flight recorder
traces. Any hints still appreciated... :)

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux