23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_VM_OPERATIONS_G1_HPP |
27 |
27 |
|
28 #include "gc_implementation/g1/g1AllocationContext.hpp" |
28 #include "gc_implementation/shared/vmGCOperations.hpp" |
29 #include "gc_implementation/shared/vmGCOperations.hpp" |
29 |
30 |
30 // VM_operations for the G1 collector. |
31 // VM_operations for the G1 collector. |
31 // VM_GC_Operation: |
32 // VM_GC_Operation: |
32 // - VM_CGC_Operation |
33 // - VM_CGC_Operation |
38 class VM_G1OperationWithAllocRequest: public VM_GC_Operation { |
39 class VM_G1OperationWithAllocRequest: public VM_GC_Operation { |
39 protected: |
40 protected: |
40 size_t _word_size; |
41 size_t _word_size; |
41 HeapWord* _result; |
42 HeapWord* _result; |
42 bool _pause_succeeded; |
43 bool _pause_succeeded; |
|
44 AllocationContext_t _allocation_context; |
43 |
45 |
44 public: |
46 public: |
45 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, |
47 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, |
46 size_t word_size, |
48 size_t word_size, |
47 GCCause::Cause gc_cause) |
49 GCCause::Cause gc_cause) |
48 : VM_GC_Operation(gc_count_before, gc_cause), |
50 : VM_GC_Operation(gc_count_before, gc_cause), |
49 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } |
51 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } |
50 HeapWord* result() { return _result; } |
52 HeapWord* result() { return _result; } |
51 bool pause_succeeded() { return _pause_succeeded; } |
53 bool pause_succeeded() { return _pause_succeeded; } |
|
54 void set_allocation_context(AllocationContext_t context) { _allocation_context = context; } |
|
55 AllocationContext_t allocation_context() { return _allocation_context; } |
52 }; |
56 }; |
53 |
57 |
54 class VM_G1CollectFull: public VM_GC_Operation { |
58 class VM_G1CollectFull: public VM_GC_Operation { |
55 public: |
59 public: |
56 VM_G1CollectFull(unsigned int gc_count_before, |
60 VM_G1CollectFull(unsigned int gc_count_before, |