Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sysinfo functions from OMR; remove duplicate code in OpenJ9 #20937

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 0 additions & 223 deletions debugtools/DDR_VM/data/superset-constants.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2736,34 +2736,6 @@ C|J9PORT_INFO_SHSEM_STAT_PASSED
C|J9PORT_INVALID_FD
C|J9PORT_MAJOR_VERSION_NUMBER
C|J9PORT_MINOR_VERSION_NUMBER
C|J9PORT_PPC_FEATURE_32
C|J9PORT_PPC_FEATURE_601_INSTR
C|J9PORT_PPC_FEATURE_64
C|J9PORT_PPC_FEATURE_ARCH_2_05
C|J9PORT_PPC_FEATURE_ARCH_2_06
C|J9PORT_PPC_FEATURE_BOOKE
C|J9PORT_PPC_FEATURE_CELL_BE
C|J9PORT_PPC_FEATURE_HAS_4xxMAC
C|J9PORT_PPC_FEATURE_HAS_ALTIVEC
C|J9PORT_PPC_FEATURE_HAS_DFP
C|J9PORT_PPC_FEATURE_HAS_EFP_DOUBLE
C|J9PORT_PPC_FEATURE_HAS_EFP_SINGLE
C|J9PORT_PPC_FEATURE_HAS_FPU
C|J9PORT_PPC_FEATURE_HAS_MMU
C|J9PORT_PPC_FEATURE_HAS_SPE
C|J9PORT_PPC_FEATURE_HAS_VSX
C|J9PORT_PPC_FEATURE_ICACHE_SNOOP
C|J9PORT_PPC_FEATURE_NO_TB
C|J9PORT_PPC_FEATURE_PA6T
C|J9PORT_PPC_FEATURE_POWER4
C|J9PORT_PPC_FEATURE_POWER5
C|J9PORT_PPC_FEATURE_POWER5_PLUS
C|J9PORT_PPC_FEATURE_POWER6_EXT
C|J9PORT_PPC_FEATURE_PPC_LE
C|J9PORT_PPC_FEATURE_PSERIES_PERFMON_COMPAT
C|J9PORT_PPC_FEATURE_SMT
C|J9PORT_PPC_FEATURE_TRUE_LE
C|J9PORT_PPC_FEATURE_UNIFIED_CACHE
C|J9PORT_PROCESS_CREATE_NEW_PROCESS_GROUP
C|J9PORT_PROCESS_DO_NOT_CLOSE_STREAMS
C|J9PORT_PROCESS_IGNORE_OUTPUT
Expand All @@ -2776,34 +2748,6 @@ C|J9PORT_PROCESS_REDIRECT_STDERR_TO_STDOUT
C|J9PORT_PROCESS_STDERR
C|J9PORT_PROCESS_STDIN
C|J9PORT_PROCESS_STDOUT
C|J9PORT_S390_FEATURE_DFP
C|J9PORT_S390_FEATURE_ESAN3
C|J9PORT_S390_FEATURE_ETF3_ENHANCEMENT
C|J9PORT_S390_FEATURE_EXTENDED_IMMEDIATE
C|J9PORT_S390_FEATURE_EXTENDED_TRANSLATION_3
C|J9PORT_S390_FEATURE_GENERAL_INSTRUCTIONS_EXTENSIONS
C|J9PORT_S390_FEATURE_GUARDED_STORAGE
C|J9PORT_S390_FEATURE_HIGH_GPRS
C|J9PORT_S390_FEATURE_HPAGE
C|J9PORT_S390_FEATURE_LOAD_AND_ZERO_RIGHTMOST_BYTE
C|J9PORT_S390_FEATURE_LOAD_STORE_ON_CONDITION_1
C|J9PORT_S390_FEATURE_LOAD_STORE_ON_CONDITION_2
C|J9PORT_S390_FEATURE_LONG_DISPLACEMENT
C|J9PORT_S390_FEATURE_MISCELLANEOUS_INSTRUCTION_EXTENSION
C|J9PORT_S390_FEATURE_MISCELLANEOUS_INSTRUCTION_EXTENSION_2
C|J9PORT_S390_FEATURE_MSA
C|J9PORT_S390_FEATURE_MSA_EXTENSION3
C|J9PORT_S390_FEATURE_MSA_EXTENSION4
C|J9PORT_S390_FEATURE_MSA_EXTENSION_5
C|J9PORT_S390_FEATURE_MSA_EXTENSION_8
C|J9PORT_S390_FEATURE_SEMAPHORE_ASSIST
C|J9PORT_S390_FEATURE_SIDE_EFFECT_ACCESS
C|J9PORT_S390_FEATURE_STFLE
C|J9PORT_S390_FEATURE_TE
C|J9PORT_S390_FEATURE_VECTOR_FACILITY
C|J9PORT_S390_FEATURE_VECTOR_FACILITY_ENHANCEMENT_1
C|J9PORT_S390_FEATURE_VECTOR_PACKED_DECIMAL
C|J9PORT_S390_FEATURE_ZARCH
C|J9PORT_SHMEM_EYECATCHER_LENGTH
C|J9PORT_SHSEM_MODE_DEFAULT
C|J9PORT_SHSEM_MODE_NOWAIT
Expand All @@ -2814,38 +2758,6 @@ C|J9PORT_SYSINFO_GET_HW_INFO_MODEL
C|J9PORT_SYSINFO_GET_HW_INFO_NOT_AVAILABLE
C|J9PORT_SYSINFO_GET_HW_INFO_SUCCESS
C|J9PORT_SYSINFO_HW_INFO_MODEL_BUF_LENGTH
C|J9PORT_X86_FEATURE_10
C|J9PORT_X86_FEATURE_20
C|J9PORT_X86_FEATURE_30
C|J9PORT_X86_FEATURE_ACPI
C|J9PORT_X86_FEATURE_APIC
C|J9PORT_X86_FEATURE_CLFSH
C|J9PORT_X86_FEATURE_CMOV
C|J9PORT_X86_FEATURE_CX8
C|J9PORT_X86_FEATURE_DE
C|J9PORT_X86_FEATURE_DS
C|J9PORT_X86_FEATURE_FPU
C|J9PORT_X86_FEATURE_FXSR
C|J9PORT_X86_FEATURE_HTT
C|J9PORT_X86_FEATURE_MCA
C|J9PORT_X86_FEATURE_MCE
C|J9PORT_X86_FEATURE_MMX
C|J9PORT_X86_FEATURE_MSR
C|J9PORT_X86_FEATURE_MTRR
C|J9PORT_X86_FEATURE_PAE
C|J9PORT_X86_FEATURE_PAT
C|J9PORT_X86_FEATURE_PBE
C|J9PORT_X86_FEATURE_PGE
C|J9PORT_X86_FEATURE_PSE
C|J9PORT_X86_FEATURE_PSE_36
C|J9PORT_X86_FEATURE_PSN
C|J9PORT_X86_FEATURE_SEP
C|J9PORT_X86_FEATURE_SS
C|J9PORT_X86_FEATURE_SSE
C|J9PORT_X86_FEATURE_SSE2
C|J9PORT_X86_FEATURE_TM
C|J9PORT_X86_FEATURE_TSC
C|J9PORT_X86_FEATURE_VME
C|J9SHMEM_NO_FLAGS
C|J9SHMEM_OPEN_DO_NOT_CREATE
C|J9SHMEM_OPEN_FOR_DESTROY
Expand Down Expand Up @@ -2959,34 +2871,6 @@ C|J9PORT_INFO_SHSEM_STAT_PASSED
C|J9PORT_INVALID_FD
C|J9PORT_MAJOR_VERSION_NUMBER
C|J9PORT_MINOR_VERSION_NUMBER
C|J9PORT_PPC_FEATURE_32
C|J9PORT_PPC_FEATURE_601_INSTR
C|J9PORT_PPC_FEATURE_64
C|J9PORT_PPC_FEATURE_ARCH_2_05
C|J9PORT_PPC_FEATURE_ARCH_2_06
C|J9PORT_PPC_FEATURE_BOOKE
C|J9PORT_PPC_FEATURE_CELL_BE
C|J9PORT_PPC_FEATURE_HAS_4xxMAC
C|J9PORT_PPC_FEATURE_HAS_ALTIVEC
C|J9PORT_PPC_FEATURE_HAS_DFP
C|J9PORT_PPC_FEATURE_HAS_EFP_DOUBLE
C|J9PORT_PPC_FEATURE_HAS_EFP_SINGLE
C|J9PORT_PPC_FEATURE_HAS_FPU
C|J9PORT_PPC_FEATURE_HAS_MMU
C|J9PORT_PPC_FEATURE_HAS_SPE
C|J9PORT_PPC_FEATURE_HAS_VSX
C|J9PORT_PPC_FEATURE_ICACHE_SNOOP
C|J9PORT_PPC_FEATURE_NO_TB
C|J9PORT_PPC_FEATURE_PA6T
C|J9PORT_PPC_FEATURE_POWER4
C|J9PORT_PPC_FEATURE_POWER5
C|J9PORT_PPC_FEATURE_POWER5_PLUS
C|J9PORT_PPC_FEATURE_POWER6_EXT
C|J9PORT_PPC_FEATURE_PPC_LE
C|J9PORT_PPC_FEATURE_PSERIES_PERFMON_COMPAT
C|J9PORT_PPC_FEATURE_SMT
C|J9PORT_PPC_FEATURE_TRUE_LE
C|J9PORT_PPC_FEATURE_UNIFIED_CACHE
C|J9PORT_PROCESS_CREATE_NEW_PROCESS_GROUP
C|J9PORT_PROCESS_DO_NOT_CLOSE_STREAMS
C|J9PORT_PROCESS_IGNORE_OUTPUT
Expand All @@ -2999,34 +2883,6 @@ C|J9PORT_PROCESS_REDIRECT_STDERR_TO_STDOUT
C|J9PORT_PROCESS_STDERR
C|J9PORT_PROCESS_STDIN
C|J9PORT_PROCESS_STDOUT
C|J9PORT_S390_FEATURE_DFP
C|J9PORT_S390_FEATURE_ESAN3
C|J9PORT_S390_FEATURE_ETF3_ENHANCEMENT
C|J9PORT_S390_FEATURE_EXTENDED_IMMEDIATE
C|J9PORT_S390_FEATURE_EXTENDED_TRANSLATION_3
C|J9PORT_S390_FEATURE_GENERAL_INSTRUCTIONS_EXTENSIONS
C|J9PORT_S390_FEATURE_GUARDED_STORAGE
C|J9PORT_S390_FEATURE_HIGH_GPRS
C|J9PORT_S390_FEATURE_HPAGE
C|J9PORT_S390_FEATURE_LOAD_AND_ZERO_RIGHTMOST_BYTE
C|J9PORT_S390_FEATURE_LOAD_STORE_ON_CONDITION_1
C|J9PORT_S390_FEATURE_LOAD_STORE_ON_CONDITION_2
C|J9PORT_S390_FEATURE_LONG_DISPLACEMENT
C|J9PORT_S390_FEATURE_MISCELLANEOUS_INSTRUCTION_EXTENSION
C|J9PORT_S390_FEATURE_MISCELLANEOUS_INSTRUCTION_EXTENSION_2
C|J9PORT_S390_FEATURE_MSA
C|J9PORT_S390_FEATURE_MSA_EXTENSION3
C|J9PORT_S390_FEATURE_MSA_EXTENSION4
C|J9PORT_S390_FEATURE_MSA_EXTENSION_5
C|J9PORT_S390_FEATURE_MSA_EXTENSION_8
C|J9PORT_S390_FEATURE_SEMAPHORE_ASSIST
C|J9PORT_S390_FEATURE_SIDE_EFFECT_ACCESS
C|J9PORT_S390_FEATURE_STFLE
C|J9PORT_S390_FEATURE_TE
C|J9PORT_S390_FEATURE_VECTOR_FACILITY
C|J9PORT_S390_FEATURE_VECTOR_FACILITY_ENHANCEMENT_1
C|J9PORT_S390_FEATURE_VECTOR_PACKED_DECIMAL
C|J9PORT_S390_FEATURE_ZARCH
C|J9PORT_SHMEM_EYECATCHER_LENGTH
C|J9PORT_SHSEM_MODE_DEFAULT
C|J9PORT_SHSEM_MODE_NOWAIT
Expand All @@ -3037,38 +2893,6 @@ C|J9PORT_SYSINFO_GET_HW_INFO_MODEL
C|J9PORT_SYSINFO_GET_HW_INFO_NOT_AVAILABLE
C|J9PORT_SYSINFO_GET_HW_INFO_SUCCESS
C|J9PORT_SYSINFO_HW_INFO_MODEL_BUF_LENGTH
C|J9PORT_X86_FEATURE_10
C|J9PORT_X86_FEATURE_20
C|J9PORT_X86_FEATURE_30
C|J9PORT_X86_FEATURE_ACPI
C|J9PORT_X86_FEATURE_APIC
C|J9PORT_X86_FEATURE_CLFSH
C|J9PORT_X86_FEATURE_CMOV
C|J9PORT_X86_FEATURE_CX8
C|J9PORT_X86_FEATURE_DE
C|J9PORT_X86_FEATURE_DS
C|J9PORT_X86_FEATURE_FPU
C|J9PORT_X86_FEATURE_FXSR
C|J9PORT_X86_FEATURE_HTT
C|J9PORT_X86_FEATURE_MCA
C|J9PORT_X86_FEATURE_MCE
C|J9PORT_X86_FEATURE_MMX
C|J9PORT_X86_FEATURE_MSR
C|J9PORT_X86_FEATURE_MTRR
C|J9PORT_X86_FEATURE_PAE
C|J9PORT_X86_FEATURE_PAT
C|J9PORT_X86_FEATURE_PBE
C|J9PORT_X86_FEATURE_PGE
C|J9PORT_X86_FEATURE_PSE
C|J9PORT_X86_FEATURE_PSE_36
C|J9PORT_X86_FEATURE_PSN
C|J9PORT_X86_FEATURE_SEP
C|J9PORT_X86_FEATURE_SS
C|J9PORT_X86_FEATURE_SSE
C|J9PORT_X86_FEATURE_SSE2
C|J9PORT_X86_FEATURE_TM
C|J9PORT_X86_FEATURE_TSC
C|J9PORT_X86_FEATURE_VME
C|J9SHMEM_NO_FLAGS
C|J9SHMEM_OPEN_DO_NOT_CREATE
C|J9SHMEM_OPEN_FOR_DESTROY
Expand Down Expand Up @@ -3354,53 +3178,6 @@ C|J9InitCopyLongs
C|J9InitCopyLongsW
C|J9InitCopySingles
C|J9InitCopySinglesW
S|J9ProcessorArchitecture|J9ProcessorArchitecturePointer|
C|PROCESSOR_DUMMY
C|PROCESSOR_PPC_7XX
C|PROCESSOR_PPC_GP
C|PROCESSOR_PPC_GR
C|PROCESSOR_PPC_NSTAR
C|PROCESSOR_PPC_P6
C|PROCESSOR_PPC_P7
C|PROCESSOR_PPC_P8
C|PROCESSOR_PPC_P9
C|PROCESSOR_PPC_PULSAR
C|PROCESSOR_PPC_PWR403
C|PROCESSOR_PPC_PWR405
C|PROCESSOR_PPC_PWR440
C|PROCESSOR_PPC_PWR601
C|PROCESSOR_PPC_PWR602
C|PROCESSOR_PPC_PWR603
C|PROCESSOR_PPC_PWR604
C|PROCESSOR_PPC_PWR620
C|PROCESSOR_PPC_PWR630
C|PROCESSOR_PPC_RIOS1
C|PROCESSOR_PPC_RIOS2
C|PROCESSOR_PPC_UNKNOWN
C|PROCESSOR_S390_GP10
C|PROCESSOR_S390_GP11
C|PROCESSOR_S390_GP12
C|PROCESSOR_S390_GP13
C|PROCESSOR_S390_GP6
C|PROCESSOR_S390_GP7
C|PROCESSOR_S390_GP8
C|PROCESSOR_S390_GP9
C|PROCESSOR_S390_UNKNOWN
C|PROCESSOR_UNDEFINED
C|PROCESSOR_X86_AMDATHLONDURON
C|PROCESSOR_X86_AMDK5
C|PROCESSOR_X86_AMDK6
C|PROCESSOR_X86_AMDOPTERON
C|PROCESSOR_X86_INTELCORE2
C|PROCESSOR_X86_INTELHASWELL
C|PROCESSOR_X86_INTELNEHALEM
C|PROCESSOR_X86_INTELP6
C|PROCESSOR_X86_INTELPENTIUM
C|PROCESSOR_X86_INTELPENTIUM4
C|PROCESSOR_X86_INTELSANDYBRIDGE
C|PROCESSOR_X86_INTELTULSA
C|PROCESSOR_X86_INTELWESTMERE
C|PROCESSOR_X86_UNKNOWN
S|J9RASdumpAgent|J9RASdumpAgentPointer|
C|J9RAS_DUMP_DO_ATTACH_THREAD
C|J9RAS_DUMP_DO_COMPACT_HEAP
Expand Down
12 changes: 6 additions & 6 deletions runtime/gc_modron_startup/mminit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3036,12 +3036,12 @@ gcInitializeDefaults(J9JavaVM* vm)
extensions->concurrentScavenger = true;

if (LOADED == (FIND_DLL_TABLE_ENTRY(J9_JIT_DLL_NAME)->loadFlags & LOADED)) {

/* Check for supported hardware */
J9ProcessorDesc processorDesc;
j9sysinfo_get_processor_description(&processorDesc);
bool hwSupported = j9sysinfo_processor_has_feature(&processorDesc, J9PORT_S390_FEATURE_GUARDED_STORAGE) &&
j9sysinfo_processor_has_feature(&processorDesc, J9PORT_S390_FEATURE_SIDE_EFFECT_ACCESS);
/* Check for supported hardware. */
OMRPORT_ACCESS_FROM_J9PORT(PORTLIB);
OMRProcessorDesc processorDesc;
omrsysinfo_get_processor_description(&processorDesc);
bool hwSupported = omrsysinfo_processor_has_feature(&processorDesc, OMR_FEATURE_S390_GUARDED_STORAGE)
&& omrsysinfo_processor_has_feature(&processorDesc, OMR_FEATURE_S390_SIDE_EFFECT_ACCESS);

if (hwSupported) {
/*
Expand Down
12 changes: 6 additions & 6 deletions runtime/jcl/common/sun_misc_Unsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,19 +887,19 @@ Java_jdk_internal_misc_Unsafe_writebackMemory(JNIEnv *env, jobject receiver, jlo

VM_AtomicSupport::readWriteBarrier();
switch (vm->cpuCacheWritebackCapabilities) {
case J9PORT_X86_FEATURE_CLWB:
case OMR_FEATURE_X86_CLWB:
do {
cacheLine += cacheLineSize;
asm volatile("clwb %0" : "+m" (*(U_8 *)cacheLine));
} while (lastCacheLine != cacheLine);
break;
case J9PORT_X86_FEATURE_CLFLUSHOPT:
case OMR_FEATURE_X86_CLFLUSHOPT:
do {
cacheLine += cacheLineSize;
asm volatile("clflushopt %0" : "+m" (*(U_8 *)cacheLine));
} while (lastCacheLine != cacheLine);
break;
case J9PORT_X86_FEATURE_CLFSH:
case OMR_FEATURE_X86_CLFSH:
do {
cacheLine += cacheLineSize;
asm volatile("clflush %0" : "+m" (*(U_8 *)cacheLine));
Expand Down Expand Up @@ -937,9 +937,9 @@ Java_jdk_internal_misc_Unsafe_isWritebackEnabled(JNIEnv *env, jclass clazz)
J9JavaVM *vm = currentThread->javaVM;
if (vm->dCacheLineSize > 0) {
switch (vm->cpuCacheWritebackCapabilities) {
case J9PORT_X86_FEATURE_CLWB:
case J9PORT_X86_FEATURE_CLFLUSHOPT:
case J9PORT_X86_FEATURE_CLFSH:
case OMR_FEATURE_X86_CLFLUSHOPT:
case OMR_FEATURE_X86_CLFSH:
case OMR_FEATURE_X86_CLWB:
result = JNI_TRUE;
break;
default:
Expand Down
Loading