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