mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
Merge
This commit is contained in:
commit
5b71ef55a7
12 changed files with 23 additions and 26 deletions
|
@ -549,7 +549,7 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen,
|
||||||
FLAG_SET_DEFAULT(ConcGCThreads, (ParallelGCThreads + 3)/4);
|
FLAG_SET_DEFAULT(ConcGCThreads, (ParallelGCThreads + 3)/4);
|
||||||
}
|
}
|
||||||
if (ConcGCThreads > 1) {
|
if (ConcGCThreads > 1) {
|
||||||
_conc_workers = new YieldingFlexibleWorkGang("Parallel CMS Threads",
|
_conc_workers = new YieldingFlexibleWorkGang("CMS Thread",
|
||||||
ConcGCThreads, true);
|
ConcGCThreads, true);
|
||||||
if (_conc_workers == NULL) {
|
if (_conc_workers == NULL) {
|
||||||
warning("GC/CMS: _conc_workers allocation failure: "
|
warning("GC/CMS: _conc_workers allocation failure: "
|
||||||
|
|
|
@ -65,7 +65,7 @@ ConcurrentMarkSweepThread::ConcurrentMarkSweepThread(CMSCollector* collector)
|
||||||
assert(_collector == NULL, "Collector already set");
|
assert(_collector == NULL, "Collector already set");
|
||||||
_collector = collector;
|
_collector = collector;
|
||||||
|
|
||||||
set_name("Concurrent Mark-Sweep GC Thread");
|
set_name("CMS Main Thread");
|
||||||
|
|
||||||
if (os::create_thread(this, os::cgc_thread)) {
|
if (os::create_thread(this, os::cgc_thread)) {
|
||||||
// An old comment here said: "Priority should be just less
|
// An old comment here said: "Priority should be just less
|
||||||
|
|
|
@ -61,7 +61,7 @@ ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *nex
|
||||||
create_and_start();
|
create_and_start();
|
||||||
|
|
||||||
// set name
|
// set name
|
||||||
set_name("G1 Concurrent Refinement Thread#%d", worker_id);
|
set_name("G1 Refine#%d", worker_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConcurrentG1RefineThread::initialize() {
|
void ConcurrentG1RefineThread::initialize() {
|
||||||
|
|
|
@ -687,7 +687,7 @@ ConcurrentMark::ConcurrentMark(G1CollectedHeap* g1h, G1RegionToSpaceMapper* prev
|
||||||
gclog_or_tty->print_cr("CL Sleep Factor %1.4lf", cleanup_sleep_factor());
|
gclog_or_tty->print_cr("CL Sleep Factor %1.4lf", cleanup_sleep_factor());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads",
|
_parallel_workers = new FlexibleWorkGang("G1 Marker",
|
||||||
_max_parallel_marking_threads, false, true);
|
_max_parallel_marking_threads, false, true);
|
||||||
if (_parallel_workers == NULL) {
|
if (_parallel_workers == NULL) {
|
||||||
vm_exit_during_initialization("Failed necessary allocation.");
|
vm_exit_during_initialization("Failed necessary allocation.");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -48,7 +48,7 @@ ConcurrentMarkThread::ConcurrentMarkThread(ConcurrentMark* cm) :
|
||||||
_vtime_accum(0.0),
|
_vtime_accum(0.0),
|
||||||
_vtime_mark_accum(0.0) {
|
_vtime_mark_accum(0.0) {
|
||||||
|
|
||||||
set_name("G1 Main Concurrent Mark GC Thread");
|
set_name("G1 Main Marker");
|
||||||
create_and_start();
|
create_and_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ public:
|
||||||
void empty_list();
|
void empty_list();
|
||||||
bool is_empty() { return _length == 0; }
|
bool is_empty() { return _length == 0; }
|
||||||
uint length() { return _length; }
|
uint length() { return _length; }
|
||||||
|
uint eden_length() { return length() - survivor_length(); }
|
||||||
uint survivor_length() { return _survivor_length; }
|
uint survivor_length() { return _survivor_length; }
|
||||||
|
|
||||||
// Currently we do not keep track of the used byte sum for the
|
// Currently we do not keep track of the used byte sum for the
|
||||||
|
@ -119,7 +120,7 @@ public:
|
||||||
// we'll report the more accurate information then.
|
// we'll report the more accurate information then.
|
||||||
size_t eden_used_bytes() {
|
size_t eden_used_bytes() {
|
||||||
assert(length() >= survivor_length(), "invariant");
|
assert(length() >= survivor_length(), "invariant");
|
||||||
return (size_t) (length() - survivor_length()) * HeapRegion::GrainBytes;
|
return (size_t) eden_length() * HeapRegion::GrainBytes;
|
||||||
}
|
}
|
||||||
size_t survivor_used_bytes() {
|
size_t survivor_used_bytes() {
|
||||||
return (size_t) survivor_length() * HeapRegion::GrainBytes;
|
return (size_t) survivor_length() * HeapRegion::GrainBytes;
|
||||||
|
|
|
@ -537,15 +537,12 @@ void G1CollectorPolicy::update_young_list_target_length(size_t rs_lengths) {
|
||||||
|
|
||||||
// This is how many young regions we already have (currently: the survivors).
|
// This is how many young regions we already have (currently: the survivors).
|
||||||
uint base_min_length = recorded_survivor_regions();
|
uint base_min_length = recorded_survivor_regions();
|
||||||
// This is the absolute minimum young length, which ensures that we
|
uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
|
||||||
// can allocate one eden region in the worst-case.
|
// This is the absolute minimum young length. Ensure that we
|
||||||
uint absolute_min_length = base_min_length + 1;
|
// will at least have one eden region available for allocation.
|
||||||
uint desired_min_length =
|
uint absolute_min_length = base_min_length + MAX2(_g1->young_list()->eden_length(), (uint)1);
|
||||||
calculate_young_list_desired_min_length(base_min_length);
|
// If we shrank the young list target it should not shrink below the current size.
|
||||||
if (desired_min_length < absolute_min_length) {
|
desired_min_length = MAX2(desired_min_length, absolute_min_length);
|
||||||
desired_min_length = absolute_min_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate the absolute and desired max bounds.
|
// Calculate the absolute and desired max bounds.
|
||||||
|
|
||||||
// We will try our best not to "eat" into the reserve.
|
// We will try our best not to "eat" into the reserve.
|
||||||
|
@ -1925,7 +1922,7 @@ void G1CollectorPolicy::finalize_cset(double target_pause_time_ms, EvacuationInf
|
||||||
// [Newly Young Regions ++ Survivors from last pause].
|
// [Newly Young Regions ++ Survivors from last pause].
|
||||||
|
|
||||||
uint survivor_region_length = young_list->survivor_length();
|
uint survivor_region_length = young_list->survivor_length();
|
||||||
uint eden_region_length = young_list->length() - survivor_region_length;
|
uint eden_region_length = young_list->eden_length();
|
||||||
init_cset_region_lengths(eden_region_length, survivor_region_length);
|
init_cset_region_lengths(eden_region_length, survivor_region_length);
|
||||||
|
|
||||||
HeapRegion* hr = young_list->first_survivor_region();
|
HeapRegion* hr = young_list->first_survivor_region();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -34,7 +34,7 @@ G1StringDedupThread* G1StringDedupThread::_thread = NULL;
|
||||||
|
|
||||||
G1StringDedupThread::G1StringDedupThread() :
|
G1StringDedupThread::G1StringDedupThread() :
|
||||||
ConcurrentGCThread() {
|
ConcurrentGCThread() {
|
||||||
set_name("String Deduplication Thread");
|
set_name("G1 StrDedup");
|
||||||
create_and_start();
|
create_and_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ GCTaskThread::GCTaskThread(GCTaskManager* manager,
|
||||||
guarantee(_time_stamps != NULL, "Sanity");
|
guarantee(_time_stamps != NULL, "Sanity");
|
||||||
}
|
}
|
||||||
set_id(which);
|
set_id(which);
|
||||||
set_name("GC task thread#%d (ParallelGC)", which);
|
set_name("ParGC Thread#%d", which);
|
||||||
}
|
}
|
||||||
|
|
||||||
GCTaskThread::~GCTaskThread() {
|
GCTaskThread::~GCTaskThread() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -68,7 +68,7 @@ SharedHeap::SharedHeap(CollectorPolicy* policy_) :
|
||||||
}
|
}
|
||||||
_sh = this; // ch is static, should be set only once.
|
_sh = this; // ch is static, should be set only once.
|
||||||
if (UseConcMarkSweepGC || UseG1GC) {
|
if (UseConcMarkSweepGC || UseG1GC) {
|
||||||
_workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads,
|
_workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
|
||||||
/* are_GC_task_threads */true,
|
/* are_GC_task_threads */true,
|
||||||
/* are_ConcurrentGC_threads */false);
|
/* are_ConcurrentGC_threads */false);
|
||||||
if (_workers == NULL) {
|
if (_workers == NULL) {
|
||||||
|
|
|
@ -236,7 +236,7 @@ void AbstractWorkGang::threads_do(ThreadClosure* tc) const {
|
||||||
GangWorker::GangWorker(AbstractWorkGang* gang, uint id) {
|
GangWorker::GangWorker(AbstractWorkGang* gang, uint id) {
|
||||||
_gang = gang;
|
_gang = gang;
|
||||||
set_id(id);
|
set_id(id);
|
||||||
set_name("Gang worker#%d (%s)", id, gang->name());
|
set_name("%s#%d", gang->name(), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GangWorker::run() {
|
void GangWorker::run() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore 8019361
|
|
||||||
* @test TestDynShrinkHeap
|
* @test TestDynShrinkHeap
|
||||||
* @bug 8016479
|
* @bug 8016479
|
||||||
* @requires vm.gc=="Parallel" | vm.gc=="null"
|
* @requires vm.gc=="Parallel" | vm.gc=="null"
|
||||||
|
@ -35,7 +34,7 @@ import java.lang.management.ManagementFactory;
|
||||||
import java.lang.management.MemoryUsage;
|
import java.lang.management.MemoryUsage;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import sun.management.ManagementFactoryHelper;
|
import sun.management.ManagementFactoryHelper;
|
||||||
import static com.oracle.java.testlibrary.Asserts.*;
|
import static com.oracle.java.testlibrary.Asserts.assertLessThan;
|
||||||
|
|
||||||
public class TestDynShrinkHeap {
|
public class TestDynShrinkHeap {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue