author | tonyp |
Thu, 22 Jul 2010 10:27:41 -0400 | |
changeset 6248 | 2e661807cef0 |
parent 6067 | 8bfddf73fc04 |
child 7397 | 5b173b4ca846 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
6067 | 2 |
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3262
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3262
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:
3262
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
25 |
inline PSPromotionManager* PSPromotionManager::manager_array(int index) { |
|
26 |
assert(_manager_array != NULL, "access of NULL manager_array"); |
|
27 |
assert(index >= 0 && index <= (int)ParallelGCThreads, "out of range manager_array access"); |
|
28 |
return _manager_array[index]; |
|
29 |
} |
|
30 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
31 |
template <class T> |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
32 |
inline void PSPromotionManager::claim_or_forward_internal_depth(T* p) { |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
33 |
if (p != NULL) { // XXX: error if p != NULL here |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
34 |
oop o = oopDesc::load_decode_heap_oop_not_null(p); |
1 | 35 |
if (o->is_forwarded()) { |
36 |
o = o->forwardee(); |
|
37 |
// Card mark |
|
38 |
if (PSScavenge::is_obj_in_young((HeapWord*) o)) { |
|
39 |
PSScavenge::card_table()->inline_write_ref_field_gc(p, o); |
|
40 |
} |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
41 |
oopDesc::encode_store_heap_oop_not_null(p, o); |
1 | 42 |
} else { |
43 |
push_depth(p); |
|
44 |
} |
|
45 |
} |
|
46 |
} |
|
47 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
48 |
template <class T> |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
49 |
inline void PSPromotionManager::claim_or_forward_depth(T* p) { |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
50 |
assert(PSScavenge::should_scavenge(p, true), "revisiting object?"); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
51 |
assert(Universe::heap()->kind() == CollectedHeap::ParallelScavengeHeap, |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
52 |
"Sanity"); |
1 | 53 |
assert(Universe::heap()->is_in(p), "pointer outside heap"); |
54 |
||
55 |
claim_or_forward_internal_depth(p); |
|
56 |
} |
|
57 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
58 |
inline void PSPromotionManager::process_popped_location_depth(StarTask p) { |
1 | 59 |
if (is_oop_masked(p)) { |
60 |
assert(PSChunkLargeArrays, "invariant"); |
|
61 |
oop const old = unmask_chunked_array_oop(p); |
|
62 |
process_array_chunk(old); |
|
63 |
} else { |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
64 |
if (p.is_narrow()) { |
3262
30d1c247fc25
6700789: G1: Enable use of compressed oops with G1 heaps
ysr
parents:
670
diff
changeset
|
65 |
assert(UseCompressedOops, "Error"); |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
66 |
PSScavenge::copy_and_push_safe_barrier(this, (narrowOop*)p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
67 |
} else { |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
68 |
PSScavenge::copy_and_push_safe_barrier(this, (oop*)p); |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
69 |
} |
1 | 70 |
} |
71 |
} |
|
6067 | 72 |
|
73 |
#if TASKQUEUE_STATS |
|
74 |
void PSPromotionManager::record_steal(StarTask& p) { |
|
75 |
if (is_oop_masked(p)) { |
|
76 |
++_masked_steals; |
|
77 |
} |
|
78 |
} |
|
79 |
#endif // TASKQUEUE_STATS |