< prev index next >

src/hotspot/share/runtime/abstract_vm_version.hpp

Print this page

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

163   }
164 
165   // returns true if and only if cache line writeback is supported
166   static bool supports_data_cache_line_flush() {
167     return _data_cache_line_flush_size != 0;
168   }
169 
170   // Denominator for computing default ParallelGCThreads for machines with
171   // a large number of cores.
172   static uint parallel_worker_threads_denominator() { return 8; }
173 
174   // Does this CPU support spin wait instruction?
175   static bool supports_on_spin_wait() { return false; }
176 
177   // Does platform support fast class initialization checks for static methods?
178   static bool supports_fast_class_init_checks() { return false; }
179 
180   // Does platform support stack watermark barriers for concurrent stack processing?
181   constexpr static bool supports_stack_watermark_barrier() { return false; }
182 



183   // Does platform support float16 instructions?
184   static bool supports_float16() { return false; }
185 
186   // Does this CPU support this intrinsic?
187   static bool is_intrinsic_supported(vmIntrinsicID id) { return true; }
188 
189   static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]);
190 
191  protected:
192   // VM_Version statics
193   static const size_t      CPU_TYPE_DESC_BUF_SIZE = 256;
194   static const size_t      CPU_DETAILED_DESC_BUF_SIZE = 4096;
195 
196   static int   _no_of_threads;
197   static int   _no_of_cores;
198   static int   _no_of_sockets;
199   static bool  _initialized;
200   static char  _cpu_name[CPU_TYPE_DESC_BUF_SIZE];
201   static char  _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE];
202 

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

163   }
164 
165   // returns true if and only if cache line writeback is supported
166   static bool supports_data_cache_line_flush() {
167     return _data_cache_line_flush_size != 0;
168   }
169 
170   // Denominator for computing default ParallelGCThreads for machines with
171   // a large number of cores.
172   static uint parallel_worker_threads_denominator() { return 8; }
173 
174   // Does this CPU support spin wait instruction?
175   static bool supports_on_spin_wait() { return false; }
176 
177   // Does platform support fast class initialization checks for static methods?
178   static bool supports_fast_class_init_checks() { return false; }
179 
180   // Does platform support stack watermark barriers for concurrent stack processing?
181   constexpr static bool supports_stack_watermark_barrier() { return false; }
182 
183   // Is recursive lightweight locking implemented for this platform?
184   constexpr static bool supports_recursive_lightweight_locking() { return false; }
185 
186   // Does platform support float16 instructions?
187   static bool supports_float16() { return false; }
188 
189   // Does this CPU support this intrinsic?
190   static bool is_intrinsic_supported(vmIntrinsicID id) { return true; }
191 
192   static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]);
193 
194  protected:
195   // VM_Version statics
196   static const size_t      CPU_TYPE_DESC_BUF_SIZE = 256;
197   static const size_t      CPU_DETAILED_DESC_BUF_SIZE = 4096;
198 
199   static int   _no_of_threads;
200   static int   _no_of_cores;
201   static int   _no_of_sockets;
202   static bool  _initialized;
203   static char  _cpu_name[CPU_TYPE_DESC_BUF_SIZE];
204   static char  _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE];
205 
< prev index next >