RFR: 8073387: Move VerifyOopClosures out from genOopClosures.hpp
Stefan Karlsson
stefan.karlsson at oracle.com
Thu Feb 19 11:59:36 UTC 2015
On 2015-02-19 11:42, David Holmes wrote:
> On 18/02/2015 6:10 PM, Stefan Karlsson wrote:
>> Hi,
>>
>> Please review this patch to move VerifyOopClosures out from
>> genOopClosures.hpp. This way users of VerifyOopClosures don't have to
>> include genOopClosures.hpp anymore. The implementation of
>> VerifyOopClosures::do_oop_work is placed in oop.cpp, where the other
>> VerifyOopClosure functions are located.
>>
>> http://cr.openjdk.java.net/~stefank/8073387/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8073387
>
> This is the thread in which I intended to say:
>
> >> Has the change from an inline definition to a non-inline definition
> >> been cleared from a performance perspective?
The code is setup so that the compiler would be able to inline the function:
template <class T> void VerifyOopClosure::do_oop_work(T* p) {
oop obj = oopDesc::load_decode_heap_oop(p);
guarantee(obj->is_oop_or_null(), err_msg("invalid oop: "
INTPTR_FORMAT, p2i((oopDesc*) obj)));
}
void VerifyOopClosure::do_oop(oop* p) {
VerifyOopClosure::do_oop_work(p); }
void VerifyOopClosure::do_oop(narrowOop* p) {
VerifyOopClosure::do_oop_work(p); }
and since this is verification code I don't think we need to worry too
much about a potential extra call.
StefanK
>
> Thanks,
> David
>
>> Thanks,
>> StefanK
More information about the hotspot-dev
mailing list