diff -r 8ec8971f511a -r 227a9e5e4b4a src/share/vm/gc_implementation/g1/heapRegion.hpp --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Thu Sep 04 16:53:27 2014 -0700 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Sep 05 09:49:19 2014 +0200 @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP +#include "gc_implementation/g1/g1AllocationContext.hpp" #include "gc_implementation/g1/g1BlockOffsetTable.hpp" #include "gc_implementation/g1/g1_specialized_oop_closures.hpp" #include "gc_implementation/g1/survRateGroup.hpp" @@ -236,6 +237,8 @@ // The index of this region in the heap region sequence. uint _hrm_index; + AllocationContext_t _allocation_context; + HumongousType _humongous_type; // For a humongous region, region in which it starts. HeapRegion* _humongous_start_region; @@ -332,7 +335,8 @@ public: HeapRegion(uint hrm_index, G1BlockOffsetSharedArray* sharedOffsetArray, - MemRegion mr); + MemRegion mr, + AllocationContext_t context = AllocationContext::system()); // Initializing the HeapRegion not only resets the data structure, but also // resets the BOT for that heap region. @@ -527,6 +531,14 @@ _next_in_special_set = r; } + void set_allocation_context(AllocationContext_t context) { + _allocation_context = context; + } + + AllocationContext_t allocation_context() const { + return _allocation_context; + } + // Methods used by the HeapRegionSetBase class and subclasses. // Getter and setter for the next and prev fields used to link regions into