< prev index next >

src/os/linux/vm/os_linux.cpp

Print this page

        

*** 1416,1427 **** "be adversely affected if the time-of-day clock changes"); } #ifndef SYS_clock_getres ! #if defined(IA32) || defined(AMD64) ! #define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) #else #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" #define sys_clock_getres(x,y) -1 #endif --- 1416,1427 ---- "be adversely affected if the time-of-day clock changes"); } #ifndef SYS_clock_getres ! #if defined(IA32) || defined(AMD64) || defined(AARCH64) ! #define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) AARCH64_ONLY(114) #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) #else #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" #define sys_clock_getres(x,y) -1 #endif
*** 2008,2018 **** static Elf32_Half running_arch_code=EM_68K; #elif (defined AARCH64) static Elf32_Half running_arch_code=EM_AARCH64; #else #error Method os::dll_load requires that one of following is defined:\ ! IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures --- 2008,2018 ---- static Elf32_Half running_arch_code=EM_68K; #elif (defined AARCH64) static Elf32_Half running_arch_code=EM_AARCH64; #else #error Method os::dll_load requires that one of following is defined:\ ! IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64 #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures
*** 2947,2971 **** int os::Linux::sched_getcpu_syscall(void) { unsigned int cpu = 0; int retval = -1; ! #if defined(IA32) ! # ifndef SYS_getcpu ! # define SYS_getcpu 318 ! # endif ! retval = syscall(SYS_getcpu, &cpu, NULL, NULL); ! #elif defined(AMD64) // Unfortunately we have to bring all these macros here from vsyscall.h // to be able to compile on old linuxes. # define __NR_vgetcpu 2 # define VSYSCALL_START (-10UL << 20) # define VSYSCALL_SIZE 1024 # define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) typedef long (*vgetcpu_t)(unsigned int *cpu, unsigned int *node, unsigned long *tcache); vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu); retval = vgetcpu(&cpu, NULL, NULL); #endif return (retval == -1) ? retval : cpu; } --- 2947,2971 ---- int os::Linux::sched_getcpu_syscall(void) { unsigned int cpu = 0; int retval = -1; ! #if defined(AMD64) // Unfortunately we have to bring all these macros here from vsyscall.h // to be able to compile on old linuxes. # define __NR_vgetcpu 2 # define VSYSCALL_START (-10UL << 20) # define VSYSCALL_SIZE 1024 # define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) typedef long (*vgetcpu_t)(unsigned int *cpu, unsigned int *node, unsigned long *tcache); vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu); retval = vgetcpu(&cpu, NULL, NULL); + #elif defined(IA32) || defined(AARCH64) + # ifndef SYS_getcpu + # define SYS_getcpu AARCH64_ONLY(168) IA32_ONLY(318) + # endif + retval = syscall(SYS_getcpu, &cpu, NULL, NULL); #endif return (retval == -1) ? retval : cpu; }
*** 3515,3525 **** // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ! ARM_ONLY(2 * M) PPC_ONLY(4 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) { --- 3515,3525 ---- // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ! ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) {
< prev index next >