RFR (M): JDK-8035401: Fix visibility of G1ParScanThreadState members
bengt.rutisson at oracle.com
Thu Jun 26 12:34:24 UTC 2014
On 2014-06-26 14:19, Thomas Schatzl wrote:
> Hi Bengt,
> thanks for looking at this...
> On Thu, 2014-06-26 at 13:43 +0200, Bengt Rutisson wrote:
>> Hi Thomas,
>> Looks good. One question though. In g1ParScanThreadState.hpp you have:
>> 131 inline HeapWord* allocate(GCAllocPurpose purpose, size_t word_sz);
>> 132 inline HeapWord* allocate_slow(GCAllocPurpose purpose, size_t
>> 133 inline void undo_allocation(GCAllocPurpose purpose, HeapWord*
>> obj, size_t word_sz);
>> But the methods are implemented in g1ParScanThreadState.cpp. Shouldn't
>> the implementation be placed in g1ParScanThreadState.inline.hpp?
> if an inlined method is only used in one place, at least G1 code often
> places that method into the cpp file directly. It is not required to
> make them publicly visible.
> I do not have a preference either. What do you think?
I think I would prefer to remove the inline keyword in that case. The
compiler probably does a better job deciding whether or not it is a good
idea to inline these methods.
Either way is fine with me.
More information about the hotspot-gc-dev