index

src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp

Print this page
rev 7474 : imported patch cleanup

*** 1,7 **** /* ! * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 30,64 **** #include "gc_implementation/parallelScavenge/vmPSOperations.hpp" #include "memory/gcLocker.inline.hpp" #include "utilities/dtrace.hpp" // The following methods are used by the parallel scavenge collector ! VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size, ! unsigned int gc_count) : ! VM_GC_Operation(gc_count, GCCause::_allocation_failure), ! _size(size), ! _result(NULL) ! { ! } void VM_ParallelGCFailedAllocation::doit() { SvcGCMarker sgcm(SvcGCMarker::MINOR); ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "must be a ParallelScavengeHeap"); GCCauseSetter gccs(heap, _gc_cause); ! _result = heap->failed_mem_allocate(_size); if (_result == NULL && GC_locker::is_active_and_needs_gc()) { set_gc_locked(); } } // Only used for System.gc() calls ! VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count, ! unsigned int full_gc_count, GCCause::Cause gc_cause) : VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */) { } --- 30,60 ---- #include "gc_implementation/parallelScavenge/vmPSOperations.hpp" #include "memory/gcLocker.inline.hpp" #include "utilities/dtrace.hpp" // The following methods are used by the parallel scavenge collector ! VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t word_size, ! uint gc_count) : ! VM_CollectForAllocation(word_size, gc_count, GCCause::_allocation_failure) {} void VM_ParallelGCFailedAllocation::doit() { SvcGCMarker sgcm(SvcGCMarker::MINOR); ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "must be a ParallelScavengeHeap"); GCCauseSetter gccs(heap, _gc_cause); ! _result = heap->failed_mem_allocate(_word_size); if (_result == NULL && GC_locker::is_active_and_needs_gc()) { set_gc_locked(); } } // Only used for System.gc() calls ! VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(uint gc_count, ! uint full_gc_count, GCCause::Cause gc_cause) : VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */) { }
index