aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Wininger2014-01-13 21:51:44 (EST)
committerGenevieve Bastien2014-02-28 08:47:36 (EST)
commit94b1c24c27f013f1ce6800e86512a77cd0d49a9b (patch)
treee36b567eb75b32ec7812194a14e322276a25bb2f
parenta3b3690d80ebfe65b72a15707addde6d9ecb985b (diff)
downloadorg.eclipse.linuxtools-94b1c24c27f013f1ce6800e86512a77cd0d49a9b.zip
org.eclipse.linuxtools-94b1c24c27f013f1ce6800e86512a77cd0d49a9b.tar.gz
org.eclipse.linuxtools-94b1c24c27f013f1ce6800e86512a77cd0d49a9b.tar.bz2
TMF: Add XML state provider schema definition and test filerefs/changes/95/20595/9
This patch adds to the XSD the schema definition for a full XML-defined state provider. The valid test file is also augmented to use that definition. Change-Id: Ib75082f04fae69f62f6c7990ee8c92ea4cc042e5 Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Signed-off-by: Florian Wininger <florian.wininger@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/20595 Tested-by: Hudson CI Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml588
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd134
2 files changed, 710 insertions, 12 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml
index e8895dd..859c61d 100644
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml
+++ b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***************************************************************************
- * Copyright (c) 2013 É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 v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- *************************************************************************** -->
+* Copyright (c) 2013 É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 v1.0 which
+* accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Florian Wininger - Initial API and implementation
+*************************************************************************** -->
<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="stateprovider.xsd">
@@ -18,5 +18,573 @@
<traceType id="org.eclipse.linuxtools.lttng2.kernel.tracetype" />
<label value="Xml kernel State System" />
</head>
+ <!-- StateValues -->
+ <definedValue name="CPU_STATUS_IDLE" value="0" />
+ <definedValue name="CPU_STATUS_RUN_USERMODE" value="1" />
+ <definedValue name="CPU_STATUS_RUN_SYSCALL" value="2" />
+ <definedValue name="CPU_STATUS_IRQ" value="3" />
+ <definedValue name="CPU_STATUS_SOFTIRQ" value="4" />
+
+ <definedValue name="PROCESS_STATUS_UNKNOWN" value="0" />
+ <definedValue name="PROCESS_STATUS_WAIT_BLOCKED" value="1" />
+ <definedValue name="PROCESS_STATUS_RUN_USERMODE" value="2" />
+ <definedValue name="PROCESS_STATUS_RUN_SYSCALL" value="3" />
+ <definedValue name="PROCESS_STATUS_INTERRUPTED" value="4" />
+ <definedValue name="PROCESS_STATUS_WAIT_FOR_CPU" value="5" />
+
+ <definedValue name="SOFT_IRQ_RAISED" value="-2" />
+
+ <!-- Shortcut Variables -->
+ <location id="CurrentThread">
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="query">
+ <stateAttribute type="constant" value="CPUs" />
+ <stateAttribute type="eventField" value="cpu" />
+ <stateAttribute type="constant" value="Current_thread" />
+ </stateAttribute>
+ </location>
+ <location id="CurrentCPU">
+ <stateAttribute type="constant" value="CPUs" />
+ <stateAttribute type="eventField" value="cpu" />
+ </location>
+ <location id="CurrentIRQ">
+ <stateAttribute type="constant" value="Resources"/>
+ <stateAttribute type="constant" value="IRQs"/>
+ <stateAttribute type="eventField" value="irq"/>
+ </location>
+ <location id="CurrentSoftIRQ">
+ <stateAttribute type="constant" value="Resources" />
+ <stateAttribute type="constant" value="Soft_IRQs" />
+ <stateAttribute type="eventField" value="vec" />
+ </location>
+ <location id="newCurrentThread">
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="next_tid" />
+ </location>
+
+ <!-- case 1 : exit_syscall : Fields: int64 ret -->
+ <eventHandler eventName="exit_syscall">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_USERMODE" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_USERMODE" />
+ </stateChange>
+ </eventHandler>
+ <!-- case 2 : irq_handler_entry : Fields: int32 irq, string name -->
+ <eventHandler eventName="irq_handler_entry">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentIRQ" />
+ <stateValue type="eventField" value="cpu" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_INTERRUPTED" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IRQ" />
+ </stateChange>
+ </eventHandler>
+ <!-- case 3 : irq_handler_exit : Fields: int32 irq, int32 ret -->
+ <eventHandler eventName="irq_handler_exit">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentIRQ" />
+ <stateValue type="null" />
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_SYSCALL" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Current_thread" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IDLE" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Current_thread" />
+ <stateValue type="int" value="0" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IDLE" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- case 4 : softirq_entry : Fields: int32 vec -->
+ <eventHandler eventName="softirq_entry">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentSoftIRQ" />
+ <stateValue type="eventField" value="cpu" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_INTERRUPTED" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_SOFTIRQ" />
+ </stateChange>
+ </eventHandler>
+ <!-- case 5 : softirq_exit : Fields: int32 vec -->
+ <eventHandler eventName="softirq_exit">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentSoftIRQ" />
+ <stateValue type="null" />
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_SYSCALL" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Current_thread" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IDLE" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Current_thread" />
+ <stateValue type="int" value="0" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IDLE" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- case 6 : softirq_raise : Fields: int32 vec -->
+ <eventHandler eventName="softirq_raise">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentSoftIRQ" />
+ <stateValue type="int" value="$SOFT_IRQ_RAISED" />
+ </stateChange>
+ </eventHandler>
+ <!-- case 7 : sched_switch : Fields: string prev_comm, int32 prev_tid,
+ int32 prev_prio, int64 prev_state, string next_comm, int32 next_tid, int32
+ next_prio -->
+ <eventHandler eventName="sched_switch">
+ <stateChange>
+ <if>
+ <condition>
+ <field name="prev_state" />
+ <stateValue type="long" value="0" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="prev_tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_FOR_CPU" />
+ </then>
+ <else>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="prev_tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_BLOCKED" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="newCurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="newCurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="newCurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </else>
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="newCurrentThread" />
+ <stateAttribute type="constant" value="Exec_name" />
+ <stateValue type="eventField" value="next_comm" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Current_thread" />
+ <stateValue type="eventField" value="next_tid" forcedType="int" />
+ </stateChange>
+ <stateChange>
+ <if>
+ <not>
+ <condition>
+ <field name="next_tid" />
+ <stateValue type="long" value="0" />
+ </condition>
+ </not>
+ </if>
+ <then>
+ <if>
+ <condition>
+ <stateAttribute type="location" value="newCurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_USERMODE" />
+ </then>
+ <else>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_SYSCALL" />
+ </else>
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <field name="next_tid" />
+ <stateValue type="long" value="0" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_IDLE" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- case 8 : sched_process_fork : Fields: string parent_comm, int32 parent_tid,
+ string child_comm, int32 child_tid -->
+ <eventHandler eventName="sched_process_fork">
+ <stateChange>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="PPID" />
+ <stateValue type="eventField" value="parent_tid" forcedType="int" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="Exec_name" />
+ <stateValue type="eventField" value="child_comm" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_FOR_CPU" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="query">
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="parent_tid" />
+ <stateAttribute type="constant" value="System_call" />
+ </stateValue>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="child_tid" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="string" value="sys_clone" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- case 10 : sched_process_free : Fields: string parent_comm, int32 parent_tid,
+ string child_comm, int32 child_tid -->
+ <eventHandler eventName="sched_process_free">
+ <stateChange>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateValue type="delete" />
+ </stateChange>
+ </eventHandler>
+ <!-- case 11 : lttng_statedump_process_state : Fields: int32 type, int32
+ mode, int32 pid, int32 submode, int32 vpid, int32 ppid, int32 tid, string
+ name, int32 status, int32 vtid -->
+ <eventHandler eventName="lttng_statedump_process_state">
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Exec_name" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Exec_name" />
+ <stateValue type="eventField" value="name" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="PPID" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="PPID" />
+ <stateValue type="eventField" value="ppid" forcedType="int" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <and>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="null" />
+ </condition>
+ <condition>
+ <field name="status" />
+ <stateValue type="long" value="2" />
+ </condition>
+ </and>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_FOR_CPU" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <and>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="null" />
+ </condition>
+ <condition>
+ <field name="status" />
+ <stateValue type="long" value="5" />
+ </condition>
+ </and>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_BLOCKED" />
+ </then>
+ </stateChange>
+ <stateChange>
+ <if>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="null" />
+ </condition>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_UNKNOWN" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- case 12 : sched_wakeup : case 13 : sched_wakeup_new : Fields (same
+ fields for both types): string comm, int32 tid, int32 prio, int32 success,
+ int32 target_cpu -->
+ <eventHandler eventName="sched_wakeup*">
+ <stateChange>
+ <if>
+ <and>
+ <not>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_USERMODE" />
+ </condition>
+ </not>
+ <not>
+ <condition>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </condition>
+ </not>
+ </and>
+ </if>
+ <then>
+ <stateAttribute type="constant" value="Threads" />
+ <stateAttribute type="eventField" value="tid" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_WAIT_FOR_CPU" />
+ </then>
+ </stateChange>
+ </eventHandler>
+ <!-- delfault : syscall -->
+ <eventHandler eventName="sys_*">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="eventName" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_SYSCALL" />
+ </stateChange>
+ </eventHandler>
+ <!-- delfault : compat_syscall -->
+ <eventHandler eventName="compat_sys_*">
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="System_call" />
+ <stateValue type="eventName" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentThread" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$PROCESS_STATUS_RUN_SYSCALL" />
+ </stateChange>
+ <stateChange>
+ <stateAttribute type="location" value="CurrentCPU" />
+ <stateAttribute type="constant" value="Status" />
+ <stateValue type="int" value="$CPU_STATUS_RUN_SYSCALL" />
+ </stateChange>
+ </eventHandler>
</stateProvider>
</tmfxml> \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd
index 281ec6d..73459e4 100644
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd
+++ b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd
@@ -23,8 +23,10 @@
<xs:complexType name="stateProvider">
<xs:sequence maxOccurs="1" minOccurs="1">
- <xs:element maxOccurs="1" minOccurs="0" name="head"
- type="headProvider" />
+ <xs:element maxOccurs="1" minOccurs="0" name="head" type="headProvider" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="definedValue" type="definedValue" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="location" type="location" />
+ <xs:element maxOccurs="unbounded" minOccurs="1" name="eventHandler" type="eventHandler" />
</xs:sequence>
<xs:attribute name="analysisId" type="xs:string" use="required" />
<xs:attribute name="version" type="xs:integer" use="required" />
@@ -45,4 +47,132 @@
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="definedValue">
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="value" type="xs:string" use="required" />
+ </xs:complexType>
+
+ <xs:complexType name="location">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" />
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required" />
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:complexType name="eventHandler">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="1" name="stateChange" type="stateChange" />
+ </xs:sequence>
+ <xs:attribute name="eventName" type="xs:string" use="required" />
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:complexType name="stateChange">
+ <xs:choice maxOccurs="1" minOccurs="1">
+ <xs:sequence maxOccurs="1" minOccurs="1">
+ <xs:element maxOccurs="unbounded" minOccurs="1" name="stateAttribute" type="stateAttribute" />
+ <xs:element maxOccurs="1" minOccurs="1" name="stateValue" type="stateValue" />
+ </xs:sequence>
+ <xs:sequence maxOccurs="1" minOccurs="1">
+ <xs:element maxOccurs="1" minOccurs="1" name="if" type="conditionSingle" />
+ <xs:element maxOccurs="1" minOccurs="1" name="then" type="stateChange" />
+ <xs:element maxOccurs="1" minOccurs="0" name="else" type="stateChange" />
+ </xs:sequence>
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="condition">
+ <xs:sequence maxOccurs="1" minOccurs="1">
+ <xs:choice maxOccurs="1" minOccurs="1">
+ <xs:element maxOccurs="unbounded" minOccurs="1" name="stateAttribute" type="stateAttribute" />
+ <xs:element maxOccurs="1" minOccurs="1" name="field" type="eventField" />
+ </xs:choice>
+ <xs:element maxOccurs="1" minOccurs="1" name="stateValue" type="stateValue" />
+ </xs:sequence>
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:complexType name="conditionSingle">
+ <xs:choice maxOccurs="1" minOccurs="1">
+ <xs:element name="condition" type="condition" />
+ <xs:element name="not" type="conditionSingle" />
+ <xs:element name="and" type="conditionMultiple" />
+ <xs:element name="or" type="conditionMultiple" />
+ </xs:choice>
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:complexType name="conditionMultiple">
+ <xs:sequence maxOccurs="unbounded" minOccurs="1">
+ <xs:element maxOccurs="1" minOccurs="0" name="condition" type="condition" />
+ <xs:element maxOccurs="1" minOccurs="0" name="or" type="conditionMultiple" />
+ <xs:element maxOccurs="1" minOccurs="0" name="and" type="conditionMultiple" />
+ <xs:element maxOccurs="1" minOccurs="0" name="not" type="conditionSingle" />
+ </xs:sequence>
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:complexType name="stateAttribute">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" />
+ </xs:sequence>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="null" />
+ <xs:enumeration value="constant" />
+ <xs:enumeration value="eventField" />
+ <xs:enumeration value="location" />
+ <xs:enumeration value="query" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="value" type="xs:string" />
+ </xs:complexType>
+
+ <xs:complexType name="stateValue">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" />
+ </xs:sequence>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="null" />
+ <xs:enumeration value="int" />
+ <xs:enumeration value="long" />
+ <xs:enumeration value="string" />
+ <xs:enumeration value="eventField" />
+ <xs:enumeration value="eventName" />
+ <xs:enumeration value="delete" />
+ <xs:enumeration value="query" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="increment" type="xs:boolean" />
+ <xs:attribute name="stack">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="pop"/>
+ <xs:enumeration value="push"/>
+ <xs:enumeration value="peek"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="forcedType">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="int" />
+ <xs:enumeration value="long" />
+ <xs:enumeration value="string" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="value" type="xs:string" />
+ </xs:complexType>
+
+ <xs:complexType name="eventField">
+ <xs:attribute name="name" type="xs:string" use="required" />
+ </xs:complexType>
+
</xs:schema>