Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Multiple state providers

Not Genevieve here, (Matthew K)

You can using the incubator. Please take a look at test_callstack.xml in 
git/org.eclipse.tracecompass.incubator/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/test_xml_files

I have attached the file for your information.

BR,
Matthew.

From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Wednesday, March 4, 2020 8:28 PM
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Subject: Re: [tracecompass-dev] Multiple state providers
 
Hi Genevieve, 


For the state system described using XML, is there a way and example that I can use a stack to push and pop the value of an attribute? E.g. when an event happen, I want to push the current attribute value (old) to a stack and update the attribute with the new value. After another event, I want to pop the value from a stack and use it as the current attribute value. It seems lots of application, e.g. call stack, are like this behavior and it could be a very useful feature, if it is not there. 

Thank you
Yonghong

On Tue, Mar 3, 2020 at 12:28 PM tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx> wrote:
Thank you very much Genevieve. I will give it a try. 
Yonghong

On Tue, Mar 3, 2020 at 10:30 AM tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx> wrote:

Hi Yonghong,

Yes you definitely can! As long as each of your XML analysis has a different ID, the ID being the one from the state provider or pattern element, so you have a line like this in your XML:


<stateProvider id="test.xml.attributes" version="1">

or

<pattern id="org.eclipse.tracecompass.xml.tests.statevaluescenarios" version="0">


Best regards,

Geneviève


On 3/2/20 4:13 PM, tracecompass developer discussions wrote:
We are experimenting tracecompass XML-based data-driven analysis. Can we create two or multiple XML files, each with its own provider (unique named) and then imported to the tracecompass to process a trace. Basically, are we allowed to have two or more state systems for the same trace. 
Thank you
Yonghong

_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tracecompass-dev
_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tracecompass-dev
_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tracecompass-dev
<?xml version="1.0" encoding="UTF-8"?>
<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
<!-- ***************************************************************************
* Copyright (c) 2017 École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/*\1 SPDX-License-Identifier: EPL-2.0
*************************************************************************** -->
<callstack id="callstack.analysis">
	<callstackGroup>
		<level path="threads/*"/>
	</callstackGroup>

	<pattern version="0" id="callstack.pattern">
		<head>
			<traceType id="org.eclipse.linuxtools.tmf.core.tests.xmlstub" />
			<label value="Test XML callstack" />
		</head>

		<patternHandler>

			<action id="functionEntry">
				<stateChange>
					<stateAttribute type="constant" value="threads" />
					<stateAttribute type="eventField" value="tid" />
					<stateAttribute type="constant" value="CallStack" />
					<stateValue type="eventField" value="op" stack="push"/>
				</stateChange>
			</action>

			<action id="functionExit">
				<stateChange>
					<stateAttribute type="constant" value="threads" />
					<stateAttribute type="eventField" value="tid" />
					<stateAttribute type="constant" value="CallStack" />
					<stateValue type="eventField" value="op" stack="pop"/>
				</stateChange>
			</action>

			<fsm id="callstack" multiple="false" initial="oneState">
				<state id="oneState">
					<transition event="entry" target="oneState" action="functionEntry"/>
					<transition event="exit" target="oneState" action="functionExit"/>
				</state>
			</fsm>

		</patternHandler>
	</pattern>
</callstack>

<timeGraphView id="callstack.pattern.tgview">
	<head>
		<analysis id="callstack.analysis" />
		<label value="XML Callstack SS view" />
	</head>
	<!-- StateValues -->

	<!-- Control Flow View -->
	<entry path="threads/*">
		<display type="self" />
		<entry path="callstack/*">
			<display type="self" />
		</entry>
	</entry>
</timeGraphView>
</tmfxml>

Back to the top