Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Question about creating XML stateProvider for custom trace format

Hi Robbert,


Thanks for your feedback.


Right now as it is, all events in traces using custom parsers have the same name. So the way you are doing is exactly what you need to do.


I faced this problem no later than last week. There's a bug for this [1] and a patch proposed to add an "event Name" field in the custom parsers [2]. *Disclaimer* They haven't been discussed yet, so it might not be the final solution. But this way, the event name is taken from one of the fields so there's not one event name anymore. This makes writing XML analysis for custom traces _much_ easier. In the short term, you could use this patch by running TraceCompass with the source code. Or if you wish, I can provide you a link to a version of TraceCompass that includes this patch (I haven't made a build for it yet).


Cheers,

Geneviève


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=494697

[2] https://git.eclipse.org/r/#/c/73803/


On 02/06/16 08:08 AM, Robbert Jongeling wrote:

Dear TraceCompass developers,

I would like to ask you for some help with creating an XML state provider.
Specifically, how to get an eventHandler to recognize an eventName.


The traces I am using are in CSV format, which I have parsed using the wizard.
To create a Gantt-chart of the events in this trace, I have then created a stateProvider.
I have managed to get this stateProvider to work by creating only events with the same name (the Trace Type as indicated in the wizard)
and then in each handler conditionally check for a different field, e.g.:

<eventHandler eventName="MyCustomTextTraceType">
<stateChange>
<if>
<condition>
<field name="someField"/>
<stateValue type="string" value="thisIsTheEventIWant"/>
</condition>
</if>
<then>
<stateAttribute type="constant" value="Foo"/>
<stateAttribute type="eventField" value="someOtherField"/>
<stateValue type="int" value="someOtherValue"/>
</then>
</stateChange>
</eventHandler>

(And this repeated for each possible value of "someField")

I would like to distinguish between the events as is done in the example in the user guide:

<eventHandler eventName="thisIsTheEventIWant">
<stateChange>
<stateAttribute type="constant" value="Foo"/>
<stateAttribute type="eventField" value="someOtherField"/>
<stateValue type="int" value="someOtherValue"/>
</stateChange>
</eventHandler>

It feels as if there should be a very simple solution here, just "tell" the stateProvider where to look for the eventName.
However, I have not managed to find this solution.
I would greatly appreciate any help.


Kind regards,

Robbert




_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tracecompass-dev


Back to the top