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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.inline.hpp"
27 #include "logging/log.hpp"
28 #include "memory/resourceArea.hpp"
29 #include "prims/jvm.h"
30 #include "runtime/java.hpp"
31 #include "runtime/os.hpp"
32 #include "runtime/stubCodeGenerator.hpp"
33 #include "vm_version_sparc.hpp"
34
35 #include <sys/mman.h>
36
37 uint VM_Version::_L2_data_cache_line_size = 0;
38
39 void VM_Version::initialize() {
40 assert(_features != 0, "System pre-initialization is not complete.");
41 guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");
42
43 PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
44 PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
45 PrefetchFieldsAhead = prefetch_fields_ahead();
46
47 // Allocation prefetch settings
409 }
410
411 if (UseVectorizedMismatchIntrinsic) {
412 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
413 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
414 }
415
416 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
417 (cache_line_size > ContendedPaddingWidth))
418 ContendedPaddingWidth = cache_line_size;
419
420 // This machine does not allow unaligned memory accesses
421 if (UseUnalignedAccesses) {
422 if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
423 warning("Unaligned memory access is not available on this CPU");
424 FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
425 }
426
427 if (log_is_enabled(Info, os, cpu)) {
428 ResourceMark rm;
429 outputStream* log = Log(os, cpu)::info_stream();
430 log->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
431 log->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
432 log->print("Allocation");
433 if (AllocatePrefetchStyle <= 0) {
434 log->print(": no prefetching");
435 } else {
436 log->print(" prefetching: ");
437 if (AllocatePrefetchInstr == 0) {
438 log->print("PREFETCH");
439 } else if (AllocatePrefetchInstr == 1) {
440 log->print("BIS");
441 }
442 if (AllocatePrefetchLines > 1) {
443 log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
444 } else {
445 log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
446 }
447 }
448 if (PrefetchCopyIntervalInBytes > 0) {
449 log->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
|
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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.inline.hpp"
27 #include "logging/log.hpp"
28 #include "logging/logStream.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "prims/jvm.h"
31 #include "runtime/java.hpp"
32 #include "runtime/os.hpp"
33 #include "runtime/stubCodeGenerator.hpp"
34 #include "vm_version_sparc.hpp"
35
36 #include <sys/mman.h>
37
38 uint VM_Version::_L2_data_cache_line_size = 0;
39
40 void VM_Version::initialize() {
41 assert(_features != 0, "System pre-initialization is not complete.");
42 guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");
43
44 PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
45 PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
46 PrefetchFieldsAhead = prefetch_fields_ahead();
47
48 // Allocation prefetch settings
410 }
411
412 if (UseVectorizedMismatchIntrinsic) {
413 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
414 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
415 }
416
417 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
418 (cache_line_size > ContendedPaddingWidth))
419 ContendedPaddingWidth = cache_line_size;
420
421 // This machine does not allow unaligned memory accesses
422 if (UseUnalignedAccesses) {
423 if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
424 warning("Unaligned memory access is not available on this CPU");
425 FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
426 }
427
428 if (log_is_enabled(Info, os, cpu)) {
429 ResourceMark rm;
430 LogStream ls(Log(os, cpu)::info());
431 outputStream* log = &ls;
432 log->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
433 log->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
434 log->print("Allocation");
435 if (AllocatePrefetchStyle <= 0) {
436 log->print(": no prefetching");
437 } else {
438 log->print(" prefetching: ");
439 if (AllocatePrefetchInstr == 0) {
440 log->print("PREFETCH");
441 } else if (AllocatePrefetchInstr == 1) {
442 log->print("BIS");
443 }
444 if (AllocatePrefetchLines > 1) {
445 log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
446 } else {
447 log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
448 }
449 }
450 if (PrefetchCopyIntervalInBytes > 0) {
451 log->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
|