comparison src/share/vm/gc_implementation/g1/g1RemSet.hpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 52b4284cb496 6948da6d7c13
children dd9cc155639c
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
1 /* 1 /*
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
94 // of the worker thread calling this function can be helpful in 94 // of the worker thread calling this function can be helpful in
95 // partitioning the work to be done. It should be the same as 95 // partitioning the work to be done. It should be the same as
96 // the "i" passed to the calling thread's work(i) function. 96 // the "i" passed to the calling thread's work(i) function.
97 // In the sequential case this param will be ignored. 97 // In the sequential case this param will be ignored.
98 void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, 98 void oops_into_collection_set_do(OopsInHeapRegionClosure* blk,
99 CodeBlobToOopClosure* code_root_cl, 99 CodeBlobClosure* code_root_cl,
100 uint worker_i); 100 uint worker_i);
101 101
102 // Prepare for and cleanup after an oops_into_collection_set_do 102 // Prepare for and cleanup after an oops_into_collection_set_do
103 // call. Must call each of these once before and after (in sequential 103 // call. Must call each of these once before and after (in sequential
104 // code) any threads call oops_into_collection_set_do. (This offers an 104 // code) any threads call oops_into_collection_set_do. (This offers an
106 // parallel iteration over the CS's RS.) 106 // parallel iteration over the CS's RS.)
107 void prepare_for_oops_into_collection_set_do(); 107 void prepare_for_oops_into_collection_set_do();
108 void cleanup_after_oops_into_collection_set_do(); 108 void cleanup_after_oops_into_collection_set_do();
109 109
110 void scanRS(OopsInHeapRegionClosure* oc, 110 void scanRS(OopsInHeapRegionClosure* oc,
111 CodeBlobToOopClosure* code_root_cl, 111 CodeBlobClosure* code_root_cl,
112 uint worker_i); 112 uint worker_i);
113 113
114 void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i); 114 void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i);
115 115
116 CardTableModRefBS* ct_bs() { return _ct_bs; } 116 CardTableModRefBS* ct_bs() { return _ct_bs; }
191 // Override: this closure is idempotent. 191 // Override: this closure is idempotent.
192 // bool idempotent() { return true; } 192 // bool idempotent() { return true; }
193 bool apply_to_weak_ref_discovered_field() { return true; } 193 bool apply_to_weak_ref_discovered_field() { return true; }
194 }; 194 };
195 195
196 class UpdateRSetImmediate: public OopsInHeapRegionClosure {
197 private:
198 G1RemSet* _g1_rem_set;
199
200 template <class T> void do_oop_work(T* p);
201 public:
202 UpdateRSetImmediate(G1RemSet* rs) :
203 _g1_rem_set(rs) {}
204
205 virtual void do_oop(narrowOop* p) { do_oop_work(p); }
206 virtual void do_oop( oop* p) { do_oop_work(p); }
207 };
208
209
210 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP 196 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP