src/share/vm/gc_implementation/g1/g1RemSet.hpp

Print this page
rev 4561 : 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
Summary: Refactor G1's hot card cache and card counts table into their own files. Simplify the card counts table, including removing the encoding of the card index in each entry. The card counts table now has a 1:1 correspondence with the cards spanned by heap. Space for the card counts table is reserved from virtual memory (rather than C heap) during JVM startup and is committed/expanded when the heap is expanded. Changes were also reviewed-by Vitaly Davidovich.
Reviewed-by:

*** 1,7 **** /* ! * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 64,81 **** // Used for caching the closure that is responsible for scanning // references into the collection set. OopsInHeapRegionClosure** _cset_rs_update_cl; - // The routine that performs the actual work of refining a dirty - // card. - // If check_for_refs_into_refs is true then a true result is returned - // if the card contains oops that have references into the current - // collection set. - bool concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i, - bool check_for_refs_into_cset); - public: // This is called to reset dual hash tables after the gc pause // is finished and the initial hash table is no longer being // scanned. void cleanupHRRS(); --- 64,73 ----
*** 88,99 **** // region correctly beforehand.) The "worker_i" param is for the // parallel case where the number of the worker thread calling this // function can be helpful in partitioning the work to be done. It // should be the same as the "i" passed to the calling thread's // work(i) function. In the sequential case this param will be ingored. ! void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, ! int worker_i); // Prepare for and cleanup after an oops_into_collection_set_do // call. Must call each of these once before and after (in sequential // code) any threads call oops_into_collection_set_do. (This offers an // opportunity to sequential setup and teardown of structures needed by a --- 80,90 ---- // region correctly beforehand.) The "worker_i" param is for the // parallel case where the number of the worker thread calling this // function can be helpful in partitioning the work to be done. It // should be the same as the "i" passed to the calling thread's // work(i) function. In the sequential case this param will be ingored. ! void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, int worker_i); // Prepare for and cleanup after an oops_into_collection_set_do // call. Must call each of these once before and after (in sequential // code) any threads call oops_into_collection_set_do. (This offers an // opportunity to sequential setup and teardown of structures needed by a
*** 122,138 **** // parallel thread id of the current thread, and "claim_val" is the // value that should be used to claim heap regions. void scrub_par(BitMap* region_bm, BitMap* card_bm, uint worker_num, int claim_val); ! // Refine the card corresponding to "card_ptr". If "sts" is non-NULL, ! // join and leave around parts that must be atomic wrt GC. (NULL means ! // being done at a safepoint.) // If check_for_refs_into_cset is true, a true result is returned // if the given card contains oops that have references into the // current collection set. ! virtual bool concurrentRefineOneCard(jbyte* card_ptr, int worker_i, bool check_for_refs_into_cset); // Print any relevant summary info. virtual void print_summary_info(); --- 113,128 ---- // parallel thread id of the current thread, and "claim_val" is the // value that should be used to claim heap regions. void scrub_par(BitMap* region_bm, BitMap* card_bm, uint worker_num, int claim_val); ! // Refine the card corresponding to "card_ptr". // If check_for_refs_into_cset is true, a true result is returned // if the given card contains oops that have references into the // current collection set. ! virtual bool refine_card(jbyte* card_ptr, ! int worker_i, bool check_for_refs_into_cset); // Print any relevant summary info. virtual void print_summary_info();