< prev index next >
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
Print this page
rev 8024 : imported patch event1
* * *
imported patch event2
*** 24,33 ****
--- 24,34 ----
#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
#include "gc_interface/collectedHeap.hpp"
+ #include "gc_implementation/shared/gcId.hpp"
#include "memory/heapInspection.hpp"
#include "runtime/handles.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/synchronizer.hpp"
#include "runtime/vm_operations.hpp"
*** 162,175 ****
class VM_CollectForAllocation : public VM_GC_Operation {
protected:
size_t _word_size; // Size of object to be allocated (in number of words)
HeapWord* _result; // Allocation result (NULL if allocation failed)
public:
! VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause)
! : VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {}
HeapWord* result() const {
return _result;
}
};
--- 163,181 ----
class VM_CollectForAllocation : public VM_GC_Operation {
protected:
size_t _word_size; // Size of object to be allocated (in number of words)
HeapWord* _result; // Allocation result (NULL if allocation failed)
+ uint _gc_attempt; // Collection attempt for this allocation.
+ GCId _gcid; // Predicted GCId for this operation.
public:
! VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause, uint gc_attempt);
!
! // The epilogue is run by the requesting thread after and if the collection happened.
! // It is extended here to trace collections performed due to failed allocations.
! void doit_epilogue();
HeapWord* result() const {
return _result;
}
};
*** 178,189 ****
private:
bool _tlab; // alloc is of a tlab.
public:
VM_GenCollectForAllocation(size_t word_size,
bool tlab,
! uint gc_count_before)
! : VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure),
_tlab(tlab) {
assert(word_size != 0, "An allocation should always be requested with this operation.");
}
~VM_GenCollectForAllocation() {}
virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
--- 184,196 ----
private:
bool _tlab; // alloc is of a tlab.
public:
VM_GenCollectForAllocation(size_t word_size,
bool tlab,
! uint gc_count_before,
! uint gc_attempt)
! : VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure, gc_attempt),
_tlab(tlab) {
assert(word_size != 0, "An allocation should always be requested with this operation.");
}
~VM_GenCollectForAllocation() {}
virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; }
*** 211,231 ****
private:
MetaWord* _result;
size_t _size; // size of object to be allocated
Metaspace::MetadataType _mdtype;
ClassLoaderData* _loader_data;
public:
VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
size_t size, Metaspace::MetadataType mdtype,
uint gc_count_before,
uint full_gc_count_before,
! GCCause::Cause gc_cause)
! : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
! _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) {
! }
virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; }
virtual void doit();
MetaWord* result() const { return _result; }
bool initiate_concurrent_GC();
};
--- 218,239 ----
private:
MetaWord* _result;
size_t _size; // size of object to be allocated
Metaspace::MetadataType _mdtype;
ClassLoaderData* _loader_data;
+ uint _gc_attempt; // Collection attempt for this allocation.
+ GCId _gcid; // Predicted GCId for this operation.
public:
VM_CollectForMetadataAllocation(ClassLoaderData* loader_data,
size_t size, Metaspace::MetadataType mdtype,
uint gc_count_before,
uint full_gc_count_before,
! GCCause::Cause gc_cause,
! uint gc_attempt);
virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; }
virtual void doit();
+ void doit_epilogue();
MetaWord* result() const { return _result; }
bool initiate_concurrent_GC();
};
< prev index next >