src/share/vm/gc/g1/heapRegionManager.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2016, 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) 2001, 2017, 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.
*** 26,35 **** --- 26,36 ---- #define SHARE_VM_GC_G1_HEAPREGIONMANAGER_HPP #include "gc/g1/g1BiasedArray.hpp" #include "gc/g1/g1RegionToSpaceMapper.hpp" #include "gc/g1/heapRegionSet.hpp" + #include "gc/shared/workgroup.hpp" #include "services/memoryUsage.hpp" class HeapRegion; class HeapRegionClosure; class HeapRegionClaimer;
*** 282,287 **** --- 283,303 ---- bool is_region_claimed(uint region_index) const; // Claim the given region, returns true if successfully claimed. bool claim_region(uint region_index); }; + + // Subclass of AbstractGangTask that uses a HeapRegionClaimer to parallelize work on a region basis + class G1ParallelizeByRegionsTask: public AbstractGangTask { + HeapRegionClaimer _hrclaimer; + + public: + G1ParallelizeByRegionsTask(const char* name, uint num_workers) : + AbstractGangTask(name), + _hrclaimer(num_workers) {} + + protected: + void all_heap_regions_work(HeapRegionClosure* cl, + uint worker_id, + bool concurrent = false); + }; #endif // SHARE_VM_GC_G1_HEAPREGIONMANAGER_HPP