Mercurial > hg > truffle
diff src/share/vm/memory/genCollectedHeap.cpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | d166675568f6 |
children | 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/memory/genCollectedHeap.cpp Tue Mar 11 15:34:06 2014 +0100 +++ b/src/share/vm/memory/genCollectedHeap.cpp Wed Mar 12 13:30:08 2014 +0100 @@ -126,7 +126,7 @@ (HeapWord*)(heap_rs.base() + heap_rs.size())); // It is important to do this in a way such that concurrent readers can't - // temporarily think somethings in the heap. (Seen this happen in asserts.) + // temporarily think something is in the heap. (Seen this happen in asserts.) _reserved.set_word_size(0); _reserved.set_start((HeapWord*)heap_rs.base()); size_t actual_heap_size = heap_rs.size(); @@ -592,23 +592,14 @@ gen_process_strong_roots(int level, bool younger_gens_as_roots, bool activate_scope, - bool is_scavenging, SharedHeap::ScanningOption so, OopsInGenClosure* not_older_gens, - bool do_code_roots, OopsInGenClosure* older_gens, KlassClosure* klass_closure) { // General strong roots. - if (!do_code_roots) { - SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, - not_older_gens, NULL, klass_closure); - } else { - bool do_code_marking = (activate_scope || nmethod::oops_do_marking_is_active()); - CodeBlobToOopClosure code_roots(not_older_gens, /*do_marking=*/ do_code_marking); - SharedHeap::process_strong_roots(activate_scope, is_scavenging, so, - not_older_gens, &code_roots, klass_closure); - } + SharedHeap::process_strong_roots(activate_scope, so, + not_older_gens, klass_closure); if (younger_gens_as_roots) { if (!_gen_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) { @@ -630,9 +621,8 @@ _gen_process_strong_tasks->all_tasks_completed(); } -void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure, - CodeBlobClosure* code_roots) { - SharedHeap::process_weak_roots(root_closure, code_roots); +void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) { + SharedHeap::process_weak_roots(root_closure); // "Local" "weak" refs for (int i = 0; i < _n_gens; i++) { _gens[i]->ref_processor()->weak_oops_do(root_closure); @@ -673,10 +663,6 @@ return _gens[0]->end_addr(); } -size_t GenCollectedHeap::unsafe_max_alloc() { - return _gens[0]->unsafe_max_alloc_nogc(); -} - // public collection interfaces void GenCollectedHeap::collect(GCCause::Cause cause) { @@ -937,6 +923,16 @@ return result; } +size_t GenCollectedHeap::tlab_used(Thread* thr) const { + size_t result = 0; + for (int i = 0; i < _n_gens; i += 1) { + if (_gens[i]->supports_tlab_allocation()) { + result += _gens[i]->tlab_used(); + } + } + return result; +} + size_t GenCollectedHeap::unsafe_max_tlab_alloc(Thread* thr) const { size_t result = 0; for (int i = 0; i < _n_gens; i += 1) { @@ -1267,7 +1263,7 @@ }; jlong GenCollectedHeap::millis_since_last_gc() { - // We need a monotonically non-deccreasing time in ms but + // We need a monotonically non-decreasing time in ms but // os::javaTimeMillis() does not guarantee monotonicity. jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; GenTimeOfLastGCClosure tolgc_cl(now);