TMF: Add XML state provider schema definition and test file
authorFlorian Wininger <florian.wininger@polymtl.ca>
Tue, 14 Jan 2014 02:51:44 +0000 (21:51 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Fri, 28 Feb 2014 13:47:36 +0000 (08:47 -0500)
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>

org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd

index e8895dd01cd8c35163f72fa1585c69b645321cf0..859c61d3329a7f0a28ea8e0f726af7cf94086bb6 100644 (file)
@@ -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">
 
                        <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
index 281ec6d0a3dc39b100314486a78a28a383d3915a..73459e4c9fa84cabb9b34c5a2044fd7138812105 100644 (file)
 
        <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" />
                </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>
This page took 0.036712 seconds and 5 git commands to generate.