Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Trace Compass » XML state provider for generic CTF
XML state provider for generic CTF [message #1794504] Fri, 31 August 2018 14:30 Go to next message
Buck Fobb is currently offline Buck FobbFriend
Messages: 2
Registered: August 2018
Junior Member
I'm trying to take baby steps with Trace Compass to make my own parsers for bare metal non-Linux tracking. I'm outputting a simple trace in CTF format and have successfully imported into Trace Compass. TC recognized/tagged it as "Common Trace Format:Generic CTF Trace". Below is what the event list looks like in Eclipse:

Timestamp		Event type	Contents
16:00:13.059 673	ThreadRun	threadId=40
16:00:13.059 768	ThreadRun	threadId=15
16:00:13.059 786	ThreadRun	threadId=40
16:00:13.059 823	ThreadRun	threadId=3
16:00:13.059 855	ThreadSleep	threadId=3, sleepUsec=1000
16:00:13.059 859	ThreadRun	threadId=40
16:00:13.059 996	ThreadRun	threadId=0


I'm trying to just get an extremely simple/useless custom xml working similar to what's documented in http://archive.eclipse.org/tracecompass/doc/stable/org.eclipse.tracecompass.doc.user/Data-driven-analysis.html#Data_driven_analysis so that I can verify the basic steps and understand what's going on. Below is the xml:

<?xml version="1.0" encoding="UTF-8"?>
<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
    <stateProvider version="0" id="thread.test.analysis">
        <head>
            <!-- traceType id="?" /-->
            <label value="Thread test analysis" />
        </head>

        <definedValue name="RUNNING" value="0" />

        <eventHandler eventName="ThreadRun">
            <stateChange>
                <stateAttribute type="constant" value="Tasks" />
                <stateAttribute type="eventField" value="threadId" />
                <stateValue type="int" value="$RUNNING" />
            </stateChange>
        </eventHandler>
    </stateProvider>
</tmfxml>


I see "Thread test analysis" show up in the State System Explorer view but no tree nodes under it.

What am I doing wrong? What is traceType supposed to be for a generic CTF?

Thanks in advance for your help.
Re: XML state provider for generic CTF [message #1794517 is a reply to message #1794504] Fri, 31 August 2018 18:15 Go to previous messageGo to next message
Jean-Christian Kouame is currently offline Jean-Christian KouameFriend
Messages: 1
Registered: August 2018
Junior Member
Hi,

What you see in the tree is normal since you only define an analysis in the xml file with no view associated.
If you want to see a view, you should add a view description in your xml file. An example would be:

<timeGraphView id="thread.test.view">
<head>
<analysis id="thread.test.analysis" />
<label value="Thread Test Status" />
</head>

<entry path="Tasks/*">
<display type="self" />
</entry>
</timeGraphView>

Please take a look at the XSD file for the view definition:
https://github.com/tracecompass/tracecompass/blob/master/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/module/xmlView.xsd

other useful XSD files:
https://github.com/tracecompass/tracecompass/blob/master/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/module/xmlCommon.xsd

https://github.com/tracecompass/tracecompass/blob/master/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/module/xmlDefinition.xsd

https://github.com/tracecompass/tracecompass/blob/master/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/module/xmlStateProvider.xsd

https://github.com/tracecompass/tracecompass/blob/master/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/module/xmlPatternStateProvider.xsd

Re: XML state provider for generic CTF [message #1794518 is a reply to message #1794504] Fri, 31 August 2018 18:17 Go to previous message
Genevieve Bastien is currently offline Genevieve BastienFriend
Messages: 1
Registered: March 2017
Junior Member
Hi!

Did you double-click on the "Thread test analysis" in the State System Explorer view? The XML analyses are executed only when a view requests its content (and you don't seem to have any view) _or_ when you manually ask for the execution by double-clicking in the State System Explorer.
Previous Topic:Help non-Linux/non-Java embedded C developer make use of Trace Compass
Goto Forum:
  


Current Time: Mon Sep 24 11:07:48 GMT 2018

Powered by FUDForum. Page generated in 0.02599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top