Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/hotspot/share/jvmci/jvmciJavaClasses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
long_field(HotSpotNmethod, compileIdSnapshot) \
object_field(HotSpotNmethod, method, "Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl;") \
int_field(HotSpotNmethod, invalidationReason) \
jvmci_constructor(HotSpotNmethod, "(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl;Ljava/lang/String;ZJ)V") \
jvmci_constructor(HotSpotNmethod, "(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl;Ljava/lang/String;ZZJ)V") \
end_class \
start_class(HotSpotCompiledCode, jdk_vm_ci_hotspot_HotSpotCompiledCode) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ boolean inOopsTable() {
*/
private int invalidationReason;

HotSpotNmethod(HotSpotResolvedJavaMethodImpl method, String name, boolean isDefault, long compileId) {
this(method, name, isDefault, isDefault, compileId);
}

HotSpotNmethod(HotSpotResolvedJavaMethodImpl method, String name, boolean isDefault, boolean profileDeopt, long compileId) {
super(name);
this.method = method;
Expand All @@ -111,12 +115,13 @@ public void setSpeculationLog(HotSpotSpeculationLog log) {

/**
* The speculation log containing speculations embedded in the nmethod.
*
* <p>
* If {@code speculationLog.managesFailedSpeculations() == true}, this field ensures the failed
* speculation list lives at least as long as this object. This prevents deoptimization from
* appending to an already freed list.
*/
@SuppressWarnings("unused") private HotSpotSpeculationLog speculationLog;
@SuppressWarnings("unused")
private HotSpotSpeculationLog speculationLog;

/**
* Determines if the nmethod associated with this object is the compiled entry point for
Expand Down Expand Up @@ -149,7 +154,8 @@ public ResolvedJavaMethod getMethod() {
/**
* Invalidate this nmethod using the reason specified in {@code invalidationReason} and
* optionally deoptimize the method if {@code deoptimize} is set.
* @param deoptimize whether or not to deoptimize the method.
*
* @param deoptimize whether or not to deoptimize the method.
* @param invalidationReason invalidation reason code.
*/
public void invalidate(boolean deoptimize, int invalidationReason) {
Expand Down Expand Up @@ -180,7 +186,7 @@ public long getEntryPoint() {
@Override
public String toString() {
return String.format("HotSpotNmethod[method=%s, codeBlob=0x%x, isDefault=%b, name=%s, inOopsTable=%s]",
method, getAddress(), isDefault, name, inOopsTable());
method, getAddress(), isDefault, name, inOopsTable());
}

private boolean checkArgs(Object... args) {
Expand All @@ -199,7 +205,7 @@ private boolean checkArgs(Object... args) {

/**
* {@inheritDoc}
*
* <p>
* It's possible for the HotSpot runtime to sweep nmethods at any point in time. As a result,
* there is no guarantee that calling this method will execute the wrapped nmethod. Instead, it
* may end up executing the bytecode of the associated {@link #getMethod() Java method}. Only if
Expand Down