< prev index next >

src/hotspot/share/gc/z/zHeap.cpp

Print this page

        

*** 32,54 **** #include "gc/z/zPageTable.inline.hpp" #include "gc/z/zRelocationSet.inline.hpp" #include "gc/z/zRelocationSetSelector.inline.hpp" #include "gc/z/zResurrection.hpp" #include "gc/z/zStat.hpp" - #include "gc/z/zThread.inline.hpp" #include "gc/z/zTask.hpp" #include "gc/z/zVerify.hpp" #include "gc/z/zWorkers.inline.hpp" #include "logging/log.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" #include "runtime/handshake.hpp" #include "runtime/safepoint.hpp" #include "runtime/thread.hpp" #include "utilities/debug.hpp" - class ZTask; static const ZStatSampler ZSamplerHeapUsedBeforeMark("Memory", "Heap Used Before Mark", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedAfterMark("Memory", "Heap Used After Mark", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedBeforeRelocation("Memory", "Heap Used Before Relocation", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedAfterRelocation("Memory", "Heap Used After Relocation", ZStatUnitBytes); static const ZStatCounter ZCounterUndoPageAllocation("Memory", "Undo Page Allocation", ZStatUnitOpsPerSecond); --- 32,53 ---- #include "gc/z/zPageTable.inline.hpp" #include "gc/z/zRelocationSet.inline.hpp" #include "gc/z/zRelocationSetSelector.inline.hpp" #include "gc/z/zResurrection.hpp" #include "gc/z/zStat.hpp" #include "gc/z/zTask.hpp" + #include "gc/z/zThread.inline.hpp" #include "gc/z/zVerify.hpp" #include "gc/z/zWorkers.inline.hpp" #include "logging/log.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" #include "runtime/handshake.hpp" #include "runtime/safepoint.hpp" #include "runtime/thread.hpp" #include "utilities/debug.hpp" static const ZStatSampler ZSamplerHeapUsedBeforeMark("Memory", "Heap Used Before Mark", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedAfterMark("Memory", "Heap Used After Mark", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedBeforeRelocation("Memory", "Heap Used Before Relocation", ZStatUnitBytes); static const ZStatSampler ZSamplerHeapUsedAfterRelocation("Memory", "Heap Used After Relocation", ZStatUnitBytes); static const ZStatCounter ZCounterUndoPageAllocation("Memory", "Undo Page Allocation", ZStatUnitOpsPerSecond);
*** 206,235 **** void ZHeap::print_worker_threads_on(outputStream* st) const { _workers.print_threads_on(st); } ! // A delegate class for AbstractGangTask to Ztask. ! class DelegatedZAbstractGangTask : public ZTask { ! private: AbstractGangTask* _task; ! public: ! DelegatedZAbstractGangTask(AbstractGangTask* task) : ZTask(task->name()), _task(task) { } virtual void work() { _task->work(ZThread::worker_id()); } }; ! Tickspan ZHeap::run_task(AbstractGangTask* task) { ! Ticks start = Ticks::now(); ! DelegatedZAbstractGangTask dtask(task); ! _workers.run_parallel(&dtask); ! return Ticks::now() - start; } void ZHeap::out_of_memory() { ResourceMark rm; --- 205,232 ---- void ZHeap::print_worker_threads_on(outputStream* st) const { _workers.print_threads_on(st); } ! // Adapter class from AbstractGangTask to Ztask ! class ZAbstractGangTaskAdapter : public ZTask { ! private: AbstractGangTask* _task; ! public: ! ZAbstractGangTaskAdapter(AbstractGangTask* task) : ZTask(task->name()), _task(task) { } virtual void work() { _task->work(ZThread::worker_id()); } }; ! void ZHeap::run_task(AbstractGangTask* task) { ! ZAbstractGangTaskAdapter ztask(task); ! _workers.run_parallel(&ztask); } void ZHeap::out_of_memory() { ResourceMark rm;
< prev index next >