08a4e6
commit b78d7665bc02a0ce17adc6c09ab052064a940937
08a4e6
Author: Masahiko, Yamada <yamada.masahiko@fujitsu.com>
08a4e6
Date:   Wed Dec 8 19:39:44 2021 +0900
08a4e6
08a4e6
    Improve the papi_xml_event_info command.
08a4e6
    
08a4e6
    Modify the papi_xml_event_info command as follows:.
08a4e6
    - Test only the event name even if the event has a unit mask.
08a4e6
    - Test other unit masks in the event even if
08a4e6
      there is an error in one unit mask in the event.
08a4e6
    
08a4e6
    Signed-off-by: Masahiko, Yamada <yamada.masahiko@fujitsu.com>
08a4e6
08a4e6
diff --git a/src/utils/papi_xml_event_info.c b/src/utils/papi_xml_event_info.c
08a4e6
index 2a777a9fe..c024cc036 100644
08a4e6
--- a/src/utils/papi_xml_event_info.c
08a4e6
+++ b/src/utils/papi_xml_event_info.c
08a4e6
@@ -226,9 +226,6 @@ enum_native_events( FILE * f, int cidx)
08a4e6
 	   k = i;
08a4e6
 	   if ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_UMASKS, cidx ) == PAPI_OK ) {
08a4e6
 
08a4e6
-	      /* Test if event can be added */
08a4e6
-	      if ( test_event( k ) == PAPI_OK ) {
08a4e6
-
08a4e6
 		 /* add the event */
08a4e6
 		 xmlize_event( f, &info, num );
08a4e6
 
08a4e6
@@ -237,13 +234,12 @@ enum_native_events( FILE * f, int cidx)
08a4e6
 		    retval = PAPI_get_event_info( k, &info );
08a4e6
 		    if ( retval == PAPI_OK ) {
08a4e6
 		       if ( test_event( k )!=PAPI_OK ) {
08a4e6
-			   break;
08a4e6
+			   continue;
08a4e6
 		       }
08a4e6
 		       xmlize_event( f, &info, -1 );
08a4e6
 		    }
08a4e6
 		 } while ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_UMASKS, cidx ) == PAPI_OK);
08a4e6
 		 fprintf( f, "    </event>\n" );
08a4e6
-	      }
08a4e6
 	   } else {
08a4e6
               /* this event has no unit masks; test & write the event */
08a4e6
 	      if ( test_event( i ) == PAPI_OK ) {