--- a/hotspot/src/os/solaris/dtrace/jhelper.d Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/src/os/solaris/dtrace/jhelper.d Sun Apr 13 17:43:42 2008 -0400
@@ -46,6 +46,7 @@
extern pointer __1cJCodeCacheF_heap_;
extern pointer __1cIUniverseP_methodKlassObj_;
extern pointer __1cIUniverseO_collectedHeap_;
+extern pointer __1cIUniverseK_heap_base_;
extern pointer __1cHnmethodG__vtbl_;
extern pointer __1cKBufferBlobG__vtbl_;
@@ -107,7 +108,7 @@
copyin_offset(OFFSET_constantPoolOopDesc_pool_holder);
copyin_offset(OFFSET_HeapBlockHeader_used);
- copyin_offset(OFFSET_oopDesc_klass);
+ copyin_offset(OFFSET_oopDesc_metadata);
copyin_offset(OFFSET_symbolOopDesc_length);
copyin_offset(OFFSET_symbolOopDesc_body);
@@ -150,6 +151,7 @@
this->Universe_methodKlassOop = copyin_ptr(&``__1cIUniverseP_methodKlassObj_);
this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
+ this->Universe_heap_base = copyin_ptr(&``__1cIUniverseK_heap_base_);
/* Reading volatile values */
this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address +
@@ -293,10 +295,27 @@
dtrace:helper:ustack:
/!this->done && this->vtbl == this->BufferBlob_vtbl &&
+this->Universe_heap_base == NULL &&
this->methodOopPtr > this->heap_start && this->methodOopPtr < this->heap_end/
{
MARK_LINE;
- this->klass = copyin_ptr(this->methodOopPtr + OFFSET_oopDesc_klass);
+ this->klass = copyin_ptr(this->methodOopPtr + OFFSET_oopDesc_metadata);
+ this->methodOop = this->klass == this->Universe_methodKlassOop;
+ this->done = !this->methodOop;
+}
+
+dtrace:helper:ustack:
+/!this->done && this->vtbl == this->BufferBlob_vtbl &&
+this->Universe_heap_base != NULL &&
+this->methodOopPtr > this->heap_start && this->methodOopPtr < this->heap_end/
+{
+ MARK_LINE;
+ /*
+ * Read compressed pointer and decode heap oop, same as oop.inline.hpp
+ */
+ this->cklass = copyin_uint32(this->methodOopPtr + OFFSET_oopDesc_metadata);
+ this->klass = (uint64_t)((uintptr_t)this->Universe_heap_base +
+ ((uintptr_t)this->cklass << 3));
this->methodOop = this->klass == this->Universe_methodKlassOop;
this->done = !this->methodOop;
}