1 /*
2 * Copyright (c) 1997, 2015, 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 *
348 // AllocatePrefetchStyle is guaranteed to be in range [0..3] defined by the
349 // configuration.
350 static intx allocate_prefetch_style() {
351 intx distance = allocate_prefetch_distance();
352 // Return 0 (off/none) if AllocatePrefetchDistance was not defined.
353 return distance > 0 ? AllocatePrefetchStyle : 0;
354 }
355
356 public:
357 // Assembler testing
358 static void allow_all();
359 static void revert();
360
361 // Override the Abstract_VM_Version implementation.
362 //
363 // FIXME: Removed broken test on sun4v (always false when invoked prior to the
364 // proper capability setup), thus always returning 2. Still need to fix
365 // this properly in order to enable complete page size support.
366 static uint page_size_count() { return 2; }
367
368 // Calculates the number of parallel threads
369 static unsigned int calc_parallel_worker_threads();
370 };
371
372 #endif // CPU_SPARC_VM_VM_VERSION_SPARC_HPP
|
1 /*
2 * Copyright (c) 1997, 2018, 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 *
348 // AllocatePrefetchStyle is guaranteed to be in range [0..3] defined by the
349 // configuration.
350 static intx allocate_prefetch_style() {
351 intx distance = allocate_prefetch_distance();
352 // Return 0 (off/none) if AllocatePrefetchDistance was not defined.
353 return distance > 0 ? AllocatePrefetchStyle : 0;
354 }
355
356 public:
357 // Assembler testing
358 static void allow_all();
359 static void revert();
360
361 // Override the Abstract_VM_Version implementation.
362 //
363 // FIXME: Removed broken test on sun4v (always false when invoked prior to the
364 // proper capability setup), thus always returning 2. Still need to fix
365 // this properly in order to enable complete page size support.
366 static uint page_size_count() { return 2; }
367
368 // Override default denominator for ParallelGCThreads.
369 //
370 // FIXME: Simply checking the processor family is insufficient.
371 static uint parallel_worker_threads_denominator() {
372 return is_post_niagara() ? 16 : 8;
373 }
374 };
375
376 #endif // CPU_SPARC_VM_VM_VERSION_SPARC_HPP
|