Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @ 20404:227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
Summary: Splitting out a g1 allocator class to simply specialized allocators which can associate each allocation with a given context.
Reviewed-by: mgerdin, brutisso
author | sjohanss |
---|---|
date | Fri, 05 Sep 2014 09:49:19 +0200 |
parents | 37552638d24a |
children | 1d6eb209432a |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Thu Sep 04 16:53:27 2014 -0700 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Fri Sep 05 09:49:19 2014 +0200 @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP #define SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP +#include "gc_implementation/g1/g1AllocationContext.hpp" #include "gc_implementation/shared/vmGCOperations.hpp" // VM_operations for the G1 collector. @@ -40,6 +41,7 @@ size_t _word_size; HeapWord* _result; bool _pause_succeeded; + AllocationContext_t _allocation_context; public: VM_G1OperationWithAllocRequest(unsigned int gc_count_before, @@ -49,6 +51,8 @@ _word_size(word_size), _result(NULL), _pause_succeeded(false) { } HeapWord* result() { return _result; } bool pause_succeeded() { return _pause_succeeded; } + void set_allocation_context(AllocationContext_t context) { _allocation_context = context; } + AllocationContext_t allocation_context() { return _allocation_context; } }; class VM_G1CollectFull: public VM_GC_Operation {