1<?xml version="1.0" encoding="UTF-8"?> 2<xs:schema 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"> 4 <xs:element name="profile"> 5 <xs:complexType> 6 <xs:sequence> 7 <xs:element minOccurs="1" maxOccurs="1" ref="options"/> 8 <xs:element minOccurs="1" maxOccurs="1" ref="setup"/> 9 <xs:element minOccurs="0" maxOccurs="1" ref="classes"/> 10 <xs:choice> 11 <xs:element maxOccurs="unbounded" ref="process"/> 12 <!-- a binary can be either an application or a library --> 13 <xs:element maxOccurs="unbounded" ref="binary"/> 14 </xs:choice> 15 <xs:element minOccurs="1" maxOccurs="1" ref="symboltable"/> 16 <!-- put details last to allow parser to gather summary information --> 17 <xs:element minOccurs="0" maxOccurs="unbounded" ref="detailtable"/> 18 <!-- bytestable only present when details option used --> 19 <xs:element minOccurs="0" maxOccurs="1" ref="bytestable"/> 20 </xs:sequence> 21 <xs:attribute name="title" type="xs:string" use="required"/> 22 <!-- integer part of schemaversion should changes for major schema --> 23 <xs:attribute name="schemaversion" use="required"> 24 <xs:simpleType> 25 <xs:restriction base = "xs:string"> 26 <xs:pattern value = "3\.[0-9]+"/> 27 </xs:restriction> 28 </xs:simpleType> </xs:attribute> 29 30 <xs:attribute name="cputype" type="xs:NCName" use="required"/> 31 <xs:attribute name="processor" type="xs:NCName" use="required"/> 32 <xs:attribute name="mhz" type="xs:decimal" use="required"/> 33 <!-- separatedcpus is only used for profiles with separate=cpu --> 34 <xs:attribute name="separatedcpus" type="xs:nonNegativeInteger" use="optional"/> 35 </xs:complexType> 36 </xs:element> 37 38 <xs:element name="options"> 39 <xs:complexType> 40 <xs:attribute name="session" type="xs:string" use="optional"/> 41 <xs:attribute name="debuginfo" type="xs:boolean" use="optional"/> 42 <xs:attribute name="details" type="xs:boolean" use="optional"/> 43 <xs:attribute name="excludedependent" type="xs:boolean" use="optional"/> 44 <xs:attribute name="excludesymbols" type="xs:string" use="optional"/> 45 <xs:attribute name="imagepath" type="xs:string" use="optional"/> 46 <xs:attribute name="includesymbols" type="xs:string" use="optional"/> 47 <xs:attribute name="merge" type="xs:string" use="optional"/> 48 <xs:attribute name="reversesort" type="xs:boolean" use="optional"/> 49 </xs:complexType> 50 </xs:element> 51 <xs:element name="setup"> 52 <xs:complexType> 53 <xs:choice> 54 <xs:element maxOccurs="1" ref="timersetup"/> 55 <xs:element maxOccurs="unbounded" ref="eventsetup"/> 56 </xs:choice> 57 </xs:complexType> 58 </xs:element> 59 60 <xs:element name="timersetup"> 61 <xs:complexType> 62 <xs:attribute name="rtcinterrupts" type="xs:nonNegativeInteger"/> 63 </xs:complexType> 64 </xs:element> 65 66 <xs:element name="eventsetup"> 67 <xs:complexType> 68 <xs:attribute name="id" type="xs:nonNegativeInteger" use="required"/> 69 <xs:attribute name="eventname" type="xs:Name" use="required"/> 70 <xs:attribute name="unitmask" type="xs:string" use="optional"/> 71 <xs:attribute name="setupcount" type="xs:nonNegativeInteger" use="required"/> 72 </xs:complexType> 73 </xs:element> 74 75 <!-- 76 the cpu attribute will only be present in profiles with more than one 77 separated cpus. the event attribute will only appear if there is more 78 than one event in the profile. the mask attribute will only appear if 79 there is a single non-zero mask, or multiple mask values. 80 --> 81 <xs:element name="class"> 82 <xs:complexType> 83 <xs:attribute name="name" type="xs:string" use="required"/> 84 <xs:attribute name="cpu" type="xs:nonNegativeInteger" use="optional"/> 85 <xs:attribute name="event" type="xs:nonNegativeInteger" use="optional"/> 86 <xs:attribute name="mask" type="xs:nonNegativeInteger" use="optional"/> 87 </xs:complexType> 88 </xs:element> 89 90 <xs:element name="classes"> 91 <xs:complexType> 92 <xs:sequence> 93 <xs:element minOccurs="1" maxOccurs="unbounded" ref="class"/> 94 </xs:sequence> 95 </xs:complexType> 96 </xs:element> 97 98 <xs:element name="count"> 99 <xs:complexType> 100 <xs:simpleContent> 101 <xs:extension base="xs:nonNegativeInteger"> 102 <!-- if no separation by cpu and only a single non masked event 103 the class attribute is unnecessary --> 104 <xs:attribute name="class" type="xs:string" use="optional"/> 105 </xs:extension> 106 </xs:simpleContent> 107 </xs:complexType> 108 </xs:element> 109 110 <xs:element name="process"> 111 <xs:complexType> 112 <xs:sequence> 113 <xs:element minOccurs="1" maxOccurs="1" ref="count"/> 114 <xs:element minOccurs="1" maxOccurs="unbounded" ref="thread"/> 115 </xs:sequence> 116 <xs:attribute name="pid" type="xs:integer" use="required"/> 117 <xs:attribute name="name" type="xs:string" use="required"/> 118 </xs:complexType> 119 </xs:element> 120 121 <xs:element name="thread"> 122 <xs:complexType> 123 <xs:sequence> 124 <xs:element minOccurs="1" maxOccurs="1" ref="count"/> 125 <xs:element minOccurs="1" maxOccurs="unbounded" ref="module"/> 126 </xs:sequence> 127 <xs:attribute name="tid" type="xs:integer" use="required"/> 128 </xs:complexType> 129 </xs:element> 130 131 <xs:element name="binary"> 132 <xs:complexType> 133 <xs:sequence> 134 <xs:element minOccurs="1" maxOccurs="1" ref="count"/> 135 <xs:element minOccurs="0" maxOccurs="unbounded" ref="symbol"/> 136 <!-- When the separate=lib option is used an binary 137 can contain a list of library Modules. --> 138 <xs:element minOccurs="0" maxOccurs="unbounded" ref="module"/> 139 </xs:sequence> 140 <xs:attribute name="name" type="xs:string" use="required"/> 141 </xs:complexType> 142 </xs:element> 143 144 <xs:element name="module"> 145 <xs:complexType> 146 <xs:sequence> 147 <xs:element minOccurs="0" maxOccurs="1" ref="count"/> 148 <xs:element minOccurs="1" maxOccurs="unbounded" ref="symbol"/> 149 </xs:sequence> 150 <xs:attribute name="name" type="xs:string" use="required"/> 151 </xs:complexType> 152 </xs:element> 153 154 <xs:element name="callees"> 155 <xs:complexType> 156 <xs:choice> 157 <xs:element minOccurs="0" maxOccurs="unbounded" ref="module"/> 158 <xs:element minOccurs="0" maxOccurs="unbounded" ref="symbol"/> 159 </xs:choice> 160 </xs:complexType> 161 </xs:element> 162 163 <xs:element name="callers"> 164 <xs:complexType> 165 <xs:choice> 166 <xs:element minOccurs="0" maxOccurs="unbounded" ref="module"/> 167 <xs:element minOccurs="0" maxOccurs="unbounded" ref="symbol"/> 168 </xs:choice> 169 </xs:complexType> 170 </xs:element> 171 172 173 <xs:element name="symboltable"> 174 <xs:complexType> 175 <xs:sequence> 176 <xs:element minOccurs="1" maxOccurs="unbounded" ref="symboldata"/> 177 </xs:sequence> 178 </xs:complexType> 179 </xs:element> 180 181 <!-- 182 The symboldata element contains the symbolic debug information that is 183 made available by the debug-info and details options. This information 184 is shared across by all module instances that reference it and thus it 185 does not contain any sample dependent data. 186 --> 187 <xs:element name="symboldata"> 188 <xs:complexType> 189 <xs:attribute name="name" type="xs:string" use="required"/> 190 <xs:attribute name="id" type="xs:integer" use="required"/> 191 <!-- optional debug-info attributes --> 192 <xs:attribute name="file" type="xs:string" use="optional"/> 193 <xs:attribute name="line" type="xs:nonNegativeInteger" use="optional"/> 194 <!-- startingaddr: optional details or show-address attribute --> 195 <xs:attribute name="startingaddr" use="optional"/> 196 <!-- codelength: optional details attribute --> 197 <xs:attribute name="codelength" type="xs:integer" use="optional"/> 198 </xs:complexType> 199 </xs:element> 200 201 <xs:element name="symbol"> 202 <xs:complexType> 203 <xs:sequence> 204 <xs:element minOccurs="0" maxOccurs="1" ref="callers"/> 205 <xs:element minOccurs="0" maxOccurs="1" ref="callees"/> 206 <xs:element minOccurs="0" maxOccurs="1" ref="count"/> 207 </xs:sequence> 208 <!-- idref is an index into symboltable table--> 209 <xs:attribute name="idref" type="xs:nonNegativeInteger" use="required"/> 210 <!-- self is a boolean to mark self referencing callee symbols --> 211 <xs:attribute name="self" type="xs:boolean" use="optional"/> 212 <!-- detaillo,detailhi lookup ids into corresponding symboldetails --> 213 <xs:attribute name="detaillo" type="xs:nonNegativeInteger" use="optional"/> 214 <xs:attribute name="detailhi" type="xs:nonNegativeInteger" use="optional"/> 215 </xs:complexType> 216 </xs:element> 217 218 <!-- detailtable is a table of symboldetails that are referenced 219 from symboldata. The table is only generated with the details 220 option is used and appears at the end of the XML file so that 221 a GUI can process the summary data without having to process 222 all of the details. --> 223 <xs:element name="detailtable"> 224 <xs:complexType> 225 <xs:sequence> 226 <xs:element minOccurs="1" maxOccurs="unbounded" ref="symboldetails"/> 227 </xs:sequence> 228 </xs:complexType> 229 </xs:element> 230 231 <!-- symboldetails is a collection of all of the individual detaildata 232 associated with possibly multiple instances of a symbol. --> 233 <xs:element name="symboldetails"> 234 <xs:complexType> 235 <xs:sequence> 236 <xs:element minOccurs="1" maxOccurs="unbounded" ref="detaildata"/> 237 </xs:sequence> 238 <xs:attribute name="id" type="xs:integer" use="required"/> 239 </xs:complexType> 240 </xs:element> 241 242 <xs:element name="detaildata"> 243 <xs:complexType> 244 <xs:sequence> 245 <xs:element minOccurs="1" maxOccurs="unbounded" ref="count"/> 246 </xs:sequence> 247 <!-- line only occurs when debug-info option used --> 248 <xs:attribute name="line" type="xs:nonNegativeInteger" use="optional"/> 249 <!-- file only occurs when debug-info option used and 250 the file is different than the symbol associated with 251 this sample data. this situation can occur when inline functions 252 are defined in #include header files. 253 --> 254 <xs:attribute name="file" type="xs:string" use="optional"/> 255 <xs:attribute name="vmaoffset" type="xs:hexBinary" use="required"/> 256 <xs:attribute name="id" type="xs:integer" use="required"/> 257 </xs:complexType> 258 </xs:element> 259 260 <xs:element name="bytes"> 261 <xs:complexType> 262 <xs:simpleContent> 263 <xs:extension base="xs:hexBinary"> 264 <xs:attribute name="id" type="xs:nonNegativeInteger" use="required"/> 265 </xs:extension> 266 </xs:simpleContent> 267 </xs:complexType> 268 </xs:element> 269 270 <xs:element name="bytestable"> 271 <xs:complexType> 272 <xs:sequence> 273 <!-- Contains binary data for the machine instructions --> 274 <xs:element minOccurs="1" maxOccurs="unbounded" ref="bytes"/> 275 </xs:sequence> 276 </xs:complexType> 277 </xs:element> 278</xs:schema> 279 280