RFR(M) : 8059624 : Test task: WhiteBox API for testing segmented codecache feature
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Nov 5 23:55:19 UTC 2014
Hi Igor,
codeBlob.hpp
Why you need?:
+ // placement
+ inline void* operator new(size_t s, void* p) throw() { return p; }
compileBroker.cpp
I think MonitorLockerEx locker() should be before the loop. Then you may
not need to get lock in WB_UnlockCompilation.
whitebox.cpp
allocateCodeHeap() - what if CodeCache::allocate() failed to allocate?
In WB_GetCodeHeapEntries() checks that blobs array is not empty after
the loop which add entries.
You need to prevent sweeping when you processing codecache blobs
(getCodeHeapEntries). Otherwise pointers from getCodeBlobs() may point
to dead or overwritten space, consider -Xcomp -XX:+DeoptimizeALot
Thanks,
Vladimir
On 11/5/14 8:25 AM, Igor Ignatyev wrote:
> http://cr.openjdk.java.net/~iignatyev/8059624/webrev.00/
> 660 lines changed: 624 ins; 2 del; 34 mod;
>
> Hi all,
>
> please review the patch which adds new WhiteBox methods needed for
> better testing SegmentedCodeCache:
> - perform allocation in code cache
> - force code cache sweep
> - lock/unlock compilation
> - get a segment id for nmethod.
> besides these methods, the patch also adds a method to get all entries
> in code heap.
>
> changes in product code:
> - monitor 'Compilation_lock' was added to implement compilation
> locking/unlocking
> - align_code_offset function was made a static member of CodeBlob
> - WhiteBox was made a friend of several classes
>
> testing: jprt, new added tests
> jbs: https://bugs.openjdk.java.net/browse/JDK-8059624
>
More information about the hotspot-compiler-dev
mailing list