Blame SOURCES/oprofile-xml.patch

c532ac
diff -up oprofile-0.9.9/doc/ophelp.xsd.ophelp oprofile-0.9.9/doc/ophelp.xsd
c532ac
--- oprofile-0.9.9/doc/ophelp.xsd.ophelp	2014-05-28 10:09:46.279270117 -0400
c532ac
+++ oprofile-0.9.9/doc/ophelp.xsd	2014-05-28 10:08:59.416060557 -0400
c532ac
@@ -0,0 +1,57 @@
c532ac
+
c532ac
+
c532ac
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
c532ac
+  <xs:element name="help_events">
c532ac
+    <xs:complexType>
c532ac
+      <xs:sequence>
c532ac
+		<xs:element minOccurs="1" maxOccurs="1" ref="header"/>
c532ac
+		<xs:element minOccurs="1" maxOccurs="unbounded" ref="event"/>
c532ac
+      </xs:sequence>
c532ac
+      
c532ac
+      <xs:attribute name="schemaversion" use="required">
c532ac
+        <xs:simpleType>
c532ac
+          <xs:restriction base = "xs:string">
c532ac
+            <xs:pattern value = "1\.[0-9]+"/>
c532ac
+          </xs:restriction>
c532ac
+        </xs:simpleType>       </xs:attribute>
c532ac
+    </xs:complexType>
c532ac
+  </xs:element>
c532ac
+
c532ac
+  <xs:element name="header">
c532ac
+    <xs:complexType>
c532ac
+      <xs:attribute name="title" type="xs:string" use="required"/>
c532ac
+      <xs:attribute name="doc" type="xs:string" use="optional"/>
c532ac
+    </xs:complexType>
c532ac
+  </xs:element>
c532ac
+  
c532ac
+  <xs:element name="event">
c532ac
+    <xs:complexType>
c532ac
+      <xs:sequence>
c532ac
+	  <xs:element minOccurs="0" maxOccurs="1" ref="unit_masks"/>
c532ac
+      </xs:sequence>
c532ac
+      <xs:attribute name="event_name" type="xs:string" use="required"/>
c532ac
+      <xs:attribute name="group" type="xs:nonNegativeInteger" use="optional"/>
c532ac
+      <xs:attribute name="counter_mask" type="xs:nonNegativeInteger" use="required"/>
c532ac
+      <xs:attribute name="min_count" type="xs:nonNegativeInteger" use="required"/>
c532ac
+      <xs:attribute name="desc" type="xs:string" use="required"/>
c532ac
+    </xs:complexType>
c532ac
+  </xs:element>
c532ac
+  
c532ac
+  <xs:element name="unit_masks">
c532ac
+    <xs:complexType>
c532ac
+      <xs:sequence>
c532ac
+		<xs:element minOccurs="1" maxOccurs="unbounded" ref="unit_mask"/>
c532ac
+      </xs:sequence>
c532ac
+      <xs:attribute name="default" type="xs:nonNegativeInteger" use="required"/>
c532ac
+      <xs:attribute name="category" type="xs:string" use="required"/>
c532ac
+    </xs:complexType>
c532ac
+  </xs:element>
c532ac
+
c532ac
+  <xs:element name="unit_mask">
c532ac
+    <xs:complexType>
c532ac
+      <xs:attribute name="mask" type="xs:nonNegativeInteger" use="required"/>
c532ac
+      <xs:attribute name="desc" type="xs:string" use="required"/>
c532ac
+    </xs:complexType>
c532ac
+  </xs:element>
c532ac
+</xs:schema>
c532ac
+
c532ac
commit a339a069f4ceba748df44d2babd9f08ce06abd78
c532ac
Author: Maynard Johnson <maynardj@us.ibm.com>
c532ac
Date:   Thu Nov 7 08:24:05 2013 -0600
c532ac
c532ac
    ophelp schema is not included in installed files
c532ac
    
c532ac
    A one-line change in doc/Makefile.am was needed in order for
c532ac
    'make install' to put ophelp.xsd in <installdir>/share/doc/oprofile.
c532ac
    
c532ac
    Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
c532ac
c532ac
diff --git a/doc/Makefile.am b/doc/Makefile.am
c532ac
index 45fbe92..258842f 100644
c532ac
--- a/doc/Makefile.am
c532ac
+++ b/doc/Makefile.am
c532ac
@@ -26,7 +26,7 @@ man_MANS += operf.1 \
c532ac
 endif
c532ac
 
c532ac
 htmldir = $(prefix)/share/doc/oprofile
c532ac
-dist_html_DATA = oprofile.html internals.html opreport.xsd op-jit-devel.html
c532ac
+dist_html_DATA = oprofile.html internals.html opreport.xsd ophelp.xsd op-jit-devel.html
c532ac
 
c532ac
 if have_xsltproc
c532ac
 
c532ac
c532ac
commit ed40d8d444a17e7cf16a4653607b04a24f4c0513
c532ac
Author: William Cohen <wcohen@redhat.com>
c532ac
Date:   Tue Jan 28 11:05:46 2014 -0600
c532ac
c532ac
    Print unit mask name where applicable in ophelp XML output
c532ac
    
c532ac
    Some Intel architectures have named unit masks and it would be useful
c532ac
    to include the unit mask name in the XML output. This patch also
c532ac
    updates the ophelp.xsd schema file to include the optional unit
c532ac
    mask 'name' field.
c532ac
    
c532ac
    Signed-off-by: William Cohen <wcohen@redhat.com>
c532ac
c532ac
diff --git a/doc/ophelp.xsd b/doc/ophelp.xsd
c532ac
index 9bd7f82..c07bdb4 100644
c532ac
--- a/doc/ophelp.xsd
c532ac
+++ b/doc/ophelp.xsd
c532ac
@@ -49,6 +49,7 @@
c532ac
 
c532ac
   <xs:element name="unit_mask">
c532ac
     <xs:complexType>
c532ac
+      <xs:attribute name="name" type="xs:string" use="optional"/>
c532ac
       <xs:attribute name="mask" type="xs:nonNegativeInteger" use="required"/>
c532ac
       <xs:attribute name="desc" type="xs:string" use="required"/>
c532ac
     </xs:complexType>
c532ac
diff --git a/libop/op_xml_events.c b/libop/op_xml_events.c
c532ac
index 3b1af21..de107c2 100644
c532ac
--- a/libop/op_xml_events.c
c532ac
+++ b/libop/op_xml_events.c
c532ac
@@ -95,6 +95,10 @@ void xml_help_for_event(struct op_event const * event)
c532ac
 		close_xml_element(NONE, 1, buffer, MAX_BUFFER);
c532ac
 		for (i = 0; i < event->unit->num; i++) {
c532ac
 			open_xml_element(HELP_UNIT_MASK, 1, buffer, MAX_BUFFER);
c532ac
+			if (event->unit->um[i].name)
c532ac
+				init_xml_str_attr(HELP_UNIT_MASK_NAME,
c532ac
+					  event->unit->um[i].name,
c532ac
+					  buffer, MAX_BUFFER);
c532ac
 			init_xml_int_attr(HELP_UNIT_MASK_VALUE,
c532ac
 					  event->unit->um[i].value,
c532ac
 					  buffer, MAX_BUFFER);
c532ac
diff --git a/libop/op_xml_out.c b/libop/op_xml_out.c
c532ac
index 0b3deea..ac3c97b 100644
c532ac
--- a/libop/op_xml_out.c
c532ac
+++ b/libop/op_xml_out.c
c532ac
@@ -84,7 +84,8 @@ char const * xml_tag_map[] = {
c532ac
 	"unit_mask",
c532ac
 		"mask",
c532ac
 		"desc",
c532ac
-		"extra"
c532ac
+		"extra",
c532ac
+		"name"
c532ac
 };
c532ac
 
c532ac
 #define MAX_BUF_LEN 2048
c532ac
diff --git a/libop/op_xml_out.h b/libop/op_xml_out.h
c532ac
index 544bd51..6d5a468 100644
c532ac
--- a/libop/op_xml_out.h
c532ac
+++ b/libop/op_xml_out.h
c532ac
@@ -59,6 +59,7 @@ typedef enum {
c532ac
 	HELP_UNIT_MASK_VALUE,
c532ac
 	HELP_UNIT_MASK_DESC,
c532ac
 	HELP_UNIT_EXTRA_VALUE,
c532ac
+	HELP_UNIT_MASK_NAME,
c532ac
 	} tag_t;
c532ac
 
c532ac
 char const * xml_tag_name(tag_t tag);
c532ac
commit fd05dade355b482ee9286b7bf90b4b150f49f81c
c532ac
Author: Maynard Johnson <maynardj@us.ibm.com>
c532ac
Date:   Mon Feb 3 08:47:30 2014 -0600
c532ac
c532ac
    Remove 'extra' attribute from ophelp XML output; bump schema version
c532ac
    
c532ac
    As discussed on the oprofile mailing list on Sep 24, 2013, there is
c532ac
    no value add in keeping the 'extra' attribute in ophelp's XML output.
c532ac
    The previous commit added the 'name' field to the XML output, and
c532ac
    that is actual valuable information that consumers of the XML output
c532ac
    should use when coding event specifications to pass to operf or
c532ac
    ocount.
c532ac
    
c532ac
    This patch removes the 'extra' attribute and also bumps the schema
c532ac
    version (both in the ophelp.xsd and the XML instance documents).
c532ac
    The schema bump is needed mostly due to removing the 'extra' attribute;
c532ac
    but another reason for it is to draw attention to the new 'name'
c532ac
    attribute, which consumers really must use (when present) in order
c532ac
    to be sure they can properly specify the unitmask that the user
c532ac
    requests.
c532ac
    
c532ac
    Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
c532ac
c532ac
diff --git a/doc/ophelp.xsd b/doc/ophelp.xsd
c532ac
index c07bdb4..1270121 100644
c532ac
--- a/doc/ophelp.xsd
c532ac
+++ b/doc/ophelp.xsd
c532ac
@@ -11,7 +11,7 @@
c532ac
       <xs:attribute name="schemaversion" use="required">
c532ac
         <xs:simpleType>
c532ac
           <xs:restriction base = "xs:string">
c532ac
-            <xs:pattern value = "1\.[0-9]+"/>
c532ac
+            <xs:pattern value = "2\.[0-9]+"/>
c532ac
           </xs:restriction>
c532ac
         </xs:simpleType>       </xs:attribute>
c532ac
     </xs:complexType>
c532ac
diff --git a/libop/op_xml_events.c b/libop/op_xml_events.c
c532ac
index de107c2..c301732 100644
c532ac
--- a/libop/op_xml_events.c
c532ac
+++ b/libop/op_xml_events.c
c532ac
@@ -21,7 +21,7 @@ static char buffer[MAX_BUFFER];
c532ac
 
c532ac
 void open_xml_events(char const * title, char const * doc, op_cpu the_cpu_type)
c532ac
 {
c532ac
-	char const * schema_version = "1.1";
c532ac
+	char const * schema_version = "2.0";
c532ac
 
c532ac
 	buffer[0] = '\0';
c532ac
 	cpu_type = the_cpu_type;
c532ac
@@ -105,10 +105,6 @@ void xml_help_for_event(struct op_event const * event)
c532ac
 			init_xml_str_attr(HELP_UNIT_MASK_DESC,
c532ac
 					  event->unit->um[i].desc,
c532ac
 					  buffer, MAX_BUFFER);
c532ac
-			if (event->unit->um[i].extra)
c532ac
-				init_xml_int_attr(HELP_UNIT_EXTRA_VALUE,
c532ac
-					          event->unit->um[i].extra,
c532ac
-					          buffer, MAX_BUFFER);
c532ac
 			close_xml_element(NONE, 0, buffer, MAX_BUFFER);
c532ac
 		}
c532ac
 		close_xml_element(HELP_UNIT_MASKS, 0, buffer, MAX_BUFFER);
c532ac
diff --git a/libop/op_xml_out.c b/libop/op_xml_out.c
c532ac
index ac3c97b..63ee41c 100644
c532ac
--- a/libop/op_xml_out.c
c532ac
+++ b/libop/op_xml_out.c
c532ac
@@ -84,7 +84,6 @@ char const * xml_tag_map[] = {
c532ac
 	"unit_mask",
c532ac
 		"mask",
c532ac
 		"desc",
c532ac
-		"extra",
c532ac
 		"name"
c532ac
 };
c532ac
 
c532ac
diff --git a/libop/op_xml_out.h b/libop/op_xml_out.h
c532ac
index 6d5a468..a829f66 100644
c532ac
--- a/libop/op_xml_out.h
c532ac
+++ b/libop/op_xml_out.h
c532ac
@@ -58,7 +58,6 @@ typedef enum {
c532ac
 	HELP_UNIT_MASK,
c532ac
 	HELP_UNIT_MASK_VALUE,
c532ac
 	HELP_UNIT_MASK_DESC,
c532ac
-	HELP_UNIT_EXTRA_VALUE,
c532ac
 	HELP_UNIT_MASK_NAME,
c532ac
 	} tag_t;
c532ac