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 "memory/resourceArea.hpp"
28 #include "runtime/java.hpp"
29 #include "runtime/os.hpp"
30 #include "runtime/stubCodeGenerator.hpp"
31 #include "vm_version_sparc.hpp"
32
33 int VM_Version::_features = VM_Version::unknown_m;
34 const char* VM_Version::_features_str = "";
35 unsigned int VM_Version::_L2_data_cache_line_size = 0;
36
37 void VM_Version::initialize() {
38 _features = determine_features();
39 PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
40 PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
41 PrefetchFieldsAhead = prefetch_fields_ahead();
42
43 // Allocation prefetch settings
44 intx cache_line_size = prefetch_data_size();
45 if( cache_line_size > AllocatePrefetchStepSize )
46 AllocatePrefetchStepSize = cache_line_size;
47
48 assert(AllocatePrefetchLines > 0, "invalid value");
49 if( AllocatePrefetchLines < 1 ) // set valid value in product VM
50 AllocatePrefetchLines = 3;
51 assert(AllocateInstancePrefetchLines > 0, "invalid value");
52 if( AllocateInstancePrefetchLines < 1 ) // set valid value in product VM
53 AllocateInstancePrefetchLines = 1;
54
55 AllocatePrefetchDistance = allocate_prefetch_distance();
56 AllocatePrefetchStyle = allocate_prefetch_style();
57
58 if (AllocatePrefetchStyle == 3 && !has_blk_init()) {
437 saved_features = _features;
438 _features = all_features_m;
439 }
440
441 void VM_Version::revert() {
442 _features = saved_features;
443 }
444
445 unsigned int VM_Version::calc_parallel_worker_threads() {
446 unsigned int result;
447 if (is_M_series()) {
448 // for now, use same gc thread calculation for M-series as for niagara-plus
449 // in future, we may want to tweak parameters for nof_parallel_worker_thread
450 result = nof_parallel_worker_threads(5, 16, 8);
451 } else if (is_niagara_plus()) {
452 result = nof_parallel_worker_threads(5, 16, 8);
453 } else {
454 result = nof_parallel_worker_threads(5, 8, 8);
455 }
456 return result;
457 }
|
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 "memory/resourceArea.hpp"
28 #include "runtime/java.hpp"
29 #include "runtime/os.hpp"
30 #include "runtime/stubCodeGenerator.hpp"
31 #include "vm_version_sparc.hpp"
32
33 int VM_Version::_features = VM_Version::unknown_m;
34 const char* VM_Version::_features_str = "";
35 unsigned int VM_Version::_L2_data_cache_line_size = 0;
36
37 void VM_Version::initialize() {
38 PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
39 PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
40 PrefetchFieldsAhead = prefetch_fields_ahead();
41
42 // Allocation prefetch settings
43 intx cache_line_size = prefetch_data_size();
44 if( cache_line_size > AllocatePrefetchStepSize )
45 AllocatePrefetchStepSize = cache_line_size;
46
47 assert(AllocatePrefetchLines > 0, "invalid value");
48 if( AllocatePrefetchLines < 1 ) // set valid value in product VM
49 AllocatePrefetchLines = 3;
50 assert(AllocateInstancePrefetchLines > 0, "invalid value");
51 if( AllocateInstancePrefetchLines < 1 ) // set valid value in product VM
52 AllocateInstancePrefetchLines = 1;
53
54 AllocatePrefetchDistance = allocate_prefetch_distance();
55 AllocatePrefetchStyle = allocate_prefetch_style();
56
57 if (AllocatePrefetchStyle == 3 && !has_blk_init()) {
436 saved_features = _features;
437 _features = all_features_m;
438 }
439
440 void VM_Version::revert() {
441 _features = saved_features;
442 }
443
444 unsigned int VM_Version::calc_parallel_worker_threads() {
445 unsigned int result;
446 if (is_M_series()) {
447 // for now, use same gc thread calculation for M-series as for niagara-plus
448 // in future, we may want to tweak parameters for nof_parallel_worker_thread
449 result = nof_parallel_worker_threads(5, 16, 8);
450 } else if (is_niagara_plus()) {
451 result = nof_parallel_worker_threads(5, 16, 8);
452 } else {
453 result = nof_parallel_worker_threads(5, 8, 8);
454 }
455 return result;
456 }
457
458 void VM_Version::early_initialize() {
459
460 os::Solaris::initialize_features_info();
461
462 _features = determine_features();
463 }
|