author | jprovino |
Tue, 02 Aug 2016 16:39:33 -0400 | |
changeset 40328 | a2851f5f1cf6 |
parent 38177 | b0c9cb06506b |
permissions | -rw-r--r-- |
37414
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
1 |
/* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
4 |
* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
8 |
* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
13 |
* accompanied this code). |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
14 |
* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
18 |
* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
21 |
* questions. |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
22 |
* |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
23 |
*/ |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
24 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
25 |
#ifndef SHARE_VM_GC_G1_G1CARDLIVEDATA_INLINE_HPP |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
26 |
#define SHARE_VM_GC_G1_G1CARDLIVEDATA_INLINE_HPP |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
27 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
28 |
#include "gc/g1/g1CardLiveData.hpp" |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
29 |
#include "utilities/bitMap.inline.hpp" |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
30 |
#include "utilities/globalDefinitions.hpp" |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
31 |
|
38177 | 32 |
inline BitMapView G1CardLiveData::live_card_bitmap(uint region) { |
33 |
return BitMapView(_live_cards + ((size_t)region * _cards_per_region >> LogBitsPerWord), _cards_per_region); |
|
37414
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
34 |
} |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
35 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
36 |
inline bool G1CardLiveData::is_card_live_at(BitMap::idx_t idx) const { |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
37 |
return live_cards_bm().at(idx); |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
38 |
} |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
39 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
40 |
inline bool G1CardLiveData::is_region_live(uint region) const { |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
41 |
return live_regions_bm().at(region); |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
42 |
} |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
43 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
44 |
inline void G1CardLiveData::remove_nonlive_cards(uint region, BitMap* bm) { |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
45 |
bm->set_intersection(live_card_bitmap(region)); |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
46 |
} |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
47 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
48 |
inline void G1CardLiveData::remove_nonlive_regions(BitMap* bm) { |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
49 |
bm->set_intersection(live_regions_bm()); |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
50 |
} |
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
51 |
|
2672ba9af0dc
8151386: Extract card live data out of G1ConcurrentMark
tschatzl
parents:
diff
changeset
|
52 |
#endif /* SHARE_VM_GC_G1_G1CARDLIVEDATA_INLINE_HPP */ |