src/hotspot/share/gc/g1/g1SharedClosures.hpp
author coleenp
Wed, 14 Mar 2018 07:27:19 -0400
changeset 49392 2956d0ece7a9
parent 49337 e4fdca451542
child 49911 358be4680d12
permissions -rw-r--r--
8199282: Remove ValueObj class for allocation subclassing for gc code Reviewed-by: stefank, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     1
/*
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 49337
diff changeset
     2
 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     4
 *
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     7
 * published by the Free Software Foundation.
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     8
 *
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    13
 * accompanied this code).
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    14
 *
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    18
 *
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    21
 * questions.
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    22
 *
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    23
 */
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    24
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    25
#include "gc/g1/bufferingOopClosure.hpp"
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    26
#include "gc/g1/g1CodeBlobClosure.hpp"
34639
cb73d3c05599 8144712: Remove g1RootClosures.inline.hpp
ehelin
parents: 34308
diff changeset
    27
#include "gc/g1/g1OopClosures.hpp"
cb73d3c05599 8144712: Remove g1RootClosures.inline.hpp
ehelin
parents: 34308
diff changeset
    28
#include "memory/iterator.hpp"
cb73d3c05599 8144712: Remove g1RootClosures.inline.hpp
ehelin
parents: 34308
diff changeset
    29
cb73d3c05599 8144712: Remove g1RootClosures.inline.hpp
ehelin
parents: 34308
diff changeset
    30
class G1CollectedHeap;
cb73d3c05599 8144712: Remove g1RootClosures.inline.hpp
ehelin
parents: 34308
diff changeset
    31
class G1ParScanThreadState;
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    32
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    33
// Simple holder object for a complete set of closures used by the G1 evacuation code.
49337
e4fdca451542 8197847: Remove unused file g1ParScanThreadState_ext.cpp
ehelin
parents: 47580
diff changeset
    34
template <G1Mark Mark>
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 49337
diff changeset
    35
class G1SharedClosures {
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    36
public:
49337
e4fdca451542 8197847: Remove unused file g1ParScanThreadState_ext.cpp
ehelin
parents: 47580
diff changeset
    37
  G1ParCopyClosure<G1BarrierNone, Mark> _oops;
e4fdca451542 8197847: Remove unused file g1ParScanThreadState_ext.cpp
ehelin
parents: 47580
diff changeset
    38
  G1ParCopyClosure<G1BarrierCLD,  Mark> _oops_in_cld;
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    39
47580
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    40
  G1CLDScanClosure                _clds;
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    41
  G1CodeBlobClosure               _codeblobs;
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    42
  BufferingOopClosure             _buffered_oops;
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    43
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    44
  G1SharedClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss, bool process_only_dirty, bool must_claim_cld) :
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    45
    _oops(g1h, pss),
47580
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    46
    _oops_in_cld(g1h, pss),
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
    47
    _clds(&_oops_in_cld, process_only_dirty, must_claim_cld),
34308
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    48
    _codeblobs(&_oops),
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    49
    _buffered_oops(&_oops) {}
4496e81c890d 8142494: Add extension point to G1EvacuationRootClosures
ehelin
parents:
diff changeset
    50
};