mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-12 17:03:14 +00:00
8350287: Cleanup SA's support for CodeBlob subclasses
Reviewed-by: kvn, sspitsyn
This commit is contained in:
parent
bd8ad309b5
commit
b45c32cd4f
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class AdapterBlob extends RuntimeBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
// Type type = db.lookupType("AdapterBlob");
|
||||
|
||||
// // FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public AdapterBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "AdapterBlob: " + super.getName();
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class BufferBlob extends RuntimeBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("BufferBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public BufferBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -52,20 +52,12 @@ public class CodeBlob extends VMObject {
|
||||
private static CIntegerField dataOffsetField;
|
||||
private static CIntegerField frameSizeField;
|
||||
private static AddressField oopMapsField;
|
||||
private static CIntegerField callerMustGCArgumentsField;
|
||||
|
||||
// Kinds of Codeblob
|
||||
// Kinds of CodeBlobs that we need to know about.
|
||||
private static int NMethodKind;
|
||||
private static int BufferKind;
|
||||
private static int AdapterKind;
|
||||
private static int VtableKind;
|
||||
private static int MHAdapterKind;
|
||||
private static int RuntimeStubKind;
|
||||
private static int DeoptimizationKind;
|
||||
private static int ExceptionKind;
|
||||
private static int SafepointKind;
|
||||
private static int UncommonTrapKind;
|
||||
private static int UpcallKind;
|
||||
private static int NumberOfKinds;
|
||||
|
||||
private static Class[] wrapperClasses;
|
||||
|
||||
@ -89,6 +81,7 @@ public class CodeBlob extends VMObject {
|
||||
dataOffsetField = type.getCIntegerField("_data_offset");
|
||||
frameSizeField = type.getCIntegerField("_frame_size");
|
||||
oopMapsField = type.getAddressField("_oop_maps");
|
||||
callerMustGCArgumentsField = type.getCIntegerField("_caller_must_gc_arguments");
|
||||
|
||||
if (VM.getVM().isServerCompiler()) {
|
||||
matcherInterpreterFramePointerReg =
|
||||
@ -96,38 +89,8 @@ public class CodeBlob extends VMObject {
|
||||
}
|
||||
|
||||
NMethodKind = db.lookupIntConstant("CodeBlobKind::Nmethod").intValue();
|
||||
BufferKind = db.lookupIntConstant("CodeBlobKind::Buffer").intValue();
|
||||
AdapterKind = db.lookupIntConstant("CodeBlobKind::Adapter").intValue();
|
||||
VtableKind = db.lookupIntConstant("CodeBlobKind::Vtable").intValue();
|
||||
MHAdapterKind = db.lookupIntConstant("CodeBlobKind::MHAdapter").intValue();
|
||||
RuntimeStubKind = db.lookupIntConstant("CodeBlobKind::RuntimeStub").intValue();
|
||||
DeoptimizationKind = db.lookupIntConstant("CodeBlobKind::Deoptimization").intValue();
|
||||
SafepointKind = db.lookupIntConstant("CodeBlobKind::Safepoint").intValue();
|
||||
UpcallKind = db.lookupIntConstant("CodeBlobKind::Upcall").intValue();
|
||||
NumberOfKinds = db.lookupIntConstant("CodeBlobKind::Number_Of_Kinds").intValue();
|
||||
if (VM.getVM().isServerCompiler()) {
|
||||
ExceptionKind = db.lookupIntConstant("CodeBlobKind::Exception").intValue();
|
||||
UncommonTrapKind = db.lookupIntConstant("CodeBlobKind::UncommonTrap").intValue();
|
||||
} else {
|
||||
// Set invalid value to not match default.
|
||||
ExceptionKind = NumberOfKinds + 1;
|
||||
UncommonTrapKind = NumberOfKinds + 1;
|
||||
}
|
||||
|
||||
wrapperClasses = new Class[NumberOfKinds];
|
||||
wrapperClasses[NMethodKind] = NMethod.class;
|
||||
wrapperClasses[BufferKind] = BufferBlob.class;
|
||||
wrapperClasses[AdapterKind] = AdapterBlob.class;
|
||||
wrapperClasses[VtableKind] = VtableBlob.class;
|
||||
wrapperClasses[MHAdapterKind] = MethodHandlesAdapterBlob.class;
|
||||
wrapperClasses[RuntimeStubKind] = RuntimeStub.class;
|
||||
wrapperClasses[DeoptimizationKind] = DeoptimizationBlob.class;
|
||||
wrapperClasses[SafepointKind] = SafepointBlob.class;
|
||||
wrapperClasses[UpcallKind] = UpcallStub.class;
|
||||
if (VM.getVM().isServerCompiler()) {
|
||||
wrapperClasses[ExceptionKind] = ExceptionBlob.class;
|
||||
wrapperClasses[UncommonTrapKind] = UncommonTrapBlob.class;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
@ -140,7 +103,16 @@ public class CodeBlob extends VMObject {
|
||||
|
||||
public static Class<?> getClassFor(Address addr) {
|
||||
CodeBlob cb = new CodeBlob(addr);
|
||||
return wrapperClasses[cb.getKind()];
|
||||
int kind = cb.getKind();
|
||||
if (kind == NMethodKind) {
|
||||
return NMethod.class;
|
||||
} else if (kind == UpcallKind) {
|
||||
return UpcallStub.class;
|
||||
} else {
|
||||
// All other CodeBlob kinds have no special functionality in SA and can be
|
||||
// represented by the generic CodeBlob class.
|
||||
return CodeBlob.class;
|
||||
}
|
||||
}
|
||||
|
||||
public Address headerBegin() { return getAddress(); }
|
||||
@ -196,35 +168,16 @@ public class CodeBlob extends VMObject {
|
||||
|
||||
|
||||
// Typing
|
||||
public boolean isBufferBlob() { return getKind() == BufferKind; }
|
||||
|
||||
public boolean isNMethod() { return getKind() == NMethodKind; }
|
||||
|
||||
public boolean isRuntimeStub() { return getKind() == RuntimeStubKind; }
|
||||
|
||||
public boolean isUpcallStub() { return getKind() == UpcallKind; }
|
||||
|
||||
public boolean isDeoptimizationBlob() { return getKind() == DeoptimizationKind; }
|
||||
|
||||
public boolean isUncommonTrapBlob() { return getKind() == UncommonTrapKind; }
|
||||
|
||||
public boolean isExceptionBlob() { return getKind() == ExceptionKind; }
|
||||
|
||||
public boolean isSafepointBlob() { return getKind() == SafepointKind; }
|
||||
|
||||
public boolean isAdapterBlob() { return getKind() == AdapterKind; }
|
||||
|
||||
public boolean isMHAdapterBlob() { return getKind() == MHAdapterKind; }
|
||||
|
||||
public boolean isVtableBlob() { return getKind() == VtableKind; }
|
||||
|
||||
// Fine grain nmethod support: isNMethod() == isJavaMethod() || isNativeMethod() || isOSRMethod()
|
||||
public boolean isJavaMethod() { return false; }
|
||||
|
||||
public boolean isNativeMethod() { return false; }
|
||||
|
||||
/** On-Stack Replacement method */
|
||||
public boolean isOSRMethod() { return false; }
|
||||
|
||||
public NMethod asNMethodOrNull() {
|
||||
if (isNMethod()) return (NMethod)this;
|
||||
@ -266,7 +219,9 @@ public class CodeBlob extends VMObject {
|
||||
}
|
||||
|
||||
// Returns true, if the next frame is responsible for GC'ing oops passed as arguments
|
||||
public boolean callerMustGCArguments() { return false; }
|
||||
public boolean callerMustGCArguments() {
|
||||
return callerMustGCArgumentsField.getValue(addr) != 0;
|
||||
}
|
||||
|
||||
public void print() {
|
||||
printOn(System.out);
|
||||
|
||||
@ -96,13 +96,6 @@ public class CodeCache {
|
||||
// addr - address inside of a code blob
|
||||
public CodeBlob createCodeBlobWrapper(Address cbStart, Address addr) {
|
||||
Class<?> cbClass = CodeBlob.getClassFor(cbStart);
|
||||
if (cbClass == null) {
|
||||
String message = "Couldn't deduce type of CodeBlob ";
|
||||
message = message + "@" + cbStart + " ";
|
||||
message = message + "for PC=" + addr;
|
||||
|
||||
throw new RuntimeException(message);
|
||||
}
|
||||
CodeBlob result = (CodeBlob) VMObjectFactory.newObject(cbClass, cbStart);
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
// The pointer to the HeapBlock that contains this blob is outside of the blob,
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class DeoptimizationBlob extends SingletonBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("DeoptimizationBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public DeoptimizationBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
/** ExceptionBlob: used for exception unwinding in compiled code
|
||||
(currently only used by Compiler 2) */
|
||||
|
||||
public class ExceptionBlob extends SingletonBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("ExceptionBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public ExceptionBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class MethodHandlesAdapterBlob extends AdapterBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("MethodHandlesAdapterBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public MethodHandlesAdapterBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "MethodHandlesAdapterBlob: " + super.getName();
|
||||
}
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import sun.jvm.hotspot.compiler.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class RuntimeBlob extends CodeBlob {
|
||||
|
||||
// Only used by server compiler on x86; computed over in SA rather
|
||||
// than relying on computation in target VM
|
||||
private static final int NOT_YET_COMPUTED = -2;
|
||||
private static final int UNDEFINED = -1;
|
||||
private int linkOffset = NOT_YET_COMPUTED;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("RuntimeBlob");
|
||||
}
|
||||
|
||||
public RuntimeBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class RuntimeStub extends RuntimeBlob {
|
||||
private static CIntegerField callerMustGCArgumentsField;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("RuntimeStub");
|
||||
callerMustGCArgumentsField = type.getCIntegerField("_caller_must_gc_arguments");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public RuntimeStub(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public boolean callerMustGCArguments() {
|
||||
return callerMustGCArgumentsField.getValue(addr) != 0;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return "RuntimeStub: " + super.getName();
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
/** SafepointBlob: handles illegal_instruction exceptions during a safepoint */
|
||||
|
||||
public class SafepointBlob extends SingletonBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("SafepointBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public SafepointBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class SingletonBlob extends RuntimeBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("SingletonBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public SingletonBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
/** UncommonTrapBlob (currently only used by Compiler 2) */
|
||||
|
||||
public class UncommonTrapBlob extends SingletonBlob {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("UncommonTrapBlob");
|
||||
|
||||
// FIXME: add any needed fields
|
||||
}
|
||||
|
||||
public UncommonTrapBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
}
|
||||
@ -31,7 +31,7 @@ import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.Observable;
|
||||
import sun.jvm.hotspot.utilities.Observer;
|
||||
|
||||
public class UpcallStub extends RuntimeBlob {
|
||||
public class UpcallStub extends CodeBlob {
|
||||
|
||||
private static CIntegerField frameDataOffsetField;
|
||||
private static AddressField lastJavaFPField;
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, NTT DATA.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.code;
|
||||
|
||||
import sun.jvm.hotspot.debugger.Address;
|
||||
|
||||
public class VtableBlob extends BufferBlob {
|
||||
|
||||
public VtableBlob(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "VtableBlob: " + super.getName();
|
||||
}
|
||||
|
||||
}
|
||||
@ -160,28 +160,8 @@ public class PStack extends Tool {
|
||||
out.println("<Unknown compiled code>");
|
||||
}
|
||||
}
|
||||
} else if (cb.isBufferBlob()) {
|
||||
out.println("<StubRoutines>");
|
||||
} else if (cb.isAdapterBlob()) {
|
||||
out.println("<AdapterBlob>");
|
||||
} else if (cb.isVtableBlob()) {
|
||||
out.println("<VtableBlob>");
|
||||
} else if (cb.isMHAdapterBlob()) {
|
||||
out.println("<MethodHandlesAdapterBlob>");
|
||||
} else if (cb.isRuntimeStub()) {
|
||||
out.println("<RuntimeStub>");
|
||||
} else if (cb.isUpcallStub()) {
|
||||
out.println("<UpcallStub>");
|
||||
} else if (cb.isDeoptimizationBlob()) {
|
||||
out.println("<DeoptimizationBlob>");
|
||||
} else if (cb.isUncommonTrapBlob()) {
|
||||
out.println("<UncommonTrapBlob>");
|
||||
} else if (cb.isExceptionBlob()) {
|
||||
out.println("<ExceptionBlob>");
|
||||
} else if (cb.isSafepointBlob()) {
|
||||
out.println("<SafepointBlob>");
|
||||
} else {
|
||||
out.println("<Unknown code blob>");
|
||||
out.println("<" + cb.getName() + ">");
|
||||
}
|
||||
} else {
|
||||
printUnknown(out);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user