1 $NetBSD: patch-hotspot_src_os_solaris_dtrace_jhelper.d,v 1.1 2015/07/03 20:40:59 fhajny Exp $
5 --- hotspot/src/os/solaris/dtrace/jhelper.d.orig 2015-06-10 10:31:52.000000000 +0000
6 +++ hotspot/src/os/solaris/dtrace/jhelper.d
9 extern pointer __JvmOffsets;
11 -extern pointer __1cJCodeCacheF_heap_;
12 -extern pointer __1cIUniverseO_collectedHeap_;
14 -extern pointer __1cHnmethodG__vtbl_;
15 -extern pointer __1cGMethodG__vtbl_;
16 -extern pointer __1cKBufferBlobG__vtbl_;
17 +/* name mangling depends on the compiler used */
19 +#define SYMBOL_JCODECACHE_HEAP __1cJCodeCacheF_heap_
20 +#define SYMBOL_UNIVERSE_METHODKLASSOBJ __1cIUniverseP_methodKlassObj_
21 +#define SYMBOL_UNIVERSE_COLLECTEDHEAP __1cIUniverseO_collectedHeap_
22 +#define SYMBOL_UNIVERSE_NARROW_OOP __1cIUniverseL_narrow_oop_
23 +#define SYMBOL_NMETHOD_VTBL __1cHnmethodG__vtbl_
24 +#define SYMBOL_METHOD_VTBL __1cGMethodG__vtbl_
25 +#define SYMBOL_BUFFERBLOB_VTBL __1cKBufferBlobG__vtbl_
27 +#define SYMBOL_JCODECACHE_HEAP _ZN9CodeCache5_heapE
28 +#define SYMBOL_UNIVERSE_METHODKLASSOBJ _ZN8Universe15_methodKlassObjE
29 +#define SYMBOL_UNIVERSE_COLLECTEDHEAP _ZN8Universe14_collectedHeapE
30 +#define SYMBOL_UNIVERSE_NARROW_OOP _ZN8Universe11_narrow_oopE
31 +#define SYMBOL_NMETHOD_VTBL _ZTV7nmethod
32 +#define SYMBOL_METHOD_VTBL _ZTV6Method
33 +#define SYMBOL_BUFFERBLOB_VTBL _ZTV10BufferBlob
34 +#endif /* ! _GNU_SOURCE */
36 +extern pointer SYMBOL_JCODECACHE_HEAP;
37 +extern pointer SYMBOL_UNIVERSE_METHODKLASSOBJ;
38 +extern pointer SYMBOL_UNIVERSE_COLLECTEDHEAP;
39 +extern pointer SYMBOL_UNIVERSE_NARROW_OOP;
41 +extern pointer SYMBOL_NMETHOD_VTBL;
42 +extern pointer SYMBOL_METHOD_VTBL;
43 +extern pointer SYMBOL_BUFFERBLOB_VTBL;
45 #define copyin_ptr(ADDR) *(pointer*) copyin((pointer) (ADDR), sizeof(pointer))
46 #define copyin_uchar(ADDR) *(uchar_t*) copyin((pointer) (ADDR), sizeof(uchar_t))
47 @@ -152,7 +173,7 @@ dtrace:helper:ustack:
48 #error "Don't know architecture"
51 - this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
52 + this->CodeCache_heap_address = copyin_ptr(&``SYMBOL_JCODECACHE_HEAP);
54 this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address +
55 OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
56 @@ -169,12 +190,12 @@ dtrace:helper:ustack:
57 this->CodeHeap_log2_segment_size = copyin_uint32(
58 this->CodeCache_heap_address + OFFSET_CodeHeap_log2_segment_size);
60 - this->Method_vtbl = (pointer) &``__1cGMethodG__vtbl_;
61 + this->Method_vtbl = (pointer) &``SYMBOL_METHOD_VTBL;
64 * Get Java heap bounds
66 - this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
67 + this->Universe_collectedHeap = copyin_ptr(&``SYMBOL_UNIVERSE_COLLECTEDHEAP);
68 this->heap_start = copyin_ptr(this->Universe_collectedHeap +
69 OFFSET_CollectedHeap_reserved +
70 OFFSET_MemRegion_start);
71 @@ -275,8 +296,8 @@ dtrace:helper:ustack:
72 this->start = this->block + SIZE_HeapBlockHeader;
73 this->vtbl = copyin_ptr(this->start);
75 - this->nmethod_vtbl = (pointer) &``__1cHnmethodG__vtbl_;
76 - this->BufferBlob_vtbl = (pointer) &``__1cKBufferBlobG__vtbl_;
77 + this->nmethod_vtbl = (pointer) &``SYMBOL_NMETHOD_VTBL;
78 + this->BufferBlob_vtbl = (pointer) &``SYMBOL_BUFFERBLOB_VTBL;