Skip to content

Commit

Permalink
[Misc] Revert current aarch64 support
Browse files Browse the repository at this point in the history
Summary: OpenJDK8u mainline has aarch64 support since 292, and this conflicts with current aarch64 support in Dragonwell8.
Need to revert current aarch64 support, to prepare further merge with 8u292

Test Plan: existing x86 tests

Reviewed-by: zhengxiaolinX, joeyleeeeeee97, ziyilin, kuaiwei

Issue: dragonwell-project/dragonwell8#228
  • Loading branch information
sandlerwang committed May 19, 2021
1 parent 6db5be9 commit ca21c80
Show file tree
Hide file tree
Showing 304 changed files with 71 additions and 73,600 deletions.
8 changes: 0 additions & 8 deletions agent/make/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ sun.jvm.hotspot.debugger.cdbg.basic.x86 \
sun.jvm.hotspot.debugger.dummy \
sun.jvm.hotspot.debugger.linux \
sun.jvm.hotspot.debugger.linux.amd64 \
sun.jvm.hotspot.debugger.linux.aarch64 \
sun.jvm.hotspot.debugger.linux.x86 \
sun.jvm.hotspot.debugger.posix \
sun.jvm.hotspot.debugger.posix.elf \
sun.jvm.hotspot.debugger.proc \
sun.jvm.hotspot.debugger.proc.amd64 \
sun.jvm.hotspot.debugger.proc.aarch64 \
sun.jvm.hotspot.debugger.proc.sparc \
sun.jvm.hotspot.debugger.proc.x86 \
sun.jvm.hotspot.debugger.remote \
Expand All @@ -90,13 +88,11 @@ sun.jvm.hotspot.oops \
sun.jvm.hotspot.prims \
sun.jvm.hotspot.runtime \
sun.jvm.hotspot.runtime.amd64 \
sun.jvm.hotspot.runtime.aarch64 \
sun.jvm.hotspot.runtime.bsd \
sun.jvm.hotspot.runtime.bsd_amd64 \
sun.jvm.hotspot.runtime.bsd_x86 \
sun.jvm.hotspot.runtime.linux \
sun.jvm.hotspot.runtime.linux_amd64 \
sun.jvm.hotspot.runtime.linux_aarch64 \
sun.jvm.hotspot.runtime.linux_sparc \
sun.jvm.hotspot.runtime.linux_x86 \
sun.jvm.hotspot.runtime.posix \
Expand Down Expand Up @@ -147,14 +143,12 @@ sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
sun/jvm/hotspot/debugger/dummy/*.java \
sun/jvm/hotspot/debugger/linux/*.java \
sun/jvm/hotspot/debugger/linux/x86/*.java \
sun/jvm/hotspot/debugger/linux/aarch64/*.java \
sun/jvm/hotspot/debugger/posix/*.java \
sun/jvm/hotspot/debugger/posix/elf/*.java \
sun/jvm/hotspot/debugger/proc/*.java \
sun/jvm/hotspot/debugger/proc/amd64/*.java \
sun/jvm/hotspot/debugger/proc/sparc/*.java \
sun/jvm/hotspot/debugger/proc/x86/*.java \
sun/jvm/hotspot/debugger/proc/aarch64/*.java \
sun/jvm/hotspot/debugger/remote/*.java \
sun/jvm/hotspot/debugger/remote/amd64/*.java \
sun/jvm/hotspot/debugger/remote/sparc/*.java \
Expand All @@ -175,13 +169,11 @@ sun/jvm/hotspot/opto/*.java \
sun/jvm/hotspot/prims/*.java \
sun/jvm/hotspot/runtime/*.java \
sun/jvm/hotspot/runtime/amd64/*.java \
sun/jvm/hotspot/runtime/aarch64/*.java \
sun/jvm/hotspot/runtime/bsd/*.java \
sun/jvm/hotspot/runtime/bsd_amd64/*.java \
sun/jvm/hotspot/runtime/bsd_x86/*.java \
sun/jvm/hotspot/runtime/linux/*.java \
sun/jvm/hotspot/runtime/linux_amd64/*.java \
sun/jvm/hotspot/runtime/linux_aarch64/*.java \
sun/jvm/hotspot/runtime/linux_sparc/*.java \
sun/jvm/hotspot/runtime/linux_x86/*.java \
sun/jvm/hotspot/runtime/posix/*.java \
Expand Down
23 changes: 1 addition & 22 deletions agent/src/os/linux/LinuxDebuggerLocal.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
#include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h"
#endif

#ifdef aarch64
#include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h"
#endif

static jfieldID p_ps_prochandle_ID = 0;
static jfieldID threadList_ID = 0;
static jfieldID loadObjectList_ID = 0;
Expand Down Expand Up @@ -337,7 +333,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
return (err == PS_OK)? array : 0;
}

#if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9) || defined(aarch64)
#if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9)
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
(JNIEnv *env, jobject this_obj, jint lwp_id) {

Expand All @@ -359,9 +355,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
#ifdef amd64
#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
#endif
#ifdef aarch64
#define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG
#endif
#if defined(sparc) || defined(sparcv9)
#define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
#endif
Expand Down Expand Up @@ -457,20 +450,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
regs[REG_INDEX(R_O7)] = gregs.u_regs[14];
#endif /* sparc */

#if defined(aarch64)

#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg

{
int i;
for (i = 0; i < 31; i++)
regs[i] = gregs.regs[i];
regs[REG_INDEX(SP)] = gregs.sp;
regs[REG_INDEX(PC)] = gregs.pc;
}
#endif /* aarch64 */


(*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
return array;
}
Expand Down
3 changes: 1 addition & 2 deletions agent/src/os/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ $(ARCH)/LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
$(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
sun.jvm.hotspot.debugger.x86.X86ThreadContext \
sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \
sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext \
sun.jvm.hotspot.debugger.aarch64.AARCH64ThreadContext
sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
$(GCC) $(CFLAGS) $< -o $@

$(ARCH)/sadis.o: ../../share/native/sadis.c
Expand Down
7 changes: 0 additions & 7 deletions agent/src/os/linux/libproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@

#include <sys/ptrace.h>

#if defined(aarch64)
#include "asm/ptrace.h"
#endif

/************************************************************************************
0. This is very minimal subset of Solaris libproc just enough for current application.
Expand Down Expand Up @@ -76,9 +72,6 @@ combination of ptrace and /proc calls.
#include <asm/ptrace.h>
#define user_regs_struct pt_regs
#endif
#if defined(aarch64)
#define user_regs_struct user_pt_regs
#endif

// This C bool type must be int for compatibility with Linux calls and
// it would be a mistake to equivalence it to C++ bool on many platforms
Expand Down
12 changes: 6 additions & 6 deletions agent/src/share/classes/sun/jvm/hotspot/HSDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,16 +992,16 @@ public void run() {
curFrame.getFP(),
anno));
} else {
if (VM.getVM().getCPU().equals("x86") || VM.getVM().getCPU().equals("amd64")
|| VM.getVM().getCPU().equals("aarch64")) {
// For C2, which has null frame pointers on x86/amd64/aarch64
if (VM.getVM().getCPU().equals("x86") || VM.getVM().getCPU().equals("amd64")) {
// For C2, which has null frame pointers on x86/amd64
CodeBlob cb = VM.getVM().getCodeCache().findBlob(curFrame.getPC());
Address sp = curFrame.getSP();
if (Assert.ASSERTS_ENABLED) {
Assert.that(cb.getFrameSize() > 0, "CodeBlob must have non-zero frame size");
} annoPanel.addAnnotation(new Annotation(sp,
sp.addOffsetTo(cb.getFrameSize()),
anno));
}
annoPanel.addAnnotation(new Annotation(sp,
sp.addOffsetTo(cb.getFrameSize()),
anno));
} else {
Assert.that(VM.getVM().getCPU().equals("ia64"), "only ia64 should reach here");
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import sun.jvm.hotspot.debugger.sparc.*;
import sun.jvm.hotspot.debugger.linux.x86.*;
import sun.jvm.hotspot.debugger.linux.amd64.*;
import sun.jvm.hotspot.debugger.aarch64.*;
import sun.jvm.hotspot.debugger.linux.aarch64.*;
import sun.jvm.hotspot.debugger.linux.sparc.*;
import sun.jvm.hotspot.utilities.*;

Expand Down Expand Up @@ -99,13 +97,6 @@ public CFrame topFrameForThread(ThreadProxy thread) throws DebuggerException {
Address pc = context.getRegisterAsAddress(SPARCThreadContext.R_O7);
if (pc == null) return null;
return new LinuxSPARCCFrame(dbg, sp, pc, LinuxDebuggerLocal.getAddressSize());
} else if (cpu.equals("aarch64")) {
AARCH64ThreadContext context = (AARCH64ThreadContext) thread.getContext();
Address fp = context.getRegisterAsAddress(AARCH64ThreadContext.FP);
if (fp == null) return null;
Address pc = context.getRegisterAsAddress(AARCH64ThreadContext.PC);
if (pc == null) return null;
return new LinuxAARCH64CFrame(dbg, fp, pc);
} else {
// Runtime exception thrown by LinuxThreadContextFactory if unknown cpu
ThreadContext context = (ThreadContext) thread.getContext();
Expand Down
Loading

0 comments on commit ca21c80

Please sign in to comment.