Change-Id: Ib4a6c59d841831d4b91298970cda039272149e04
Signed-off-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/70292
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
<stateAttribute type="constant" value="CPUs" />
<stateAttribute type="eventField" value="cpu" />
</location>
<stateAttribute type="constant" value="CPUs" />
<stateAttribute type="eventField" value="cpu" />
</location>
-<!-- Shortcut for the current scenario -->
- <location id="CurrentScenario">
- <stateAttribute type="constant" value="pattern" />
- <stateAttribute type="constant" value="scenarios" />
- <stateAttribute type="constant" value="#scenarioName" />
- </location>
<!-- The attribute initial specifies the FSMs that will be instanciated at the beginning of the analysis -->
<patternHandler initial="sched_switch:syscall">
<!-- The attribute initial specifies the FSMs that will be instanciated at the beginning of the analysis -->
<patternHandler initial="sched_switch:syscall">
<stateAttribute type="constant" value="Current_thread" />
</stateValue>
<stateValue type="query">
<stateAttribute type="constant" value="Current_thread" />
</stateValue>
<stateValue type="query">
- <stateAttribute type="location" value="CurrentScenario" />
+ <stateAttribute type="constant" value="#CurrentScenario" />
<stateAttribute type="constant" value="thread" />
</stateValue>
</condition>
<stateAttribute type="constant" value="thread" />
</stateValue>
</condition>
<action id="sys_x_founded">
<!-- Save the name of the system call executed under the current scenario path-->
<stateChange>
<action id="sys_x_founded">
<!-- Save the name of the system call executed under the current scenario path-->
<stateChange>
- <stateAttribute type="location" value="CurrentScenario" />
+ <stateAttribute type="constant" value="#CurrentScenario" />
<stateAttribute type="constant" value="syscall" />
<stateAttribute type="constant" value="name" />
<stateValue type="eventName"/>
</stateChange>
<!-- Save the value of the CPU under the current scenario path -->
<stateChange>
<stateAttribute type="constant" value="syscall" />
<stateAttribute type="constant" value="name" />
<stateValue type="eventName"/>
</stateChange>
<!-- Save the value of the CPU under the current scenario path -->
<stateChange>
- <stateAttribute type="location" value="CurrentScenario" />
+ <stateAttribute type="constant" value="#CurrentScenario" />
<stateAttribute type="constant" value="cpu" />
<stateValue type="eventField" value="cpu"/>
</stateChange>
<!-- Save the value of the current thread PID under the current scenario path -->
<stateChange>
<stateAttribute type="constant" value="cpu" />
<stateValue type="eventField" value="cpu"/>
</stateChange>
<!-- Save the value of the current thread PID under the current scenario path -->
<stateChange>
- <stateAttribute type="location" value="CurrentScenario" />
+ <stateAttribute type="constant" value="#CurrentScenario" />
<stateAttribute type="constant" value="thread" />
<stateValue type="query">
<stateAttribute type="location" value="CurrentCPU" />
<stateAttribute type="constant" value="thread" />
<stateValue type="query">
<stateAttribute type="location" value="CurrentCPU" />
<segType>
<segName>
<stateValue type="query">
<segType>
<segName>
<stateValue type="query">
- <stateAttribute type="location" value="CurrentScenario" />
+ <stateAttribute type="constant" value="#CurrentScenario" />
<stateAttribute type="constant" value="syscall" />
<stateAttribute type="constant" value="name" />
</stateValue>
<stateAttribute type="constant" value="syscall" />
<stateAttribute type="constant" value="name" />
</stateValue>
-->
<fsm id="sched_switch" multiple="false">
<!-- if event.name != sched_switch, no processing will be done -->
-->
<fsm id="sched_switch" multiple="false">
<!-- if event.name != sched_switch, no processing will be done -->
+ <precondition event="sched_switch"/>
<initial>
<transition target="sched_switch"/>
<initial>
<transition target="sched_switch"/>
- <precondition event="sched_switch"/>
</initial>
<state id="sched_switch">
<!-- The state will stay here forever and execute the action "update current thread" each time a sched_switch event will be meet-->
</initial>
<state id="sched_switch">
<!-- The state will stay here forever and execute the action "update current thread" each time a sched_switch event will be meet-->
<xs:element maxOccurs="unbounded" minOccurs="1" name="transition" type="transition">
<xs:annotation>
<xs:documentation>Declares a transition for the state.</xs:documentation></xs:annotation></xs:element>
<xs:element maxOccurs="unbounded" minOccurs="1" name="transition" type="transition">
<xs:annotation>
<xs:documentation>Declares a transition for the state.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="precondition" type="transition">
- <xs:annotation>
- <xs:documentation>Declares a precondition for this fsm. At least one of the preconditions needs to be validated before being able to activate process the fsm. A precondition is a transition with no target or action. It should contains only conditions that needs to be validated.</xs:documentation></xs:annotation></xs:element>
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:complexType>
<xs:element maxOccurs="1" minOccurs="0" name="onexit" type="handlers">
<xs:annotation>
<xs:documentation>Declares a list of actions to execute when exiting the complex state.</xs:documentation></xs:annotation></xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="onexit" type="handlers">
<xs:annotation>
<xs:documentation>Declares a list of actions to execute when exiting the complex state.</xs:documentation></xs:annotation></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="precondition" type="transition">
+ <xs:annotation>
+ <xs:documentation>Declares a precondition for this fsm. At least one of the preconditions needs to be validated before being able to activate process the fsm. A precondition is a special transition with no target or action. It should contains only conditions that needs to be validated. Only used for fsm.</xs:documentation></xs:annotation></xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="initial" type="initialState">
<xs:annotation>
<xs:documentation>Declares the default initial state of this complex state. Must not be specified for an atomic state</xs:documentation></xs:annotation></xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="initial" type="initialState">
<xs:annotation>
<xs:documentation>Declares the default initial state of this complex state. Must not be specified for an atomic state</xs:documentation></xs:annotation></xs:element>