RFR: JDK-8202776: Modularize GC allocations in runtime

Erik Osterlund erik.osterlund at oracle.com
Mon Jun 4 16:06:46 UTC 2018


Hi Aleksey,

Sounds like a good idea.

/Erik

> On 4 Jun 2018, at 17:56, Aleksey Shipilev <shade at redhat.com> wrote:
> 
> On 06/04/2018 05:29 PM, Erik Österlund wrote:
>>>> I agree the GC should be able to perform arbitrary allocations the way
>>>> it wants to.
>>>> However, I would prefer to do it this way:
>>>> http://cr.openjdk.java.net/~eosterlund/8202776/webrev.00/
> 
> This looks good. I think we better hide mem_allocate under "protected" now, so we would have:
> 
> protected:
>   // TLAB path
>   inline static HeapWord* allocate_from_tlab(Klass* klass, size_t size, TRAPS);
>   static HeapWord* allocate_from_tlab_slow(Klass* klass, size_t size, TRAPS);
> 
>   // Out-of-TLAB path
>   virtual HeapWord* mem_allocate(size_t size,
>                                  bool* gc_overhead_limit_was_exceeded) = 0;
> 
> public:
>   // Entry point
>   virtual HeapWord* obj_allocate_raw(Klass* klass, size_t size,
>                                      bool* gc_overhead_limit_was_exceeded, TRAPS);
> 
> -Aleksey
> 



More information about the hotspot-dev mailing list