Trace capture objects are responsible for storing and delivering trace data.
Some trace capture devices reside on the platform itself, such as CoreSight ETB, TMC/ETB
and TMC/ETR. Some trace capture devices capture trace into off-platform storage, such as
DSTREAM with its 4GB trace buffer.
The following figure shows the class hierarchy and interfaces for Trace Capture
device.
Figure 15-7 DTSL Trace Capture Objects
The following is a typical code sequence from a DTSL Jython script to create an
ETB trace capture device:
1. devID = self.findDevice("CSETB")
2. self.ETB = ETBTraceCapture(self, devID, "ETB")
3. self.ETB.setFormatterMode(FormatterMode.BYPASS)
4. self.ETB.addTraceSource(self.ETM, self.coretexA8.getID())
5. self.addTraceCaptureInterface(self.ETB)
6. self.setManagedDevices([self.ETM, self.ETB])
Line 1 locates the ETB device ID (number) from the RDDI configuration (
.rvc file). Line 2 creates the
ETBTraceCapture
object with the name “ETB”. Line 3 configures the
formatter mode of the ETB. Line 4 adds an ETM object, such as that created by the code
sequence in
15.5.4 DTSL trace source objects, to the
set of trace sources to associate with the trace capture device. This should be done for
all trace source objects which deliver trace to the trace capture device. To associate
the ETM with a core, the code uses a version of the
addTraceSource()
method which allows it to associate the core by its ID.
Line 5 adds the trace capture device to the DTSL configuration. Line 6 tells DTSL to
automatically manage connection and disconnection to and from the ETM and ETB
devices.
When a client program has a reference to the DTSL configuration object, it can
query it for its set of trace capture devices. For each trace capture device, it can
find out which trace sources feed into the trace capture device.