hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp
author stefank
Thu, 01 Sep 2011 16:18:17 +0200
changeset 10524 6594ca81279a
parent 7397 5b173b4ca846
child 29792 8c6fa07f0869
permissions -rw-r--r--
7085906: Replace the permgen allocated sentinelRef with a self-looped end Summary: Remove the sentinelRef and let the last Reference in a discovered chain point back to itself. Reviewed-by: ysr, jmasa
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
/*
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5076
diff changeset
     2
 * Copyright (c) 2010, 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
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    25
#ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    26
#define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    28
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    29
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    30
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    31
void ParCompactionManager::push_objarray(oop obj, size_t index)
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    32
{
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    33
  ObjArrayTask task(obj, index);
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    34
  assert(task.is_valid(), "bad ObjArrayTask");
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    35
  _objarray_stack.push(task);
5076
8b74a4b60b31 4396719: Mark Sweep stack overflow on deeply nested Object arrays
jcoomes
parents:
diff changeset
    36
}
5918
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    37
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    38
void ParCompactionManager::push_region(size_t index)
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    39
{
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    40
#ifdef ASSERT
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    41
  const ParallelCompactData& sd = PSParallelCompact::summary_data();
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    42
  ParallelCompactData::RegionData* const region_ptr = sd.region(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    43
  assert(region_ptr->claimed(), "must be claimed");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    44
  assert(region_ptr->_pushed++ == 0, "should only be pushed once");
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    45
#endif
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    46
  region_stack()->push(index);
73b96456819a 6957084: simplify TaskQueue overflow handling
jcoomes
parents: 5547
diff changeset
    47
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    48
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5918
diff changeset
    49
#endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP