8163150: SA: CLHSDB printmdo throws an exception with "java.lang.InternalError: missing reason for 22"
Accounted for the new JVMCI related Deoptimization Reasons. Reviewed-by: dsamersoff, sla
This commit is contained in:
parent
66706edf15
commit
ab538ab5ed
@ -36,6 +36,7 @@ import sun.jvm.hotspot.utilities.*;
|
|||||||
public class MethodData extends Metadata implements MethodDataInterface<Klass,Method> {
|
public class MethodData extends Metadata implements MethodDataInterface<Klass,Method> {
|
||||||
static int TypeProfileWidth = 2;
|
static int TypeProfileWidth = 2;
|
||||||
static int BciProfileWidth = 2;
|
static int BciProfileWidth = 2;
|
||||||
|
static int MethodProfileWidth = 0;
|
||||||
static int CompileThreshold;
|
static int CompileThreshold;
|
||||||
|
|
||||||
static int Reason_many; // indicates presence of several reasons
|
static int Reason_many; // indicates presence of several reasons
|
||||||
@ -142,6 +143,8 @@ public class MethodData extends Metadata implements MethodDataInterface<Klass,Me
|
|||||||
TypeProfileWidth = (int)flag.getIntx();
|
TypeProfileWidth = (int)flag.getIntx();
|
||||||
} else if (flag.getName().equals("BciProfileWidth")) {
|
} else if (flag.getName().equals("BciProfileWidth")) {
|
||||||
BciProfileWidth = (int)flag.getIntx();
|
BciProfileWidth = (int)flag.getIntx();
|
||||||
|
} else if (flag.getName().equals("MethodProfileWidth")) {
|
||||||
|
MethodProfileWidth = (int)flag.getIntx();
|
||||||
} else if (flag.getName().equals("CompileThreshold")) {
|
} else if (flag.getName().equals("CompileThreshold")) {
|
||||||
CompileThreshold = (int)flag.getIntx();
|
CompileThreshold = (int)flag.getIntx();
|
||||||
}
|
}
|
||||||
@ -154,7 +157,7 @@ public class MethodData extends Metadata implements MethodDataInterface<Klass,Me
|
|||||||
|
|
||||||
parametersTypeDataDi = new CIntField(type.getCIntegerField("_parameters_type_data_di"), 0);
|
parametersTypeDataDi = new CIntField(type.getCIntegerField("_parameters_type_data_di"), 0);
|
||||||
|
|
||||||
sizeofMethodDataOopDesc = (int)type.getSize();;
|
sizeofMethodDataOopDesc = (int)type.getSize();
|
||||||
|
|
||||||
Reason_many = db.lookupIntConstant("Deoptimization::Reason_many").intValue();
|
Reason_many = db.lookupIntConstant("Deoptimization::Reason_many").intValue();
|
||||||
Reason_none = db.lookupIntConstant("Deoptimization::Reason_none").intValue();
|
Reason_none = db.lookupIntConstant("Deoptimization::Reason_none").intValue();
|
||||||
@ -257,7 +260,7 @@ public class MethodData extends Metadata implements MethodDataInterface<Klass,Me
|
|||||||
|
|
||||||
ParametersTypeData<Klass,Method> parametersTypeData() {
|
ParametersTypeData<Klass,Method> parametersTypeData() {
|
||||||
int di = (int)parametersTypeDataDi.getValue(getAddress());
|
int di = (int)parametersTypeDataDi.getValue(getAddress());
|
||||||
if (di == -1) {
|
if (di == -1 || di == -2) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
DataLayout dataLayout = new DataLayout(this, di + (int)data.getOffset());
|
DataLayout dataLayout = new DataLayout(this, di + (int)data.getOffset());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -38,9 +38,21 @@ import sun.jvm.hotspot.utilities.*;
|
|||||||
// that the check is reached, and a series of (Klass, count) pairs
|
// that the check is reached, and a series of (Klass, count) pairs
|
||||||
// which are used to store a type profile for the receiver of the check.
|
// which are used to store a type profile for the receiver of the check.
|
||||||
public class ReceiverTypeData<K,M> extends CounterData {
|
public class ReceiverTypeData<K,M> extends CounterData {
|
||||||
static final int receiver0Offset = counterCellCount;
|
static final int INCLUDE_JVMCI;
|
||||||
static final int count0Offset = receiver0Offset + 1;
|
static final int nonProfiledCountOffset = counterCellCount;
|
||||||
static final int receiverTypeRowCellCount = (count0Offset + 1) - receiver0Offset;
|
static final int receiver0Offset;
|
||||||
|
static final int count0Offset;
|
||||||
|
static final int receiverTypeRowCellCount;
|
||||||
|
static {
|
||||||
|
INCLUDE_JVMCI = VM.getVM().getTypeDataBase().lookupIntConstant("INCLUDE_JVMCI");
|
||||||
|
if (INCLUDE_JVMCI == 1) {
|
||||||
|
receiver0Offset = nonProfiledCountOffset + 1;
|
||||||
|
} else {
|
||||||
|
receiver0Offset = counterCellCount;
|
||||||
|
}
|
||||||
|
count0Offset = receiver0Offset + 1;
|
||||||
|
receiverTypeRowCellCount = (count0Offset + 1) - receiver0Offset;
|
||||||
|
}
|
||||||
final MethodDataInterface<K,M> methodData;
|
final MethodDataInterface<K,M> methodData;
|
||||||
|
|
||||||
public ReceiverTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
public ReceiverTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||||
@ -53,7 +65,11 @@ public class ReceiverTypeData<K,M> extends CounterData {
|
|||||||
boolean isReceivertypedata() { return true; }
|
boolean isReceivertypedata() { return true; }
|
||||||
|
|
||||||
static int staticCellCount() {
|
static int staticCellCount() {
|
||||||
return counterCellCount + MethodData.TypeProfileWidth * receiverTypeRowCellCount;
|
int cellCount = counterCellCount + MethodData.TypeProfileWidth * receiverTypeRowCellCount;
|
||||||
|
if (INCLUDE_JVMCI == 1) {
|
||||||
|
cellCount += 1;
|
||||||
|
}
|
||||||
|
return cellCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int cellCount() {
|
public int cellCount() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -44,7 +44,11 @@ public class VirtualCallData<K,M> extends ReceiverTypeData<K,M> {
|
|||||||
static int staticCellCount() {
|
static int staticCellCount() {
|
||||||
// At this point we could add more profile state, e.g., for arguments.
|
// At this point we could add more profile state, e.g., for arguments.
|
||||||
// But for now it's the same size as the base record type.
|
// But for now it's the same size as the base record type.
|
||||||
return ReceiverTypeData.staticCellCount();
|
int cellCount = ReceiverTypeData.staticCellCount();
|
||||||
|
if (INCLUDE_JVMCI == 1) {
|
||||||
|
cellCount += MethodData.MethodProfileWidth * receiverTypeRowCellCount;
|
||||||
|
}
|
||||||
|
return cellCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int cellCount() {
|
public int cellCount() {
|
||||||
|
@ -2626,6 +2626,11 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
|||||||
declare_constant(Deoptimization::Reason_rtm_state_change) \
|
declare_constant(Deoptimization::Reason_rtm_state_change) \
|
||||||
declare_constant(Deoptimization::Reason_unstable_if) \
|
declare_constant(Deoptimization::Reason_unstable_if) \
|
||||||
declare_constant(Deoptimization::Reason_unstable_fused_if) \
|
declare_constant(Deoptimization::Reason_unstable_fused_if) \
|
||||||
|
NOT_ZERO(JVMCI_ONLY(declare_constant(Deoptimization::Reason_aliasing))) \
|
||||||
|
NOT_ZERO(JVMCI_ONLY(declare_constant(Deoptimization::Reason_transfer_to_interpreter))) \
|
||||||
|
NOT_ZERO(JVMCI_ONLY(declare_constant(Deoptimization::Reason_not_compiled_exception_handler))) \
|
||||||
|
NOT_ZERO(JVMCI_ONLY(declare_constant(Deoptimization::Reason_unresolved))) \
|
||||||
|
NOT_ZERO(JVMCI_ONLY(declare_constant(Deoptimization::Reason_jsr_mismatch))) \
|
||||||
declare_constant(Deoptimization::Reason_tenured) \
|
declare_constant(Deoptimization::Reason_tenured) \
|
||||||
declare_constant(Deoptimization::Reason_LIMIT) \
|
declare_constant(Deoptimization::Reason_LIMIT) \
|
||||||
declare_constant(Deoptimization::Reason_RECORDED_LIMIT) \
|
declare_constant(Deoptimization::Reason_RECORDED_LIMIT) \
|
||||||
@ -2750,7 +2755,13 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
|||||||
declare_constant(ConcreteRegisterImpl::number_of_registers) \
|
declare_constant(ConcreteRegisterImpl::number_of_registers) \
|
||||||
declare_preprocessor_constant("REG_COUNT", REG_COUNT) \
|
declare_preprocessor_constant("REG_COUNT", REG_COUNT) \
|
||||||
declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \
|
declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \
|
||||||
declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT)
|
declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT) \
|
||||||
|
\
|
||||||
|
/****************/ \
|
||||||
|
/* JVMCI */ \
|
||||||
|
/****************/ \
|
||||||
|
\
|
||||||
|
declare_preprocessor_constant("INCLUDE_JVMCI", INCLUDE_JVMCI)
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user