提交 1c6a3923 编写于 作者: J jmasa

Merge

/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -176,10 +176,6 @@ void PSOldGen::compact() { ...@@ -176,10 +176,6 @@ void PSOldGen::compact() {
object_mark_sweep()->compact(ZapUnusedHeapArea); object_mark_sweep()->compact(ZapUnusedHeapArea);
} }
void PSOldGen::move_and_update(ParCompactionManager* cm) {
PSParallelCompact::move_and_update(cm, PSParallelCompact::old_space_id);
}
size_t PSOldGen::contiguous_available() const { size_t PSOldGen::contiguous_available() const {
return object_space()->free_in_bytes() + virtual_space()->uncommitted_size(); return object_space()->free_in_bytes() + virtual_space()->uncommitted_size();
} }
......
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -143,9 +143,6 @@ class PSOldGen : public CHeapObj { ...@@ -143,9 +143,6 @@ class PSOldGen : public CHeapObj {
void adjust_pointers(); void adjust_pointers();
void compact(); void compact();
// Parallel old
virtual void move_and_update(ParCompactionManager* cm);
// Size info // Size info
size_t capacity_in_bytes() const { return object_space()->capacity_in_bytes(); } size_t capacity_in_bytes() const { return object_space()->capacity_in_bytes(); }
size_t used_in_bytes() const { return object_space()->used_in_bytes(); } size_t used_in_bytes() const { return object_space()->used_in_bytes(); }
......
...@@ -2104,11 +2104,7 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) { ...@@ -2104,11 +2104,7 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
// klasses are used in the update of an object? // klasses are used in the update of an object?
compact_perm(vmthread_cm); compact_perm(vmthread_cm);
if (UseParallelOldGCCompacting) { compact();
compact();
} else {
compact_serial(vmthread_cm);
}
// Reset the mark bitmap, summary data, and do other bookkeeping. Must be // Reset the mark bitmap, summary data, and do other bookkeeping. Must be
// done before resizing. // done before resizing.
...@@ -2582,18 +2578,16 @@ void PSParallelCompact::enqueue_dense_prefix_tasks(GCTaskQueue* q, ...@@ -2582,18 +2578,16 @@ void PSParallelCompact::enqueue_dense_prefix_tasks(GCTaskQueue* q,
// each thread? // each thread?
if (total_dense_prefix_regions > 0) { if (total_dense_prefix_regions > 0) {
uint tasks_for_dense_prefix = 1; uint tasks_for_dense_prefix = 1;
if (UseParallelDensePrefixUpdate) { if (total_dense_prefix_regions <=
if (total_dense_prefix_regions <= (parallel_gc_threads * PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING)) {
(parallel_gc_threads * PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING)) { // Don't over partition. This assumes that
// Don't over partition. This assumes that // PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING is a small integer value
// PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING is a small integer value // so there are not many regions to process.
// so there are not many regions to process. tasks_for_dense_prefix = parallel_gc_threads;
tasks_for_dense_prefix = parallel_gc_threads; } else {
} else { // Over partition
// Over partition tasks_for_dense_prefix = parallel_gc_threads *
tasks_for_dense_prefix = parallel_gc_threads * PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING;
PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING;
}
} }
size_t regions_per_thread = total_dense_prefix_regions / size_t regions_per_thread = total_dense_prefix_regions /
tasks_for_dense_prefix; tasks_for_dense_prefix;
...@@ -2733,21 +2727,6 @@ void PSParallelCompact::verify_complete(SpaceId space_id) { ...@@ -2733,21 +2727,6 @@ void PSParallelCompact::verify_complete(SpaceId space_id) {
} }
#endif // #ifdef ASSERT #endif // #ifdef ASSERT
void PSParallelCompact::compact_serial(ParCompactionManager* cm) {
EventMark m("5 compact serial");
TraceTime tm("compact serial", print_phases(), true, gclog_or_tty);
ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
PSYoungGen* young_gen = heap->young_gen();
PSOldGen* old_gen = heap->old_gen();
old_gen->start_array()->reset();
old_gen->move_and_update(cm);
young_gen->move_and_update(cm);
}
void void
PSParallelCompact::follow_weak_klass_links() { PSParallelCompact::follow_weak_klass_links() {
// All klasses on the revisit stack are marked at this point. // All klasses on the revisit stack are marked at this point.
...@@ -3530,11 +3509,8 @@ PSParallelCompact::VerifyUpdateClosure::do_addr(HeapWord* addr, size_t words) { ...@@ -3530,11 +3509,8 @@ PSParallelCompact::VerifyUpdateClosure::do_addr(HeapWord* addr, size_t words) {
"Object liveness is wrong."); "Object liveness is wrong.");
return ParMarkBitMap::incomplete; return ParMarkBitMap::incomplete;
} }
assert(UseParallelOldGCDensePrefix || assert(HeapMaximumCompactionInterval > 1 || MarkSweepAlwaysCompactCount > 1 ||
(HeapMaximumCompactionInterval > 1) || forwarding_ptr == new_pointer, "new location is incorrect");
(MarkSweepAlwaysCompactCount > 1) ||
(forwarding_ptr == new_pointer),
"Calculation of new location is incorrect");
return ParMarkBitMap::incomplete; return ParMarkBitMap::incomplete;
} }
......
...@@ -1027,9 +1027,6 @@ class PSParallelCompact : AllStatic { ...@@ -1027,9 +1027,6 @@ class PSParallelCompact : AllStatic {
ParallelTaskTerminator* terminator_ptr, ParallelTaskTerminator* terminator_ptr,
uint parallel_gc_threads); uint parallel_gc_threads);
// For debugging only - compacts the old gen serially
static void compact_serial(ParCompactionManager* cm);
// If objects are left in eden after a collection, try to move the boundary // If objects are left in eden after a collection, try to move the boundary
// and absorb them into the old gen. Returns true if eden was emptied. // and absorb them into the old gen. Returns true if eden was emptied.
static bool absorb_live_data_from_eden(PSAdaptiveSizePolicy* size_policy, static bool absorb_live_data_from_eden(PSAdaptiveSizePolicy* size_policy,
......
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -121,12 +121,6 @@ void PSPermGen::compute_new_size(size_t used_before_collection) { ...@@ -121,12 +121,6 @@ void PSPermGen::compute_new_size(size_t used_before_collection) {
} }
} }
void PSPermGen::move_and_update(ParCompactionManager* cm) {
PSParallelCompact::move_and_update(cm, PSParallelCompact::perm_space_id);
}
void PSPermGen::precompact() { void PSPermGen::precompact() {
// Reset start array first. // Reset start array first.
_start_array.reset(); _start_array.reset();
......
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -51,9 +51,6 @@ class PSPermGen : public PSOldGen { ...@@ -51,9 +51,6 @@ class PSPermGen : public PSOldGen {
// MarkSweep code // MarkSweep code
virtual void precompact(); virtual void precompact();
// Parallel old
virtual void move_and_update(ParCompactionManager* cm);
virtual const char* name() const { return "PSPermGen"; } virtual const char* name() const { return "PSPermGen"; }
}; };
......
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -792,12 +792,6 @@ void PSYoungGen::compact() { ...@@ -792,12 +792,6 @@ void PSYoungGen::compact() {
to_mark_sweep()->compact(false); to_mark_sweep()->compact(false);
} }
void PSYoungGen::move_and_update(ParCompactionManager* cm) {
PSParallelCompact::move_and_update(cm, PSParallelCompact::eden_space_id);
PSParallelCompact::move_and_update(cm, PSParallelCompact::from_space_id);
PSParallelCompact::move_and_update(cm, PSParallelCompact::to_space_id);
}
void PSYoungGen::print() const { print_on(tty); } void PSYoungGen::print() const { print_on(tty); }
void PSYoungGen::print_on(outputStream* st) const { void PSYoungGen::print_on(outputStream* st) const {
st->print(" %-15s", "PSYoungGen"); st->print(" %-15s", "PSYoungGen");
......
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2011, 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
...@@ -127,9 +127,6 @@ class PSYoungGen : public CHeapObj { ...@@ -127,9 +127,6 @@ class PSYoungGen : public CHeapObj {
void adjust_pointers(); void adjust_pointers();
void compact(); void compact();
// Parallel Old
void move_and_update(ParCompactionManager* cm);
// Called during/after gc // Called during/after gc
void swap_spaces(); void swap_spaces();
......
...@@ -243,6 +243,12 @@ static ObsoleteFlag obsolete_jvm_flags[] = { ...@@ -243,6 +243,12 @@ static ObsoleteFlag obsolete_jvm_flags[] = {
{ "MaxLiveObjectEvacuationRatio", { "MaxLiveObjectEvacuationRatio",
JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) },
{ "ForceSharedSpaces", JDK_Version::jdk_update(6,25), JDK_Version::jdk(8) }, { "ForceSharedSpaces", JDK_Version::jdk_update(6,25), JDK_Version::jdk(8) },
{ "UseParallelOldGCCompacting",
JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) },
{ "UseParallelDensePrefixUpdate",
JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) },
{ "UseParallelOldGCDensePrefix",
JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) },
{ NULL, JDK_Version(0), JDK_Version(0) } { NULL, JDK_Version(0), JDK_Version(0) }
}; };
...@@ -799,26 +805,22 @@ bool Arguments::process_argument(const char* arg, ...@@ -799,26 +805,22 @@ bool Arguments::process_argument(const char* arg,
JDK_Version since = JDK_Version(); JDK_Version since = JDK_Version();
if (parse_argument(arg, origin)) { if (parse_argument(arg, origin) || ignore_unrecognized) {
// do nothing return true;
} else if (is_newly_obsolete(arg, &since)) {
enum { bufsize = 256 };
char buffer[bufsize];
since.to_string(buffer, bufsize);
jio_fprintf(defaultStream::error_stream(),
"Warning: The flag %s has been EOL'd as of %s and will"
" be ignored\n", arg, buffer);
} else {
if (!ignore_unrecognized) {
jio_fprintf(defaultStream::error_stream(),
"Unrecognized VM option '%s'\n", arg);
// allow for commandline "commenting out" options like -XX:#+Verbose
if (strlen(arg) == 0 || arg[0] != '#') {
return false;
}
}
} }
return true;
const char * const argname = *arg == '+' || *arg == '-' ? arg + 1 : arg;
if (is_newly_obsolete(arg, &since)) {
char version[256];
since.to_string(version, sizeof(version));
warning("ignoring option %s; support was removed in %s", argname, version);
return true;
}
jio_fprintf(defaultStream::error_stream(),
"Unrecognized VM option '%s'\n", argname);
// allow for commandline "commenting out" options like -XX:#+Verbose
return arg[0] == '#';
} }
bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) {
......
...@@ -1355,13 +1355,6 @@ class CommandLineFlags { ...@@ -1355,13 +1355,6 @@ class CommandLineFlags {
product(bool, UseParallelOldGC, false, \ product(bool, UseParallelOldGC, false, \
"Use the Parallel Old garbage collector") \ "Use the Parallel Old garbage collector") \
\ \
product(bool, UseParallelOldGCCompacting, true, \
"In the Parallel Old garbage collector use parallel compaction") \
\
product(bool, UseParallelDensePrefixUpdate, true, \
"In the Parallel Old garbage collector use parallel dense" \
" prefix update") \
\
product(uintx, HeapMaximumCompactionInterval, 20, \ product(uintx, HeapMaximumCompactionInterval, 20, \
"How often should we maximally compact the heap (not allowing " \ "How often should we maximally compact the heap (not allowing " \
"any dead space)") \ "any dead space)") \
...@@ -1381,9 +1374,6 @@ class CommandLineFlags { ...@@ -1381,9 +1374,6 @@ class CommandLineFlags {
"The standard deviation used by the par compact dead wood" \ "The standard deviation used by the par compact dead wood" \
"limiter (a number between 0-100).") \ "limiter (a number between 0-100).") \
\ \
product(bool, UseParallelOldGCDensePrefix, true, \
"Use a dense prefix with the Parallel Old garbage collector") \
\
product(uintx, ParallelGCThreads, 0, \ product(uintx, ParallelGCThreads, 0, \
"Number of parallel threads parallel gc will use") \ "Number of parallel threads parallel gc will use") \
\ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册