src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp
author zgu
Fri, 03 Aug 2018 11:06:10 +0200
changeset 51292 0538a5cdb474
parent 50752 9d62da00bf15
child 52118 49f627781c2a
permissions -rw-r--r--
8205921: Optimizing best-of-2 work stealing queue selection Summary: Bias towards stealing from queues that we recently successfully stole from to decrease the number of unsuccessful steal attempts. Reviewed-by: eosterlund, kbarrett Contributed-by: Zhengyu Gu <zgu@redhat.com>, Thomas Schatzl <thomas.schatzl@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     1
/*
50676
8c0a5b51559b 8203030: Zero s390 31 bit size_t type conflicts in shared code
chrisphi
parents: 49592
diff changeset
     2
 * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     4
 *
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     7
 * published by the Free Software Foundation.
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     8
 *
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    13
 * accompanied this code).
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    14
 *
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5076
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5076
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5076
diff changeset
    21
 * questions.
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    22
 *
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    23
 */
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
    25
#ifndef SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
    26
#define SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    27
46502
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 36580
diff changeset
    28
#include "gc/parallel/parMarkBitMap.hpp"
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
    29
#include "gc/parallel/psCompactionManager.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
    30
#include "gc/parallel/psParallelCompact.inline.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
    31
#include "gc/shared/taskqueue.inline.hpp"
49592
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 49041
diff changeset
    32
#include "oops/access.inline.hpp"
49041
44122f767467 8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents: 47580
diff changeset
    33
#include "oops/arrayOop.inline.hpp"
49592
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 49041
diff changeset
    34
#include "oops/compressedOops.inline.hpp"
49041
44122f767467 8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents: 47580
diff changeset
    35
#include "oops/objArrayOop.inline.hpp"
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
    36
#include "oops/oop.inline.hpp"
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
    37
#include "utilities/debug.hpp"
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
    38
#include "utilities/globalDefinitions.hpp"
30566
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    39
51292
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    40
inline bool ParCompactionManager::steal(int queue_num, oop& t) {
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    41
  return stack_array()->steal(queue_num, t);
30566
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    42
}
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    43
51292
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    44
inline bool ParCompactionManager::steal_objarray(int queue_num, ObjArrayTask& t) {
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    45
  return _objarray_queues->steal(queue_num, t);
30566
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    46
}
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    47
51292
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    48
inline bool ParCompactionManager::steal(int queue_num, size_t& region) {
0538a5cdb474 8205921: Optimizing best-of-2 work stealing queue selection
zgu
parents: 50752
diff changeset
    49
  return region_array()->steal(queue_num, region);
30566
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    50
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    51
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    52
inline void ParCompactionManager::push(oop obj) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    53
  _marking_stack.push(obj);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    54
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    55
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    56
void ParCompactionManager::push_objarray(oop obj, size_t index)
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    57
{
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    58
  ObjArrayTask task(obj, index);
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    59
  assert(task.is_valid(), "bad ObjArrayTask");
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    60
  _objarray_stack.push(task);
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    61
}
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    62
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    63
void ParCompactionManager::push_region(size_t index)
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    64
{
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    65
#ifdef ASSERT
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    66
  const ParallelCompactData& sd = PSParallelCompact::summary_data();
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    67
  ParallelCompactData::RegionData* const region_ptr = sd.region(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    68
  assert(region_ptr->claimed(), "must be claimed");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    69
  assert(region_ptr->_pushed++ == 0, "should only be pushed once");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    70
#endif
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    71
  region_stack()->push(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    72
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    73
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    74
template <typename T>
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    75
inline void ParCompactionManager::mark_and_push(T* p) {
49592
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 49041
diff changeset
    76
  T heap_oop = RawAccess<>::oop_load(p);
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 49041
diff changeset
    77
  if (!CompressedOops::is_null(heap_oop)) {
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 49041
diff changeset
    78
    oop obj = CompressedOops::decode_not_null(heap_oop);
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    79
    assert(ParallelScavengeHeap::heap()->is_in(obj), "should be in heap");
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    80
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    81
    if (mark_bitmap()->is_unmarked(obj) && PSParallelCompact::mark_obj(obj)) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    82
      push(obj);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    83
    }
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    84
  }
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    85
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    86
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    87
template <typename T>
50752
9d62da00bf15 8204540: Automatic oop closure devirtualization
stefank
parents: 50676
diff changeset
    88
inline void ParCompactionManager::MarkAndPushClosure::do_oop_work(T* p) {
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    89
  _compaction_manager->mark_and_push(p);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    90
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    91
50752
9d62da00bf15 8204540: Automatic oop closure devirtualization
stefank
parents: 50676
diff changeset
    92
inline void ParCompactionManager::MarkAndPushClosure::do_oop(oop* p)       { do_oop_work(p); }
9d62da00bf15 8204540: Automatic oop closure devirtualization
stefank
parents: 50676
diff changeset
    93
inline void ParCompactionManager::MarkAndPushClosure::do_oop(narrowOop* p) { do_oop_work(p); }
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    94
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    95
inline void ParCompactionManager::follow_klass(Klass* klass) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    96
  oop holder = klass->klass_holder();
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    97
  mark_and_push(&holder);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    98
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    99
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   100
inline void ParCompactionManager::FollowStackClosure::do_void() {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   101
  _compaction_manager->follow_marking_stacks();
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   102
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   103
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   104
inline void ParCompactionManager::follow_class_loader(ClassLoaderData* cld) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   105
  MarkAndPushClosure mark_and_push_closure(this);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   106
47580
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
   107
  cld->oops_do(&mark_and_push_closure, true);
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   108
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   109
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   110
inline void ParCompactionManager::follow_contents(oop obj) {
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   111
  assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked");
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   112
  obj->pc_follow_contents(this);
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   113
}
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   114
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   115
template <class T>
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   116
inline void oop_pc_follow_contents_specialized(objArrayOop obj, int index, ParCompactionManager* cm) {
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   117
  const size_t len = size_t(obj->length());
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   118
  const size_t beg_index = size_t(index);
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   119
  assert(beg_index < len || len == 0, "index too large");
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   120
50676
8c0a5b51559b 8203030: Zero s390 31 bit size_t type conflicts in shared code
chrisphi
parents: 49592
diff changeset
   121
  const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   122
  const size_t end_index = beg_index + stride;
49041
44122f767467 8198286: Direct memory accessors in typeArrayOop.hpp should use Access API
eosterlund
parents: 47580
diff changeset
   123
  T* const base = (T*)obj->base_raw();
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   124
  T* const beg = base + beg_index;
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   125
  T* const end = base + end_index;
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   126
36580
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   127
  if (end_index < len) {
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   128
    cm->push_objarray(obj, end_index); // Push the continuation.
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   129
  }
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   130
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   131
  // Push the non-NULL elements of the next stride on the marking stack.
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   132
  for (T* e = beg; e < end; e++) {
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   133
    cm->mark_and_push<T>(e);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   134
  }
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   135
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   136
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   137
inline void ParCompactionManager::follow_contents(objArrayOop obj, int index) {
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   138
  if (UseCompressedOops) {
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   139
    oop_pc_follow_contents_specialized<narrowOop>(obj, index, this);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   140
  } else {
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   141
    oop_pc_follow_contents_specialized<oop>(obj, index, this);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   142
  }
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   143
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   144
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   145
inline void ParCompactionManager::update_contents(oop obj) {
35877
a2a62511d0f8 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents: 30764
diff changeset
   146
  obj->pc_update_contents(this);
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   147
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   148
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
   149
#endif // SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP