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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/pcbe/core_pcbe.c
          +++ new/usr/src/uts/intel/pcbe/core_pcbe.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright 2018 Joyent, Inc.
       23 + * Copyright 2019 Joyent, Inc.
  24   24   */
  25   25  
  26   26  /*
  27   27   * This file contains preset event names from the Performance Application
  28   28   * Programming Interface v3.5 which included the following notice:
  29   29   *
  30   30   *                             Copyright (c) 2005,6
  31   31   *                           Innovative Computing Labs
  32   32   *                         Computer Science Department,
  33   33   *                            University of Tennessee,
↓ open down ↓ 952 lines elided ↑ open up ↑
 986  986          /* Is it an event that a GPC can track? */
 987  987          if (versionid >= 3) {
 988  988                  n = find_gpcevent(event);
 989  989                  if (n != NULL) {
 990  990                          bitmap |= (n->supported_counters &
 991  991                              BITMASK_XBITS(num_gpc));
 992  992                  }
 993  993          } else {
 994  994                  if (find_generic_events(event, cmn_generic_events) != NULL) {
 995  995                          bitmap |= BITMASK_XBITS(num_gpc);
 996      -                } if (find_generic_events(event, generic_events_pic0) != NULL) {
      996 +                } else if (find_generic_events(event,
      997 +                    generic_events_pic0) != NULL) {
 997  998                          bitmap |= 1ULL;
 998  999                  } else if (find_gpcevent_core_uarch(event,
 999 1000                      cmn_gpc_events_core_uarch) != NULL) {
1000 1001                          bitmap |= BITMASK_XBITS(num_gpc);
1001 1002                  } else if (find_gpcevent_core_uarch(event, pic0_events) !=
1002 1003                      NULL) {
1003 1004                          bitmap |= 1ULL;
1004 1005                  } else if (find_gpcevent_core_uarch(event, pic1_events) !=
1005 1006                      NULL) {
1006 1007                          bitmap |= 1ULL << 1;
↓ open down ↓ 517 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX