> I proposed, and currently chair the newly formed Multicore Association,
Great! it may be a good idea to start accumulating pointers, identified
shortcomings, ideas... in preparation for this and LinuxCon.
...
...
This is indeed the problem I currently see with Ftrace, suitability for
huge live/realtime traces. For this you need an extremely compact format
and a good way to pass and update metadata along with the trace.
Otherwise, Ftrace and Perf offer a large number of exciting features.
In LTTng, following some feedback from Google among others, quite a bit
of information is implicit: per cpu files and scheduling events obviate
the need for pid and cpu id; event ids implicitly tells the event size
and format... Similarly, event ids are scoped by channel using little
space, and timestamps do not store all the most significant bits. Since
new modules may be loaded at any time with new event types, the dynamic
allocation of event ids and update of associated metadata is something
which must be handled properly.
Other approaches are possible to achieve the same result. Aaron Spear
mentioned "contexts" to qualify node/cpu/pid, I am eager to learn more
about that... You could have "define context" events, where a context id
would be associated with a number of attributes (CPU, pid, event
name...) and could be reused at any time simply by issuing another
"define context" event with the same id but different attributes. The
important part is that each event should use little more than its
specific payload (typical event has a payload of 4 bytes and occupies a
total of 8 to 12 bytes on LTTng). Ftrace currently has a large number of
common fields and was thus not optimised for this; this rapidly turns a
10GB trace into a 30GB one.
The second important missing feature is dynamic updates of the metadata
as new event types are added when modules are loaded. In LTTng, metadata
is received as events of a predefined type in a dedicated channel. I am
sure that something similar could be possible for Ftrace.
We have some neat and fairly sophisticated tools in LTTV now to
correlate traces taken on distributed systems with non synchronized
clocks simply by looking at messages exchanges.
--