src/share/vm/memory/referenceProcessor.hpp

Sun, 13 Apr 2008 17:43:42 -0400

author
coleenp
date
Sun, 13 Apr 2008 17:43:42 -0400
changeset 548
ba764ed4b6f2
parent 435
a61af66fc99e
child 631
d1605aabd0a1
child 777
37f87013dfd8
permissions
-rw-r--r--

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold

duke@435 1 /*
duke@435 2 * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
duke@435 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@435 20 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@435 21 * have any questions.
duke@435 22 *
duke@435 23 */
duke@435 24
duke@435 25 // ReferenceProcessor class encapsulates the per-"collector" processing
duke@435 26 // of "weak" references for GC. The interface is useful for supporting
duke@435 27 // a generational abstraction, in particular when there are multiple
duke@435 28 // generations that are being independently collected -- possibly
duke@435 29 // concurrently and/or incrementally. Note, however, that the
duke@435 30 // ReferenceProcessor class abstracts away from a generational setting
duke@435 31 // by using only a heap interval (called "span" below), thus allowing
duke@435 32 // its use in a straightforward manner in a general, non-generational
duke@435 33 // setting.
duke@435 34 //
duke@435 35 // The basic idea is that each ReferenceProcessor object concerns
duke@435 36 // itself with ("weak") reference processing in a specific "span"
duke@435 37 // of the heap of interest to a specific collector. Currently,
duke@435 38 // the span is a convex interval of the heap, but, efficiency
duke@435 39 // apart, there seems to be no reason it couldn't be extended
duke@435 40 // (with appropriate modifications) to any "non-convex interval".
duke@435 41
duke@435 42 // forward references
duke@435 43 class ReferencePolicy;
duke@435 44 class AbstractRefProcTaskExecutor;
duke@435 45 class DiscoveredList;
duke@435 46
duke@435 47 class ReferenceProcessor : public CHeapObj {
duke@435 48 protected:
duke@435 49 // End of list marker
duke@435 50 static oop _sentinelRef;
duke@435 51 MemRegion _span; // (right-open) interval of heap
duke@435 52 // subject to wkref discovery
duke@435 53 bool _discovering_refs; // true when discovery enabled
duke@435 54 bool _discovery_is_atomic; // if discovery is atomic wrt
duke@435 55 // other collectors in configuration
duke@435 56 bool _discovery_is_mt; // true if reference discovery is MT.
duke@435 57 bool _enqueuing_is_done; // true if all weak references enqueued
duke@435 58 bool _processing_is_mt; // true during phases when
duke@435 59 // reference processing is MT.
duke@435 60 int _next_id; // round-robin counter in
duke@435 61 // support of work distribution
duke@435 62
duke@435 63 // For collectors that do not keep GC marking information
duke@435 64 // in the object header, this field holds a closure that
duke@435 65 // helps the reference processor determine the reachability
duke@435 66 // of an oop (the field is currently initialized to NULL for
duke@435 67 // all collectors but the CMS collector).
duke@435 68 BoolObjectClosure* _is_alive_non_header;
duke@435 69
duke@435 70 // The discovered ref lists themselves
coleenp@548 71
coleenp@548 72 // The MT'ness degree of the queues below
coleenp@548 73 int _num_q;
coleenp@548 74 // Arrays of lists of oops, one per thread
coleenp@548 75 DiscoveredList* _discoveredSoftRefs;
duke@435 76 DiscoveredList* _discoveredWeakRefs;
duke@435 77 DiscoveredList* _discoveredFinalRefs;
duke@435 78 DiscoveredList* _discoveredPhantomRefs;
duke@435 79
duke@435 80 public:
coleenp@548 81 int num_q() { return _num_q; }
duke@435 82 DiscoveredList* discovered_soft_refs() { return _discoveredSoftRefs; }
coleenp@548 83 static oop sentinel_ref() { return _sentinelRef; }
coleenp@548 84 static oop* adr_sentinel_ref() { return &_sentinelRef; }
duke@435 85
duke@435 86 public:
duke@435 87 // Process references with a certain reachability level.
duke@435 88 void process_discovered_reflist(DiscoveredList refs_lists[],
duke@435 89 ReferencePolicy* policy,
duke@435 90 bool clear_referent,
duke@435 91 BoolObjectClosure* is_alive,
duke@435 92 OopClosure* keep_alive,
duke@435 93 VoidClosure* complete_gc,
duke@435 94 AbstractRefProcTaskExecutor* task_executor);
duke@435 95
duke@435 96 void process_phaseJNI(BoolObjectClosure* is_alive,
duke@435 97 OopClosure* keep_alive,
duke@435 98 VoidClosure* complete_gc);
duke@435 99
duke@435 100 // Work methods used by the method process_discovered_reflist
duke@435 101 // Phase1: keep alive all those referents that are otherwise
duke@435 102 // dead but which must be kept alive by policy (and their closure).
coleenp@548 103 void process_phase1(DiscoveredList& refs_list,
duke@435 104 ReferencePolicy* policy,
duke@435 105 BoolObjectClosure* is_alive,
duke@435 106 OopClosure* keep_alive,
duke@435 107 VoidClosure* complete_gc);
duke@435 108 // Phase2: remove all those references whose referents are
duke@435 109 // reachable.
coleenp@548 110 inline void process_phase2(DiscoveredList& refs_list,
duke@435 111 BoolObjectClosure* is_alive,
duke@435 112 OopClosure* keep_alive,
duke@435 113 VoidClosure* complete_gc) {
duke@435 114 if (discovery_is_atomic()) {
duke@435 115 // complete_gc is ignored in this case for this phase
coleenp@548 116 pp2_work(refs_list, is_alive, keep_alive);
duke@435 117 } else {
duke@435 118 assert(complete_gc != NULL, "Error");
coleenp@548 119 pp2_work_concurrent_discovery(refs_list, is_alive,
duke@435 120 keep_alive, complete_gc);
duke@435 121 }
duke@435 122 }
duke@435 123 // Work methods in support of process_phase2
coleenp@548 124 void pp2_work(DiscoveredList& refs_list,
duke@435 125 BoolObjectClosure* is_alive,
duke@435 126 OopClosure* keep_alive);
duke@435 127 void pp2_work_concurrent_discovery(
coleenp@548 128 DiscoveredList& refs_list,
duke@435 129 BoolObjectClosure* is_alive,
duke@435 130 OopClosure* keep_alive,
duke@435 131 VoidClosure* complete_gc);
duke@435 132 // Phase3: process the referents by either clearing them
duke@435 133 // or keeping them alive (and their closure)
coleenp@548 134 void process_phase3(DiscoveredList& refs_list,
duke@435 135 bool clear_referent,
duke@435 136 BoolObjectClosure* is_alive,
duke@435 137 OopClosure* keep_alive,
duke@435 138 VoidClosure* complete_gc);
duke@435 139
duke@435 140 // Enqueue references with a certain reachability level
coleenp@548 141 void enqueue_discovered_reflist(DiscoveredList& refs_list, HeapWord* pending_list_addr);
duke@435 142
duke@435 143 // "Preclean" all the discovered reference lists
duke@435 144 // by removing references with strongly reachable referents.
duke@435 145 // The first argument is a predicate on an oop that indicates
duke@435 146 // its (strong) reachability and the second is a closure that
duke@435 147 // may be used to incrementalize or abort the precleaning process.
duke@435 148 // The caller is responsible for taking care of potential
duke@435 149 // interference with concurrent operations on these lists
duke@435 150 // (or predicates involved) by other threads. Currently
duke@435 151 // only used by the CMS collector.
duke@435 152 void preclean_discovered_references(BoolObjectClosure* is_alive,
duke@435 153 OopClosure* keep_alive,
duke@435 154 VoidClosure* complete_gc,
duke@435 155 YieldClosure* yield);
duke@435 156
duke@435 157 // Delete entries in the discovered lists that have
duke@435 158 // either a null referent or are not active. Such
duke@435 159 // Reference objects can result from the clearing
duke@435 160 // or enqueueing of Reference objects concurrent
duke@435 161 // with their discovery by a (concurrent) collector.
duke@435 162 // For a definition of "active" see java.lang.ref.Reference;
duke@435 163 // Refs are born active, become inactive when enqueued,
duke@435 164 // and never become active again. The state of being
duke@435 165 // active is encoded as follows: A Ref is active
duke@435 166 // if and only if its "next" field is NULL.
duke@435 167 void clean_up_discovered_references();
duke@435 168 void clean_up_discovered_reflist(DiscoveredList& refs_list);
duke@435 169
duke@435 170 // Returns the name of the discovered reference list
duke@435 171 // occupying the i / _num_q slot.
duke@435 172 const char* list_name(int i);
duke@435 173
coleenp@548 174 void enqueue_discovered_reflists(HeapWord* pending_list_addr, AbstractRefProcTaskExecutor* task_executor);
coleenp@548 175
duke@435 176 protected:
duke@435 177 // "Preclean" the given discovered reference list
duke@435 178 // by removing references with strongly reachable referents.
duke@435 179 // Currently used in support of CMS only.
duke@435 180 void preclean_discovered_reflist(DiscoveredList& refs_list,
duke@435 181 BoolObjectClosure* is_alive,
duke@435 182 OopClosure* keep_alive,
duke@435 183 VoidClosure* complete_gc,
duke@435 184 YieldClosure* yield);
duke@435 185
duke@435 186 int next_id() {
duke@435 187 int id = _next_id;
duke@435 188 if (++_next_id == _num_q) {
duke@435 189 _next_id = 0;
duke@435 190 }
duke@435 191 return id;
duke@435 192 }
duke@435 193 DiscoveredList* get_discovered_list(ReferenceType rt);
duke@435 194 inline void add_to_discovered_list_mt(DiscoveredList& refs_list, oop obj,
coleenp@548 195 HeapWord* discovered_addr);
duke@435 196 void verify_ok_to_handle_reflists() PRODUCT_RETURN;
duke@435 197
duke@435 198 void abandon_partial_discovered_list(DiscoveredList& refs_list);
duke@435 199 void abandon_partial_discovered_list_arr(DiscoveredList refs_lists[]);
duke@435 200
duke@435 201 // Calculate the number of jni handles.
duke@435 202 unsigned int count_jni_refs();
duke@435 203
duke@435 204 // Balances reference queues.
duke@435 205 void balance_queues(DiscoveredList ref_lists[]);
duke@435 206
duke@435 207 // Update (advance) the soft ref master clock field.
duke@435 208 void update_soft_ref_master_clock();
duke@435 209
duke@435 210 public:
duke@435 211 // constructor
duke@435 212 ReferenceProcessor():
duke@435 213 _span((HeapWord*)NULL, (HeapWord*)NULL),
duke@435 214 _discoveredSoftRefs(NULL), _discoveredWeakRefs(NULL),
duke@435 215 _discoveredFinalRefs(NULL), _discoveredPhantomRefs(NULL),
duke@435 216 _discovering_refs(false),
duke@435 217 _discovery_is_atomic(true),
duke@435 218 _enqueuing_is_done(false),
duke@435 219 _discovery_is_mt(false),
duke@435 220 _is_alive_non_header(NULL),
duke@435 221 _num_q(0),
duke@435 222 _processing_is_mt(false),
duke@435 223 _next_id(0)
duke@435 224 {}
duke@435 225
duke@435 226 ReferenceProcessor(MemRegion span, bool atomic_discovery,
duke@435 227 bool mt_discovery, int mt_degree = 1,
duke@435 228 bool mt_processing = false);
duke@435 229
duke@435 230 // Allocates and initializes a reference processor.
duke@435 231 static ReferenceProcessor* create_ref_processor(
duke@435 232 MemRegion span,
duke@435 233 bool atomic_discovery,
duke@435 234 bool mt_discovery,
duke@435 235 BoolObjectClosure* is_alive_non_header = NULL,
duke@435 236 int parallel_gc_threads = 1,
duke@435 237 bool mt_processing = false);
duke@435 238
duke@435 239 // RefDiscoveryPolicy values
duke@435 240 enum {
duke@435 241 ReferenceBasedDiscovery = 0,
duke@435 242 ReferentBasedDiscovery = 1
duke@435 243 };
duke@435 244
duke@435 245 static void init_statics();
duke@435 246
duke@435 247 public:
duke@435 248 // get and set "is_alive_non_header" field
duke@435 249 BoolObjectClosure* is_alive_non_header() {
duke@435 250 return _is_alive_non_header;
duke@435 251 }
duke@435 252 void set_is_alive_non_header(BoolObjectClosure* is_alive_non_header) {
duke@435 253 _is_alive_non_header = is_alive_non_header;
duke@435 254 }
duke@435 255
duke@435 256 // get and set span
duke@435 257 MemRegion span() { return _span; }
duke@435 258 void set_span(MemRegion span) { _span = span; }
duke@435 259
duke@435 260 // start and stop weak ref discovery
duke@435 261 void enable_discovery() { _discovering_refs = true; }
duke@435 262 void disable_discovery() { _discovering_refs = false; }
duke@435 263 bool discovery_enabled() { return _discovering_refs; }
duke@435 264
duke@435 265 // whether discovery is atomic wrt other collectors
duke@435 266 bool discovery_is_atomic() const { return _discovery_is_atomic; }
duke@435 267 void set_atomic_discovery(bool atomic) { _discovery_is_atomic = atomic; }
duke@435 268
duke@435 269 // whether discovery is done by multiple threads same-old-timeously
duke@435 270 bool discovery_is_mt() const { return _discovery_is_mt; }
duke@435 271 void set_mt_discovery(bool mt) { _discovery_is_mt = mt; }
duke@435 272
duke@435 273 // Whether we are in a phase when _processing_ is MT.
duke@435 274 bool processing_is_mt() const { return _processing_is_mt; }
duke@435 275 void set_mt_processing(bool mt) { _processing_is_mt = mt; }
duke@435 276
duke@435 277 // whether all enqueuing of weak references is complete
duke@435 278 bool enqueuing_is_done() { return _enqueuing_is_done; }
duke@435 279 void set_enqueuing_is_done(bool v) { _enqueuing_is_done = v; }
duke@435 280
duke@435 281 // iterate over oops
duke@435 282 void weak_oops_do(OopClosure* f); // weak roots
duke@435 283 static void oops_do(OopClosure* f); // strong root(s)
duke@435 284
duke@435 285 // Discover a Reference object, using appropriate discovery criteria
duke@435 286 bool discover_reference(oop obj, ReferenceType rt);
duke@435 287
duke@435 288 // Process references found during GC (called by the garbage collector)
duke@435 289 void process_discovered_references(ReferencePolicy* policy,
duke@435 290 BoolObjectClosure* is_alive,
duke@435 291 OopClosure* keep_alive,
duke@435 292 VoidClosure* complete_gc,
duke@435 293 AbstractRefProcTaskExecutor* task_executor);
duke@435 294
duke@435 295 public:
duke@435 296 // Enqueue references at end of GC (called by the garbage collector)
duke@435 297 bool enqueue_discovered_references(AbstractRefProcTaskExecutor* task_executor = NULL);
duke@435 298
duke@435 299 // debugging
duke@435 300 void verify_no_references_recorded() PRODUCT_RETURN;
duke@435 301 static void verify();
duke@435 302
duke@435 303 // clear the discovered lists (unlinking each entry).
duke@435 304 void clear_discovered_references() PRODUCT_RETURN;
duke@435 305 };
duke@435 306
duke@435 307 // A utility class to disable reference discovery in
duke@435 308 // the scope which contains it, for given ReferenceProcessor.
duke@435 309 class NoRefDiscovery: StackObj {
duke@435 310 private:
duke@435 311 ReferenceProcessor* _rp;
duke@435 312 bool _was_discovering_refs;
duke@435 313 public:
duke@435 314 NoRefDiscovery(ReferenceProcessor* rp) : _rp(rp) {
duke@435 315 if (_was_discovering_refs = _rp->discovery_enabled()) {
duke@435 316 _rp->disable_discovery();
duke@435 317 }
duke@435 318 }
duke@435 319
duke@435 320 ~NoRefDiscovery() {
duke@435 321 if (_was_discovering_refs) {
duke@435 322 _rp->enable_discovery();
duke@435 323 }
duke@435 324 }
duke@435 325 };
duke@435 326
duke@435 327
duke@435 328 // A utility class to temporarily mutate the span of the
duke@435 329 // given ReferenceProcessor in the scope that contains it.
duke@435 330 class ReferenceProcessorSpanMutator: StackObj {
duke@435 331 private:
duke@435 332 ReferenceProcessor* _rp;
duke@435 333 MemRegion _saved_span;
duke@435 334
duke@435 335 public:
duke@435 336 ReferenceProcessorSpanMutator(ReferenceProcessor* rp,
duke@435 337 MemRegion span):
duke@435 338 _rp(rp) {
duke@435 339 _saved_span = _rp->span();
duke@435 340 _rp->set_span(span);
duke@435 341 }
duke@435 342
duke@435 343 ~ReferenceProcessorSpanMutator() {
duke@435 344 _rp->set_span(_saved_span);
duke@435 345 }
duke@435 346 };
duke@435 347
duke@435 348 // A utility class to temporarily change the MT'ness of
duke@435 349 // reference discovery for the given ReferenceProcessor
duke@435 350 // in the scope that contains it.
duke@435 351 class ReferenceProcessorMTMutator: StackObj {
duke@435 352 private:
duke@435 353 ReferenceProcessor* _rp;
duke@435 354 bool _saved_mt;
duke@435 355
duke@435 356 public:
duke@435 357 ReferenceProcessorMTMutator(ReferenceProcessor* rp,
duke@435 358 bool mt):
duke@435 359 _rp(rp) {
duke@435 360 _saved_mt = _rp->discovery_is_mt();
duke@435 361 _rp->set_mt_discovery(mt);
duke@435 362 }
duke@435 363
duke@435 364 ~ReferenceProcessorMTMutator() {
duke@435 365 _rp->set_mt_discovery(_saved_mt);
duke@435 366 }
duke@435 367 };
duke@435 368
duke@435 369
duke@435 370 // A utility class to temporarily change the disposition
duke@435 371 // of the "is_alive_non_header" closure field of the
duke@435 372 // given ReferenceProcessor in the scope that contains it.
duke@435 373 class ReferenceProcessorIsAliveMutator: StackObj {
duke@435 374 private:
duke@435 375 ReferenceProcessor* _rp;
duke@435 376 BoolObjectClosure* _saved_cl;
duke@435 377
duke@435 378 public:
duke@435 379 ReferenceProcessorIsAliveMutator(ReferenceProcessor* rp,
duke@435 380 BoolObjectClosure* cl):
duke@435 381 _rp(rp) {
duke@435 382 _saved_cl = _rp->is_alive_non_header();
duke@435 383 _rp->set_is_alive_non_header(cl);
duke@435 384 }
duke@435 385
duke@435 386 ~ReferenceProcessorIsAliveMutator() {
duke@435 387 _rp->set_is_alive_non_header(_saved_cl);
duke@435 388 }
duke@435 389 };
duke@435 390
duke@435 391 // A utility class to temporarily change the disposition
duke@435 392 // of the "discovery_is_atomic" field of the
duke@435 393 // given ReferenceProcessor in the scope that contains it.
duke@435 394 class ReferenceProcessorAtomicMutator: StackObj {
duke@435 395 private:
duke@435 396 ReferenceProcessor* _rp;
duke@435 397 bool _saved_atomic_discovery;
duke@435 398
duke@435 399 public:
duke@435 400 ReferenceProcessorAtomicMutator(ReferenceProcessor* rp,
duke@435 401 bool atomic):
duke@435 402 _rp(rp) {
duke@435 403 _saved_atomic_discovery = _rp->discovery_is_atomic();
duke@435 404 _rp->set_atomic_discovery(atomic);
duke@435 405 }
duke@435 406
duke@435 407 ~ReferenceProcessorAtomicMutator() {
duke@435 408 _rp->set_atomic_discovery(_saved_atomic_discovery);
duke@435 409 }
duke@435 410 };
duke@435 411
duke@435 412
duke@435 413 // A utility class to temporarily change the MT processing
duke@435 414 // disposition of the given ReferenceProcessor instance
duke@435 415 // in the scope that contains it.
duke@435 416 class ReferenceProcessorMTProcMutator: StackObj {
duke@435 417 private:
duke@435 418 ReferenceProcessor* _rp;
duke@435 419 bool _saved_mt;
duke@435 420
duke@435 421 public:
duke@435 422 ReferenceProcessorMTProcMutator(ReferenceProcessor* rp,
duke@435 423 bool mt):
duke@435 424 _rp(rp) {
duke@435 425 _saved_mt = _rp->processing_is_mt();
duke@435 426 _rp->set_mt_processing(mt);
duke@435 427 }
duke@435 428
duke@435 429 ~ReferenceProcessorMTProcMutator() {
duke@435 430 _rp->set_mt_processing(_saved_mt);
duke@435 431 }
duke@435 432 };
duke@435 433
duke@435 434
duke@435 435 // This class is an interface used to implement task execution for the
duke@435 436 // reference processing.
duke@435 437 class AbstractRefProcTaskExecutor {
duke@435 438 public:
duke@435 439
duke@435 440 // Abstract tasks to execute.
duke@435 441 class ProcessTask;
duke@435 442 class EnqueueTask;
duke@435 443
duke@435 444 // Executes a task using worker threads.
duke@435 445 virtual void execute(ProcessTask& task) = 0;
duke@435 446 virtual void execute(EnqueueTask& task) = 0;
duke@435 447
duke@435 448 // Switch to single threaded mode.
duke@435 449 virtual void set_single_threaded_mode() { };
duke@435 450 };
duke@435 451
duke@435 452 // Abstract reference processing task to execute.
duke@435 453 class AbstractRefProcTaskExecutor::ProcessTask {
duke@435 454 protected:
duke@435 455 ProcessTask(ReferenceProcessor& ref_processor,
duke@435 456 DiscoveredList refs_lists[],
duke@435 457 bool marks_oops_alive)
duke@435 458 : _ref_processor(ref_processor),
duke@435 459 _refs_lists(refs_lists),
duke@435 460 _marks_oops_alive(marks_oops_alive)
duke@435 461 { }
duke@435 462
duke@435 463 public:
duke@435 464 virtual void work(unsigned int work_id, BoolObjectClosure& is_alive,
duke@435 465 OopClosure& keep_alive,
duke@435 466 VoidClosure& complete_gc) = 0;
duke@435 467
duke@435 468 // Returns true if a task marks some oops as alive.
duke@435 469 bool marks_oops_alive() const
duke@435 470 { return _marks_oops_alive; }
duke@435 471
duke@435 472 protected:
duke@435 473 ReferenceProcessor& _ref_processor;
duke@435 474 DiscoveredList* _refs_lists;
duke@435 475 const bool _marks_oops_alive;
duke@435 476 };
duke@435 477
duke@435 478 // Abstract reference processing task to execute.
duke@435 479 class AbstractRefProcTaskExecutor::EnqueueTask {
duke@435 480 protected:
duke@435 481 EnqueueTask(ReferenceProcessor& ref_processor,
duke@435 482 DiscoveredList refs_lists[],
coleenp@548 483 HeapWord* pending_list_addr,
duke@435 484 oop sentinel_ref,
duke@435 485 int n_queues)
duke@435 486 : _ref_processor(ref_processor),
duke@435 487 _refs_lists(refs_lists),
duke@435 488 _pending_list_addr(pending_list_addr),
duke@435 489 _sentinel_ref(sentinel_ref),
duke@435 490 _n_queues(n_queues)
duke@435 491 { }
duke@435 492
duke@435 493 public:
duke@435 494 virtual void work(unsigned int work_id) = 0;
duke@435 495
duke@435 496 protected:
duke@435 497 ReferenceProcessor& _ref_processor;
duke@435 498 DiscoveredList* _refs_lists;
coleenp@548 499 HeapWord* _pending_list_addr;
duke@435 500 oop _sentinel_ref;
duke@435 501 int _n_queues;
duke@435 502 };

mercurial