7071427: AdapterFingerPrint can hold 8 entries per int

Wed, 27 Jul 2011 15:06:35 -0700

author
never
date
Wed, 27 Jul 2011 15:06:35 -0700
changeset 3039
0f34fdee809e
parent 3038
4e761e7e6e12
child 3040
c7b60b601eb4

7071427: AdapterFingerPrint can hold 8 entries per int
Reviewed-by: kvn

src/share/vm/runtime/java.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/sharedRuntime.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/java.cpp	Tue Jul 26 19:35:23 2011 -0700
     1.2 +++ b/src/share/vm/runtime/java.cpp	Wed Jul 27 15:06:35 2011 -0700
     1.3 @@ -243,6 +243,7 @@
     1.4      FlagSetting fs(DisplayVMOutput, DisplayVMOutput && PrintC1Statistics);
     1.5      Runtime1::print_statistics();
     1.6      Deoptimization::print_statistics();
     1.7 +    SharedRuntime::print_statistics();
     1.8      nmethod::print_statistics();
     1.9    }
    1.10  #endif /* COMPILER1 */
    1.11 @@ -254,8 +255,8 @@
    1.12  #ifndef COMPILER1
    1.13      Deoptimization::print_statistics();
    1.14      nmethod::print_statistics();
    1.15 +    SharedRuntime::print_statistics();
    1.16  #endif //COMPILER1
    1.17 -    SharedRuntime::print_statistics();
    1.18      os::print_statistics();
    1.19    }
    1.20  
     2.1 --- a/src/share/vm/runtime/sharedRuntime.cpp	Tue Jul 26 19:35:23 2011 -0700
     2.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp	Wed Jul 27 15:06:35 2011 -0700
     2.3 @@ -2130,9 +2130,9 @@
     2.4   public:
     2.5    AdapterFingerPrint(int total_args_passed, BasicType* sig_bt) {
     2.6      // The fingerprint is based on the BasicType signature encoded
     2.7 -    // into an array of ints with four entries per int.
     2.8 +    // into an array of ints with eight entries per int.
     2.9      int* ptr;
    2.10 -    int len = (total_args_passed + 3) >> 2;
    2.11 +    int len = (total_args_passed + 7) >> 3;
    2.12      if (len <= (int)(sizeof(_value._compact) / sizeof(int))) {
    2.13        _value._compact[0] = _value._compact[1] = _value._compact[2] = 0;
    2.14        // Storing the signature encoded as signed chars hits about 98%
    2.15 @@ -2145,11 +2145,11 @@
    2.16        ptr = _value._fingerprint;
    2.17      }
    2.18  
    2.19 -    // Now pack the BasicTypes with 4 per int
    2.20 +    // Now pack the BasicTypes with 8 per int
    2.21      int sig_index = 0;
    2.22      for (int index = 0; index < len; index++) {
    2.23        int value = 0;
    2.24 -      for (int byte = 0; byte < 4; byte++) {
    2.25 +      for (int byte = 0; byte < 8; byte++) {
    2.26          if (sig_index < total_args_passed) {
    2.27            value = (value << 4) | adapter_encoding(sig_bt[sig_index++]);
    2.28          }
    2.29 @@ -2190,8 +2190,9 @@
    2.30  
    2.31    const char* as_string() {
    2.32      stringStream st;
    2.33 +    st.print("0x");
    2.34      for (int i = 0; i < length(); i++) {
    2.35 -      st.print(PTR_FORMAT, value(i));
    2.36 +      st.print("%08x", value(i));
    2.37      }
    2.38      return st.as_string();
    2.39    }

mercurial