hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
author stefank
Tue, 11 Apr 2017 23:45:37 +0200
changeset 46565 8dcbf532ea00
parent 46502 116a09d8f142
permissions -rw-r--r--
8178490: Usages of is_object_aligned with pointers are broken Reviewed-by: tschatzl, kbarrett
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
/*
35877
a2a62511d0f8 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents: 30764
diff changeset
     2
 * Copyright (c) 2010, 2016, 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"
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
    32
#include "oops/objArrayOop.hpp"
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
    33
#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
    34
#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
    35
#include "utilities/globalDefinitions.hpp"
30566
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    36
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    37
inline bool ParCompactionManager::steal(int queue_num, int* seed, oop& t) {
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    38
  return stack_array()->steal(queue_num, seed, t);
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    39
}
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    40
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    41
inline bool ParCompactionManager::steal_objarray(int queue_num, int* seed, ObjArrayTask& t) {
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    42
  return _objarray_queues->steal(queue_num, seed, t);
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    43
}
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    44
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    45
inline bool ParCompactionManager::steal(int queue_num, int* seed, size_t& region) {
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    46
  return region_array()->steal(queue_num, seed, region);
18eb9aa972d0 8076177: Remove usage of stack.inline.hpp functions from taskqueue.hpp
stefank
parents: 30556
diff changeset
    47
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    48
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    49
inline void ParCompactionManager::push(oop obj) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    50
  _marking_stack.push(obj);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    51
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    52
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    53
void ParCompactionManager::push_objarray(oop obj, size_t index)
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    54
{
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    55
  ObjArrayTask task(obj, index);
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    56
  assert(task.is_valid(), "bad ObjArrayTask");
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    57
  _objarray_stack.push(task);
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    58
}
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    59
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    60
void ParCompactionManager::push_region(size_t index)
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    61
{
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    62
#ifdef ASSERT
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    63
  const ParallelCompactData& sd = PSParallelCompact::summary_data();
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    64
  ParallelCompactData::RegionData* const region_ptr = sd.region(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    65
  assert(region_ptr->claimed(), "must be claimed");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    66
  assert(region_ptr->_pushed++ == 0, "should only be pushed once");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    67
#endif
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    68
  region_stack()->push(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    69
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    70
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    71
template <typename T>
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    72
inline void ParCompactionManager::mark_and_push(T* p) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    73
  T heap_oop = oopDesc::load_heap_oop(p);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    74
  if (!oopDesc::is_null(heap_oop)) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    75
    oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    76
    assert(ParallelScavengeHeap::heap()->is_in(obj), "should be in heap");
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    77
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    78
    if (mark_bitmap()->is_unmarked(obj) && PSParallelCompact::mark_obj(obj)) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    79
      push(obj);
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
  }
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    82
}
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
template <typename T>
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    85
inline void ParCompactionManager::MarkAndPushClosure::do_oop_nv(T* p) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    86
  _compaction_manager->mark_and_push(p);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    87
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    88
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    89
inline void ParCompactionManager::MarkAndPushClosure::do_oop(oop* p)       { do_oop_nv(p); }
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    90
inline void ParCompactionManager::MarkAndPushClosure::do_oop(narrowOop* p) { do_oop_nv(p); }
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    91
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    92
inline void ParCompactionManager::follow_klass(Klass* klass) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    93
  oop holder = klass->klass_holder();
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    94
  mark_and_push(&holder);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    95
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    96
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    97
inline void ParCompactionManager::FollowStackClosure::do_void() {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
    98
  _compaction_manager->follow_marking_stacks();
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
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   101
inline void ParCompactionManager::FollowKlassClosure::do_klass(Klass* klass) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   102
  klass->oops_do(_mark_and_push_closure);
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
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   105
inline void ParCompactionManager::follow_class_loader(ClassLoaderData* cld) {
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   106
  MarkAndPushClosure mark_and_push_closure(this);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   107
  FollowKlassClosure follow_klass_closure(&mark_and_push_closure);
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
  cld->oops_do(&mark_and_push_closure, &follow_klass_closure, true);
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   110
}
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   111
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   112
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
   113
  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
   114
  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
   115
}
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   116
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   117
template <class T>
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   118
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
   119
  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
   120
  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
   121
  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
   122
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   123
  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   124
  const size_t end_index = beg_index + stride;
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   125
  T* const base = (T*)obj->base();
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   126
  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
   127
  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
   128
36580
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   129
  if (end_index < len) {
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   130
    cm->push_objarray(obj, end_index); // Push the continuation.
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   131
  }
79b269100c92 8151101: Improve UseParallelGC parallelization of object array processing
jmasa
parents: 35877
diff changeset
   132
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents: 29792
diff changeset
   133
  // 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
   134
  for (T* e = beg; e < end; e++) {
30556
750fee2bdb45 8078345: Move PSParallelCompact::mark_and_push to ParCompactionManager
stefank
parents: 30151
diff changeset
   135
    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
   136
  }
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   137
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   138
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   139
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
   140
  if (UseCompressedOops) {
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   141
    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
   142
  } else {
30151
c7cdaa576875 8076456: Remove unnecessary oopDesc::klass() calls
stefank
parents: 30150
diff changeset
   143
    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
   144
  }
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   145
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   146
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   147
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
   148
  obj->pc_update_contents(this);
29792
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   149
}
8c6fa07f0869 8075957: Reduce calls to the GC specific object visitors in oopDesc
stefank
parents: 7397
diff changeset
   150
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30566
diff changeset
   151
#endif // SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP