src/os/solaris/dtrace/jhelper.d

changeset 4037
da91efe96a93
parent 3826
2fe087c3e814
child 4159
8e47bac5643a
     1.1 --- a/src/os/solaris/dtrace/jhelper.d	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/os/solaris/dtrace/jhelper.d	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -44,7 +44,6 @@
     1.4  extern pointer __JvmOffsets;
     1.5  
     1.6  extern pointer __1cJCodeCacheF_heap_;
     1.7 -extern pointer __1cIUniverseP_methodKlassObj_;
     1.8  extern pointer __1cIUniverseO_collectedHeap_;
     1.9  extern pointer __1cIUniverseL_narrow_oop_;
    1.10  #ifdef _LP64
    1.11 @@ -52,6 +51,7 @@
    1.12  #endif
    1.13  
    1.14  extern pointer __1cHnmethodG__vtbl_;
    1.15 +extern pointer __1cGMethodG__vtbl_;
    1.16  extern pointer __1cKBufferBlobG__vtbl_;
    1.17  
    1.18  #define copyin_ptr(ADDR)    *(pointer*)  copyin((pointer) (ADDR), sizeof(pointer))
    1.19 @@ -81,7 +81,7 @@
    1.20    init_done  = 0;
    1.21    this->error = (char *) NULL;
    1.22    this->result = (char *) NULL;
    1.23 -  this->methodOop = 0;
    1.24 +  this->isMethod = 0;
    1.25    this->codecache = 0;
    1.26    this->klass = (pointer) NULL;
    1.27    this->vtbl  = (pointer) NULL;
    1.28 @@ -109,7 +109,7 @@
    1.29  
    1.30    copyin_offset(OFFSET_interpreter_frame_method);
    1.31    copyin_offset(OFFSET_Klass_name);
    1.32 -  copyin_offset(OFFSET_constantPoolOopDesc_pool_holder);
    1.33 +  copyin_offset(OFFSET_ConstantPool_pool_holder);
    1.34  
    1.35    copyin_offset(OFFSET_HeapBlockHeader_used);
    1.36    copyin_offset(OFFSET_oopDesc_metadata);
    1.37 @@ -117,10 +117,10 @@
    1.38    copyin_offset(OFFSET_Symbol_length);
    1.39    copyin_offset(OFFSET_Symbol_body);
    1.40  
    1.41 -  copyin_offset(OFFSET_methodOopDesc_constMethod);
    1.42 -  copyin_offset(OFFSET_constMethodOopDesc_constants);
    1.43 -  copyin_offset(OFFSET_constMethodOopDesc_name_index);
    1.44 -  copyin_offset(OFFSET_constMethodOopDesc_signature_index);
    1.45 +  copyin_offset(OFFSET_Method_constMethod);
    1.46 +  copyin_offset(OFFSET_ConstMethod_constants);
    1.47 +  copyin_offset(OFFSET_ConstMethod_name_index);
    1.48 +  copyin_offset(OFFSET_ConstMethod_signature_index);
    1.49  
    1.50    copyin_offset(OFFSET_CodeHeap_memory);
    1.51    copyin_offset(OFFSET_CodeHeap_segmap);
    1.52 @@ -134,7 +134,7 @@
    1.53    copyin_offset(OFFSET_nmethod_method);
    1.54    copyin_offset(SIZE_HeapBlockHeader);
    1.55    copyin_offset(SIZE_oopDesc);
    1.56 -  copyin_offset(SIZE_constantPoolOopDesc);
    1.57 +  copyin_offset(SIZE_ConstantPool);
    1.58  
    1.59    copyin_offset(OFFSET_NarrowOopStruct_base);
    1.60    copyin_offset(OFFSET_NarrowOopStruct_shift);
    1.61 @@ -145,18 +145,17 @@
    1.62    this->pc = arg0;
    1.63  
    1.64    /*
    1.65 -   * The methodOopPtr is in %l2 on SPARC.  This can be found at
    1.66 +   * The methodPtr is in %l2 on SPARC.  This can be found at
    1.67     * offset 8 from the frame pointer on 32-bit processes.
    1.68     */
    1.69  #if   defined(__sparc)
    1.70 -  this->methodOopPtr = copyin_ptr(arg1 + 2 * sizeof(pointer) + STACK_BIAS);
    1.71 +  this->methodPtr = copyin_ptr(arg1 + 2 * sizeof(pointer) + STACK_BIAS);
    1.72  #elif defined(__i386) || defined(__amd64)
    1.73 -  this->methodOopPtr = copyin_ptr(arg1 + OFFSET_interpreter_frame_method);
    1.74 +  this->methodPtr = copyin_ptr(arg1 + OFFSET_interpreter_frame_method);
    1.75  #else
    1.76  #error "Don't know architecture"
    1.77  #endif
    1.78  
    1.79 -  this->Universe_methodKlassOop = copyin_ptr(&``__1cIUniverseP_methodKlassObj_);
    1.80    this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
    1.81  
    1.82    /* Reading volatile values */
    1.83 @@ -186,6 +185,8 @@
    1.84    this->CodeHeap_log2_segment_size = copyin_uint32(
    1.85        this->CodeCache_heap_address + OFFSET_CodeHeap_log2_segment_size);
    1.86  
    1.87 +  this->Method_vtbl             = (pointer) &``__1cGMethodG__vtbl_;
    1.88 +
    1.89    /*
    1.90     * Get Java heap bounds
    1.91     */
    1.92 @@ -298,9 +299,9 @@
    1.93  /!this->done && this->vtbl == this->nmethod_vtbl/
    1.94  {
    1.95    MARK_LINE;
    1.96 -  this->methodOopPtr = copyin_ptr(this->start + OFFSET_nmethod_method);
    1.97 +  this->methodPtr = copyin_ptr(this->start + OFFSET_nmethod_method);
    1.98    this->suffix = '*';
    1.99 -  this->methodOop = 1;
   1.100 +  this->isMethod = 1;
   1.101  }
   1.102  
   1.103  dtrace:helper:ustack:
   1.104 @@ -310,35 +311,18 @@
   1.105    this->name = copyin_ptr(this->start + OFFSET_CodeBlob_name);
   1.106  }
   1.107  
   1.108 +
   1.109  dtrace:helper:ustack:
   1.110 -/!this->done && this->vtbl == this->BufferBlob_vtbl &&
   1.111 -this->Use_Compressed_Oops == 0 &&
   1.112 -this->methodOopPtr > this->heap_start && this->methodOopPtr < this->heap_end/
   1.113 +/!this->done && this->vtbl == this->BufferBlob_vtbl && this->methodPtr != 0/
   1.114  {
   1.115    MARK_LINE;
   1.116 -  this->klass = copyin_ptr(this->methodOopPtr + OFFSET_oopDesc_metadata);
   1.117 -  this->methodOop = this->klass == this->Universe_methodKlassOop;
   1.118 -  this->done = !this->methodOop;
   1.119 +  this->klass = copyin_ptr(this->methodPtr);
   1.120 +  this->isMethod = this->klass == this->Method_vtbl;
   1.121 +  this->done = !this->isMethod;
   1.122  }
   1.123  
   1.124  dtrace:helper:ustack:
   1.125 -/!this->done && this->vtbl == this->BufferBlob_vtbl &&
   1.126 -this->Use_Compressed_Oops != 0 &&
   1.127 -this->methodOopPtr > this->heap_start && this->methodOopPtr < this->heap_end/
   1.128 -{
   1.129 -  MARK_LINE;
   1.130 -  /*
   1.131 -   * Read compressed pointer and  decode heap oop, same as oop.inline.hpp
   1.132 -   */
   1.133 -  this->cklass = copyin_uint32(this->methodOopPtr + OFFSET_oopDesc_metadata);
   1.134 -  this->klass = (uint64_t)((uintptr_t)this->Universe_narrow_oop_base +
   1.135 -                ((uintptr_t)this->cklass << this->Universe_narrow_oop_shift));
   1.136 -  this->methodOop = this->klass == this->Universe_methodKlassOop;
   1.137 -  this->done = !this->methodOop;
   1.138 -}
   1.139 -
   1.140 -dtrace:helper:ustack:
   1.141 -/!this->done && !this->methodOop/
   1.142 +/!this->done && !this->isMethod/
   1.143  {
   1.144    MARK_LINE;
   1.145    this->name = copyin_ptr(this->start + OFFSET_CodeBlob_name);
   1.146 @@ -347,38 +331,38 @@
   1.147  }
   1.148  
   1.149  dtrace:helper:ustack:
   1.150 -/!this->done && this->methodOop/
   1.151 +/!this->done && this->isMethod/
   1.152  {
   1.153    MARK_LINE;
   1.154 -  this->constMethod = copyin_ptr(this->methodOopPtr +
   1.155 -      OFFSET_methodOopDesc_constMethod);
   1.156 +  this->constMethod = copyin_ptr(this->methodPtr +
   1.157 +      OFFSET_Method_constMethod);
   1.158  
   1.159    this->nameIndex = copyin_uint16(this->constMethod +
   1.160 -      OFFSET_constMethodOopDesc_name_index);
   1.161 +      OFFSET_ConstMethod_name_index);
   1.162  
   1.163    this->signatureIndex = copyin_uint16(this->constMethod +
   1.164 -      OFFSET_constMethodOopDesc_signature_index);
   1.165 +      OFFSET_ConstMethod_signature_index);
   1.166  
   1.167    this->constantPool = copyin_ptr(this->constMethod +
   1.168 -      OFFSET_constMethodOopDesc_constants);
   1.169 +      OFFSET_ConstMethod_constants);
   1.170  
   1.171    this->nameSymbol = copyin_ptr(this->constantPool +
   1.172 -      this->nameIndex * sizeof (pointer) + SIZE_constantPoolOopDesc);
   1.173 +      this->nameIndex * sizeof (pointer) + SIZE_ConstantPool);
   1.174  
   1.175    this->nameSymbolLength = copyin_uint16(this->nameSymbol +
   1.176        OFFSET_Symbol_length);
   1.177  
   1.178    this->signatureSymbol = copyin_ptr(this->constantPool +
   1.179 -      this->signatureIndex * sizeof (pointer) + SIZE_constantPoolOopDesc);
   1.180 +      this->signatureIndex * sizeof (pointer) + SIZE_ConstantPool);
   1.181  
   1.182    this->signatureSymbolLength = copyin_uint16(this->signatureSymbol +
   1.183        OFFSET_Symbol_length);
   1.184  
   1.185    this->klassPtr = copyin_ptr(this->constantPool +
   1.186 -      OFFSET_constantPoolOopDesc_pool_holder);
   1.187 +      OFFSET_ConstantPool_pool_holder);
   1.188  
   1.189    this->klassSymbol = copyin_ptr(this->klassPtr +
   1.190 -      OFFSET_Klass_name + SIZE_oopDesc);
   1.191 +      OFFSET_Klass_name);
   1.192  
   1.193    this->klassSymbolLength = copyin_uint16(this->klassSymbol +
   1.194        OFFSET_Symbol_length);

mercurial