[PATCH 0/5, 2nd try] CTF Support

Yao Qi
2013-02-27T02:18:43Z

Hi,
This patch series is to teach GDB to save trace buffer into Common
Trace Format (CTF) and also read CTF file. Hui posted the
V1 some months ago and got some comments in the review. In order
to get these patches accepted by FSF GDB, we redesign the patches
and here is the V2.

At present, GDB is using TFILE format to save trace buffers and
trace saving logic is coupled with this format to some extent. In
order to save trace buffer in CTF, we did two things,

1) Decouple trace saving code with any specific trace file format
(such as TFILE). This is what patch 1/5 does.
2) Use CTF in a way similar to TFILE, which will reduce the cost of
supporting CTF.

Usually TFILE trace file is composed by two parts, definition part
and trace buffer data part. The latter is composed by multiple
trace frames, which is composed by different types of blocks. In CTF,
we have similar concepts "packet" and "event". A packet is composed
by several events, which can be of different types. We can use
"packet" to represent trace frame and "event" to represent block.

The definition part is human readable, about trace status, tracepoint
definitions, etc. They can be easily mapped to a certain type of CTF
event.

In this version, we haven't saved trace status, tracepoint definitions,
and trace variable definitions into CTF trace file. This doesn't
prevent user using this feature, and we'll address them in the follow
up patch series.
--
1.7.7.6