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 "runtime/java.hpp"
30 #include "runtime/os.hpp"
31 #include "runtime/stubCodeGenerator.hpp"
32 #include "vm_version_sparc.hpp"
33
34 unsigned int VM_Version::_L2_data_cache_line_size = 0;
35
36 void VM_Version::initialize() {
37 assert(_features != 0, "System pre-initialization is not complete.");
38 guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");
39
40 if (FLAG_IS_DEFAULT(PrefetchCopyIntervalInBytes)) {
41 FLAG_SET_DEFAULT(PrefetchCopyIntervalInBytes, prefetch_copy_interval_in_bytes());
42 }
43 if (FLAG_IS_DEFAULT(PrefetchScanIntervalInBytes)) {
44 FLAG_SET_DEFAULT(PrefetchScanIntervalInBytes, prefetch_scan_interval_in_bytes());
45 }
46 if (FLAG_IS_DEFAULT(PrefetchFieldsAhead)) {
47 FLAG_SET_DEFAULT(PrefetchFieldsAhead, prefetch_fields_ahead());
382 }
383
384 if (UseVectorizedMismatchIntrinsic) {
385 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
386 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
387 }
388
389 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
390 (cache_line_size > ContendedPaddingWidth))
391 ContendedPaddingWidth = cache_line_size;
392
393 // This machine does not allow unaligned memory accesses
394 if (UseUnalignedAccesses) {
395 if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
396 warning("Unaligned memory access is not available on this CPU");
397 FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
398 }
399
400 if (log_is_enabled(Info, os, cpu)) {
401 ResourceMark rm;
402 outputStream* log = Log(os, cpu)::info_stream();
403 log->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
404 log->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
405 log->print("Allocation");
406 if (AllocatePrefetchStyle <= 0) {
407 log->print(": no prefetching");
408 } else {
409 log->print(" prefetching: ");
410 if (AllocatePrefetchInstr == 0) {
411 log->print("PREFETCH");
412 } else if (AllocatePrefetchInstr == 1) {
413 log->print("BIS");
414 }
415 if (AllocatePrefetchLines > 1) {
416 log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
417 } else {
418 log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
419 }
420 }
421 if (PrefetchCopyIntervalInBytes > 0) {
422 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 "runtime/java.hpp"
31 #include "runtime/os.hpp"
32 #include "runtime/stubCodeGenerator.hpp"
33 #include "vm_version_sparc.hpp"
34
35 unsigned int VM_Version::_L2_data_cache_line_size = 0;
36
37 void VM_Version::initialize() {
38 assert(_features != 0, "System pre-initialization is not complete.");
39 guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");
40
41 if (FLAG_IS_DEFAULT(PrefetchCopyIntervalInBytes)) {
42 FLAG_SET_DEFAULT(PrefetchCopyIntervalInBytes, prefetch_copy_interval_in_bytes());
43 }
44 if (FLAG_IS_DEFAULT(PrefetchScanIntervalInBytes)) {
45 FLAG_SET_DEFAULT(PrefetchScanIntervalInBytes, prefetch_scan_interval_in_bytes());
46 }
47 if (FLAG_IS_DEFAULT(PrefetchFieldsAhead)) {
48 FLAG_SET_DEFAULT(PrefetchFieldsAhead, prefetch_fields_ahead());
383 }
384
385 if (UseVectorizedMismatchIntrinsic) {
386 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
387 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
388 }
389
390 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
391 (cache_line_size > ContendedPaddingWidth))
392 ContendedPaddingWidth = cache_line_size;
393
394 // This machine does not allow unaligned memory accesses
395 if (UseUnalignedAccesses) {
396 if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
397 warning("Unaligned memory access is not available on this CPU");
398 FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
399 }
400
401 if (log_is_enabled(Info, os, cpu)) {
402 ResourceMark rm;
403 LogStream ls(Log(os, cpu)::info());
404 outputStream* log = &ls;
405 log->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
406 log->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
407 log->print("Allocation");
408 if (AllocatePrefetchStyle <= 0) {
409 log->print(": no prefetching");
410 } else {
411 log->print(" prefetching: ");
412 if (AllocatePrefetchInstr == 0) {
413 log->print("PREFETCH");
414 } else if (AllocatePrefetchInstr == 1) {
415 log->print("BIS");
416 }
417 if (AllocatePrefetchLines > 1) {
418 log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
419 } else {
420 log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
421 }
422 }
423 if (PrefetchCopyIntervalInBytes > 0) {
424 log->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
|