src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp
author kbarrett
Fri, 22 Jun 2018 17:46:58 -0400
changeset 50728 9375184cec98
parent 49592 77fb0be7d19f
child 50752 9d62da00bf15
permissions -rw-r--r--
8205459: Rename Access API flag decorators Summary: Rename OOP_NOT_NULL, IN_HEAP_ARRAY, AS_DEST_NOT_INITIALIZED Reviewed-by: pliden, stefank
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     1
/*
50728
9375184cec98 8205459: Rename Access API flag decorators
kbarrett
parents: 49592
diff changeset
     2
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     4
 *
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     8
 *
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    13
 * accompanied this code).
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    14
 *
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    18
 *
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    21
 * questions.
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    22
 *
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    23
 */
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
    25
#ifndef SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_INLINE_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
    26
#define SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_INLINE_HPP
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    27
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
    28
#include "gc/parallel/parallelScavengeHeap.hpp"
46502
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    29
#include "gc/parallel/parMarkBitMap.inline.hpp"
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
    30
#include "gc/parallel/psParallelCompact.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
    31
#include "gc/shared/collectedHeap.hpp"
49592
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 47216
diff changeset
    32
#include "oops/access.inline.hpp"
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 47216
diff changeset
    33
#include "oops/compressedOops.inline.hpp"
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    34
#include "oops/klass.hpp"
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    35
#include "oops/oop.inline.hpp"
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
    36
46502
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    37
inline bool PSParallelCompact::is_marked(oop obj) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    38
  return mark_bitmap()->is_marked(obj);
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    39
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    40
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    41
inline double PSParallelCompact::normal_distribution(double density) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    42
  assert(_dwl_initialized, "uninitialized");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    43
  const double squared_term = (density - _dwl_mean) / _dwl_std_dev;
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    44
  return _dwl_first_term * exp(-0.5 * squared_term * squared_term);
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    45
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    46
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    47
inline bool PSParallelCompact::dead_space_crosses_boundary(const RegionData* region,
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    48
                                                           idx_t bit) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    49
  assert(bit > 0, "cannot call this for the first bit/region");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    50
  assert(_summary_data.region_to_addr(region) == _mark_bitmap.bit_to_addr(bit),
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    51
         "sanity check");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    52
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    53
  // Dead space crosses the boundary if (1) a partial object does not extend
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    54
  // onto the region, (2) an object does not start at the beginning of the
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    55
  // region, and (3) an object does not end at the end of the prior region.
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    56
  return region->partial_obj_size() == 0 &&
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    57
    !_mark_bitmap.is_obj_beg(bit) &&
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    58
    !_mark_bitmap.is_obj_end(bit - 1);
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    59
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    60
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    61
inline bool PSParallelCompact::is_in(HeapWord* p, HeapWord* beg_addr, HeapWord* end_addr) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    62
  return p >= beg_addr && p < end_addr;
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    63
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    64
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    65
inline bool PSParallelCompact::is_in(oop* p, HeapWord* beg_addr, HeapWord* end_addr) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    66
  return is_in((HeapWord*)p, beg_addr, end_addr);
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    67
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    68
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    69
inline MutableSpace* PSParallelCompact::space(SpaceId id) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    70
  assert(id < last_space_id, "id out of range");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    71
  return _space_info[id].space();
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    72
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    73
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    74
inline HeapWord* PSParallelCompact::new_top(SpaceId id) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    75
  assert(id < last_space_id, "id out of range");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    76
  return _space_info[id].new_top();
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    77
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    78
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    79
inline HeapWord* PSParallelCompact::dense_prefix(SpaceId id) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    80
  assert(id < last_space_id, "id out of range");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    81
  return _space_info[id].dense_prefix();
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    82
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    83
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    84
inline ObjectStartArray* PSParallelCompact::start_array(SpaceId id) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    85
  assert(id < last_space_id, "id out of range");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    86
  return _space_info[id].start_array();
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    87
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    88
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    89
#ifdef ASSERT
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    90
inline void PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr) {
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    91
  assert(old_addr >= new_addr || space_id(old_addr) != space_id(new_addr),
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    92
         "must move left or to a different space");
46619
a3919f5e8d2b 8178499: Remove _ptr_ and _size_ infixes from align functions
stefank
parents: 46565
diff changeset
    93
  assert(is_object_aligned(old_addr) && is_object_aligned(new_addr),
46502
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    94
         "checking alignment");
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    95
}
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    96
#endif // ASSERT
116a09d8f142 8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents: 35877
diff changeset
    97
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
    98
inline bool PSParallelCompact::mark_obj(oop obj) {
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
    99
  const int obj_size = obj->size();
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   100
  if (mark_bitmap()->mark_obj(obj, obj_size)) {
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   101
    _summary_data.add_obj(obj, obj_size);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   102
    return true;
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   103
  } else {
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   104
    return false;
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   105
  }
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   106
}
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 30764
diff changeset
   107
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   108
template <class T>
35877
a2a62511d0f8 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents: 35862
diff changeset
   109
inline void PSParallelCompact::adjust_pointer(T* p, ParCompactionManager* cm) {
49592
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 47216
diff changeset
   110
  T heap_oop = RawAccess<>::oop_load(p);
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 47216
diff changeset
   111
  if (!CompressedOops::is_null(heap_oop)) {
77fb0be7d19f 8199946: Move load/store and encode/decode out of oopDesc
stefank
parents: 47216
diff changeset
   112
    oop obj = CompressedOops::decode_not_null(heap_oop);
30173
13cf7580b000 8077413: Avoid use of Universe::heap() inside collectors
pliden
parents: 30150
diff changeset
   113
    assert(ParallelScavengeHeap::heap()->is_in(obj), "should be in heap");
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   114
35877
a2a62511d0f8 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents: 35862
diff changeset
   115
    oop new_obj = (oop)summary_data().calc_new_pointer(obj, cm);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   116
    assert(new_obj != NULL,                    // is forwarding ptr?
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   117
           "should be forwarded");
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   118
    // Just always do the update unconditionally?
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   119
    if (new_obj != NULL) {
30173
13cf7580b000 8077413: Avoid use of Universe::heap() inside collectors
pliden
parents: 30150
diff changeset
   120
      assert(ParallelScavengeHeap::heap()->is_in_reserved(new_obj),
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   121
             "should be in object space");
50728
9375184cec98 8205459: Rename Access API flag decorators
kbarrett
parents: 49592
diff changeset
   122
      RawAccess<IS_NOT_NULL>::oop_store(p, new_obj);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   123
    }
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   124
  }
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   125
}
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   126
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   127
template <typename T>
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   128
void PSParallelCompact::AdjustPointerClosure::do_oop_nv(T* p) {
35877
a2a62511d0f8 8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents: 35862
diff changeset
   129
  adjust_pointer(p, _cm);
30150
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   130
}
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   131
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   132
inline void PSParallelCompact::AdjustPointerClosure::do_oop(oop* p)       { do_oop_nv(p); }
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   133
inline void PSParallelCompact::AdjustPointerClosure::do_oop(narrowOop* p) { do_oop_nv(p); }
d9c940aa42ef 8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff changeset
   134
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 30556
diff changeset
   135
#endif // SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_INLINE_HPP