mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7071427: AdapterFingerPrint can hold 8 entries per int
Reviewed-by: kvn
This commit is contained in:
parent
dd43791e4a
commit
c895368552
2 changed files with 8 additions and 6 deletions
|
@ -243,6 +243,7 @@ void print_statistics() {
|
||||||
FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics);
|
FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics);
|
||||||
Runtime1::print_statistics();
|
Runtime1::print_statistics();
|
||||||
Deoptimization::print_statistics();
|
Deoptimization::print_statistics();
|
||||||
|
SharedRuntime::print_statistics();
|
||||||
nmethod::print_statistics();
|
nmethod::print_statistics();
|
||||||
}
|
}
|
||||||
#endif /* COMPILER1 */
|
#endif /* COMPILER1 */
|
||||||
|
@ -254,8 +255,8 @@ void print_statistics() {
|
||||||
#ifndef COMPILER1
|
#ifndef COMPILER1
|
||||||
Deoptimization::print_statistics();
|
Deoptimization::print_statistics();
|
||||||
nmethod::print_statistics();
|
nmethod::print_statistics();
|
||||||
#endif //COMPILER1
|
|
||||||
SharedRuntime::print_statistics();
|
SharedRuntime::print_statistics();
|
||||||
|
#endif //COMPILER1
|
||||||
os::print_statistics();
|
os::print_statistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2130,9 +2130,9 @@ class AdapterFingerPrint : public CHeapObj {
|
||||||
public:
|
public:
|
||||||
AdapterFingerPrint(int total_args_passed, BasicType* sig_bt) {
|
AdapterFingerPrint(int total_args_passed, BasicType* sig_bt) {
|
||||||
// The fingerprint is based on the BasicType signature encoded
|
// The fingerprint is based on the BasicType signature encoded
|
||||||
// into an array of ints with four entries per int.
|
// into an array of ints with eight entries per int.
|
||||||
int* ptr;
|
int* ptr;
|
||||||
int len = (total_args_passed + 3) >> 2;
|
int len = (total_args_passed + 7) >> 3;
|
||||||
if (len <= (int)(sizeof(_value._compact) / sizeof(int))) {
|
if (len <= (int)(sizeof(_value._compact) / sizeof(int))) {
|
||||||
_value._compact[0] = _value._compact[1] = _value._compact[2] = 0;
|
_value._compact[0] = _value._compact[1] = _value._compact[2] = 0;
|
||||||
// Storing the signature encoded as signed chars hits about 98%
|
// Storing the signature encoded as signed chars hits about 98%
|
||||||
|
@ -2145,11 +2145,11 @@ class AdapterFingerPrint : public CHeapObj {
|
||||||
ptr = _value._fingerprint;
|
ptr = _value._fingerprint;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now pack the BasicTypes with 4 per int
|
// Now pack the BasicTypes with 8 per int
|
||||||
int sig_index = 0;
|
int sig_index = 0;
|
||||||
for (int index = 0; index < len; index++) {
|
for (int index = 0; index < len; index++) {
|
||||||
int value = 0;
|
int value = 0;
|
||||||
for (int byte = 0; byte < 4; byte++) {
|
for (int byte = 0; byte < 8; byte++) {
|
||||||
if (sig_index < total_args_passed) {
|
if (sig_index < total_args_passed) {
|
||||||
value = (value << 4) | adapter_encoding(sig_bt[sig_index++]);
|
value = (value << 4) | adapter_encoding(sig_bt[sig_index++]);
|
||||||
}
|
}
|
||||||
|
@ -2190,8 +2190,9 @@ class AdapterFingerPrint : public CHeapObj {
|
||||||
|
|
||||||
const char* as_string() {
|
const char* as_string() {
|
||||||
stringStream st;
|
stringStream st;
|
||||||
|
st.print("0x");
|
||||||
for (int i = 0; i < length(); i++) {
|
for (int i = 0; i < length(); i++) {
|
||||||
st.print(PTR_FORMAT, value(i));
|
st.print("%08x", value(i));
|
||||||
}
|
}
|
||||||
return st.as_string();
|
return st.as_string();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue