Print this page
10146 core_pcbe_event_coverage() is missing an else
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

@@ -18,11 +18,11 @@
  *
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 /*
  * This file contains preset event names from the Performance Application
  * Programming Interface v3.5 which included the following notice:

@@ -991,11 +991,12 @@
                             BITMASK_XBITS(num_gpc));
                 }
         } else {
                 if (find_generic_events(event, cmn_generic_events) != NULL) {
                         bitmap |= BITMASK_XBITS(num_gpc);
-                } if (find_generic_events(event, generic_events_pic0) != NULL) {
+                } else if (find_generic_events(event,
+                    generic_events_pic0) != NULL) {
                         bitmap |= 1ULL;
                 } else if (find_gpcevent_core_uarch(event,
                     cmn_gpc_events_core_uarch) != NULL) {
                         bitmap |= BITMASK_XBITS(num_gpc);
                 } else if (find_gpcevent_core_uarch(event, pic0_events) !=