< prev index next >

src/cpu/ppc/vm/vm_version_ppc.hpp

Print this page
rev 9054 : 8219241: Provide basic virtualization related info in the hs_error file on linux/windows x86_64
Reviewed-by: dholmes, mdoerr
rev 9055 : 8223438: add VirtualizationInformation JFR event
Reviewed-by: clanger, egahlin
   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2012, 2018 SAP AG. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


  66     vcipher_m             = (1 << vcipher),
  67     vshasig_m             = (1 << vshasig),
  68     vpmsumb_m             = (1 << vpmsumb),
  69     mfdscr_m              = (1 << mfdscr ),
  70     vsx_m                 = (1 << vsx    ),
  71     all_features_m        = -1
  72   };
  73   static int  _features;
  74   static int  _measured_cache_line_size;
  75   static const char* _features_str;
  76   static bool _is_determine_features_test_running;
  77 
  78   static void print_features();
  79   static void determine_features(); // also measures cache line size
  80   static void config_dscr(); // Power 8: Configure Data Stream Control Register.
  81   static void determine_section_size();
  82   static void power6_micro_bench();
  83 public:
  84   // Initialization
  85   static void initialize();




  86 
  87   static bool is_determine_features_test_running() { return _is_determine_features_test_running; }
  88   // CPU instruction support
  89   static bool has_fsqrt()   { return (_features & fsqrt_m) != 0; }
  90   static bool has_fsqrts()  { return (_features & fsqrts_m) != 0; }
  91   static bool has_isel()    { return (_features & isel_m) != 0; }
  92   static bool has_lxarxeh() { return (_features & lxarxeh_m) !=0; }
  93   static bool has_cmpb()    { return (_features & cmpb_m) != 0; }
  94   static bool has_popcntb() { return (_features & popcntb_m) != 0; }
  95   static bool has_popcntw() { return (_features & popcntw_m) != 0; }
  96   static bool has_fcfids()  { return (_features & fcfids_m) != 0; }
  97   static bool has_vand()    { return (_features & vand_m) != 0; }
  98   static bool has_dcba()    { return (_features & dcba_m) != 0; }
  99   static bool has_lqarx()   { return (_features & lqarx_m) != 0; }
 100   static bool has_vcipher() { return (_features & vcipher_m) != 0; }
 101   static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; }
 102   static bool has_mfdscr()  { return (_features & mfdscr_m) != 0; }
 103   static bool has_vsx()     { return (_features & vsx_m) != 0; }
 104   static bool has_vshasig() { return (_features & vshasig_m) != 0; }
 105 
   1 /*
   2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


  66     vcipher_m             = (1 << vcipher),
  67     vshasig_m             = (1 << vshasig),
  68     vpmsumb_m             = (1 << vpmsumb),
  69     mfdscr_m              = (1 << mfdscr ),
  70     vsx_m                 = (1 << vsx    ),
  71     all_features_m        = -1
  72   };
  73   static int  _features;
  74   static int  _measured_cache_line_size;
  75   static const char* _features_str;
  76   static bool _is_determine_features_test_running;
  77 
  78   static void print_features();
  79   static void determine_features(); // also measures cache line size
  80   static void config_dscr(); // Power 8: Configure Data Stream Control Register.
  81   static void determine_section_size();
  82   static void power6_micro_bench();
  83 public:
  84   // Initialization
  85   static void initialize();
  86   static void check_virtualizations();
  87 
  88   // Override Abstract_VM_Version implementation
  89   static void print_platform_virtualization_info(outputStream*);
  90 
  91   static bool is_determine_features_test_running() { return _is_determine_features_test_running; }
  92   // CPU instruction support
  93   static bool has_fsqrt()   { return (_features & fsqrt_m) != 0; }
  94   static bool has_fsqrts()  { return (_features & fsqrts_m) != 0; }
  95   static bool has_isel()    { return (_features & isel_m) != 0; }
  96   static bool has_lxarxeh() { return (_features & lxarxeh_m) !=0; }
  97   static bool has_cmpb()    { return (_features & cmpb_m) != 0; }
  98   static bool has_popcntb() { return (_features & popcntb_m) != 0; }
  99   static bool has_popcntw() { return (_features & popcntw_m) != 0; }
 100   static bool has_fcfids()  { return (_features & fcfids_m) != 0; }
 101   static bool has_vand()    { return (_features & vand_m) != 0; }
 102   static bool has_dcba()    { return (_features & dcba_m) != 0; }
 103   static bool has_lqarx()   { return (_features & lqarx_m) != 0; }
 104   static bool has_vcipher() { return (_features & vcipher_m) != 0; }
 105   static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; }
 106   static bool has_mfdscr()  { return (_features & mfdscr_m) != 0; }
 107   static bool has_vsx()     { return (_features & vsx_m) != 0; }
 108   static bool has_vshasig() { return (_features & vshasig_m) != 0; }
 109 
< prev index next >