From: Maynard J. <may...@us...> - 2014-01-30 00:11:32
|
Remove 'extra' attribute from ophelp XML output; bump schema version As discussed on the oprofile mailing list on Sep 24, 2013, there is no value add in keeping the 'extra' attribute in ophelp's XML output. The previous commit added the 'name' field to the XML output, and that is actual valuable information that consumers of the XML output should use when coding event specifications to pass to operf or ocount. This patch removes the 'extra' attribute and also bumps the schema version (both in the ophelp.xsd and the XML instance documents). The schema bump is needed mostly due to removing the 'extra' attribute; but another reason for it is to draw attention to the new 'name' attribute, which consumers really must use (when present) in order to be sure they can properly specify the unitmask that the user requests. Signed-off-by: Maynard Johnson <may...@us...> --- doc/ophelp.xsd | 2 +- libop/op_xml_events.c | 6 +----- libop/op_xml_out.c | 1 - libop/op_xml_out.h | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/ophelp.xsd b/doc/ophelp.xsd index c07bdb4..1270121 100644 --- a/doc/ophelp.xsd +++ b/doc/ophelp.xsd @@ -11,7 +11,7 @@ <xs:attribute name="schemaversion" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> - <xs:pattern value = "1\.[0-9]+"/> + <xs:pattern value = "2\.[0-9]+"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> diff --git a/libop/op_xml_events.c b/libop/op_xml_events.c index de107c2..c301732 100644 --- a/libop/op_xml_events.c +++ b/libop/op_xml_events.c @@ -21,7 +21,7 @@ static char buffer[MAX_BUFFER]; void open_xml_events(char const * title, char const * doc, op_cpu the_cpu_type) { - char const * schema_version = "1.1"; + char const * schema_version = "2.0"; buffer[0] = '\0'; cpu_type = the_cpu_type; @@ -105,10 +105,6 @@ void xml_help_for_event(struct op_event const * event) init_xml_str_attr(HELP_UNIT_MASK_DESC, event->unit->um[i].desc, buffer, MAX_BUFFER); - if (event->unit->um[i].extra) - init_xml_int_attr(HELP_UNIT_EXTRA_VALUE, - event->unit->um[i].extra, - buffer, MAX_BUFFER); close_xml_element(NONE, 0, buffer, MAX_BUFFER); } close_xml_element(HELP_UNIT_MASKS, 0, buffer, MAX_BUFFER); diff --git a/libop/op_xml_out.c b/libop/op_xml_out.c index ac3c97b..63ee41c 100644 --- a/libop/op_xml_out.c +++ b/libop/op_xml_out.c @@ -84,7 +84,6 @@ char const * xml_tag_map[] = { "unit_mask", "mask", "desc", - "extra", "name" }; diff --git a/libop/op_xml_out.h b/libop/op_xml_out.h index 6d5a468..a829f66 100644 --- a/libop/op_xml_out.h +++ b/libop/op_xml_out.h @@ -58,7 +58,6 @@ typedef enum { HELP_UNIT_MASK, HELP_UNIT_MASK_VALUE, HELP_UNIT_MASK_DESC, - HELP_UNIT_EXTRA_VALUE, HELP_UNIT_MASK_NAME, } tag_t; -- 1.7.1 |
From: Maynard J. <may...@us...> - 2014-02-03 15:06:47
|
On 01/29/2014 06:11 PM, Maynard Johnson wrote: > Remove 'extra' attribute from ophelp XML output; bump schema version Patch applied. -Maynard > > As discussed on the oprofile mailing list on Sep 24, 2013, there is > no value add in keeping the 'extra' attribute in ophelp's XML output. > The previous commit added the 'name' field to the XML output, and > that is actual valuable information that consumers of the XML output > should use when coding event specifications to pass to operf or > ocount. > > This patch removes the 'extra' attribute and also bumps the schema > version (both in the ophelp.xsd and the XML instance documents). > The schema bump is needed mostly due to removing the 'extra' attribute; > but another reason for it is to draw attention to the new 'name' > attribute, which consumers really must use (when present) in order > to be sure they can properly specify the unitmask that the user > requests. > > Signed-off-by: Maynard Johnson <may...@us...> > --- > doc/ophelp.xsd | 2 +- > libop/op_xml_events.c | 6 +----- > libop/op_xml_out.c | 1 - > libop/op_xml_out.h | 1 - > 4 files changed, 2 insertions(+), 8 deletions(-) > > diff --git a/doc/ophelp.xsd b/doc/ophelp.xsd > index c07bdb4..1270121 100644 > --- a/doc/ophelp.xsd > +++ b/doc/ophelp.xsd > @@ -11,7 +11,7 @@ > <xs:attribute name="schemaversion" use="required"> > <xs:simpleType> > <xs:restriction base = "xs:string"> > - <xs:pattern value = "1\.[0-9]+"/> > + <xs:pattern value = "2\.[0-9]+"/> > </xs:restriction> > </xs:simpleType> </xs:attribute> > </xs:complexType> > diff --git a/libop/op_xml_events.c b/libop/op_xml_events.c > index de107c2..c301732 100644 > --- a/libop/op_xml_events.c > +++ b/libop/op_xml_events.c > @@ -21,7 +21,7 @@ static char buffer[MAX_BUFFER]; > > void open_xml_events(char const * title, char const * doc, op_cpu the_cpu_type) > { > - char const * schema_version = "1.1"; > + char const * schema_version = "2.0"; > > buffer[0] = '\0'; > cpu_type = the_cpu_type; > @@ -105,10 +105,6 @@ void xml_help_for_event(struct op_event const * event) > init_xml_str_attr(HELP_UNIT_MASK_DESC, > event->unit->um[i].desc, > buffer, MAX_BUFFER); > - if (event->unit->um[i].extra) > - init_xml_int_attr(HELP_UNIT_EXTRA_VALUE, > - event->unit->um[i].extra, > - buffer, MAX_BUFFER); > close_xml_element(NONE, 0, buffer, MAX_BUFFER); > } > close_xml_element(HELP_UNIT_MASKS, 0, buffer, MAX_BUFFER); > diff --git a/libop/op_xml_out.c b/libop/op_xml_out.c > index ac3c97b..63ee41c 100644 > --- a/libop/op_xml_out.c > +++ b/libop/op_xml_out.c > @@ -84,7 +84,6 @@ char const * xml_tag_map[] = { > "unit_mask", > "mask", > "desc", > - "extra", > "name" > }; > > diff --git a/libop/op_xml_out.h b/libop/op_xml_out.h > index 6d5a468..a829f66 100644 > --- a/libop/op_xml_out.h > +++ b/libop/op_xml_out.h > @@ -58,7 +58,6 @@ typedef enum { > HELP_UNIT_MASK, > HELP_UNIT_MASK_VALUE, > HELP_UNIT_MASK_DESC, > - HELP_UNIT_EXTRA_VALUE, > HELP_UNIT_MASK_NAME, > } tag_t; > |