mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6862295: JDWP threadid changes during debugging session (leading to ingored breakpoints)
Correctly count full GC operations for framework collectors. Add ForceFullGCJVMTIEpilogues as a future work around if needed. Reviewed-by: jcoomes, alanb, ysr
This commit is contained in:
parent
ac1f463988
commit
40de9c5fcc
3 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2000-2009 Sun Microsystems, Inc. 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
|
||||||
|
@ -456,6 +456,12 @@ void GenCollectedHeap::do_collection(bool full,
|
||||||
int max_level_collected = starting_level;
|
int max_level_collected = starting_level;
|
||||||
for (int i = starting_level; i <= max_level; i++) {
|
for (int i = starting_level; i <= max_level; i++) {
|
||||||
if (_gens[i]->should_collect(full, size, is_tlab)) {
|
if (_gens[i]->should_collect(full, size, is_tlab)) {
|
||||||
|
if (i == n_gens() - 1) { // a major collection is to happen
|
||||||
|
if (!complete) {
|
||||||
|
// The full_collections increment was missed above.
|
||||||
|
increment_total_full_collections();
|
||||||
|
}
|
||||||
|
}
|
||||||
// Timer for individual generations. Last argument is false: no CR
|
// Timer for individual generations. Last argument is false: no CR
|
||||||
TraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, gclog_or_tty);
|
TraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, gclog_or_tty);
|
||||||
TraceCollectorStats tcs(_gens[i]->counters());
|
TraceCollectorStats tcs(_gens[i]->counters());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2003-2009 Sun Microsystems, Inc. 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
|
||||||
|
@ -2421,6 +2421,11 @@ JvmtiGCMarker::JvmtiGCMarker(bool full) : _full(full), _invocation_count(0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ForceFullGCJVMTIEpilogues) {
|
||||||
|
// force 'Full GC' was done semantics for JVMTI GC epilogues
|
||||||
|
_full = true;
|
||||||
|
}
|
||||||
|
|
||||||
// GarbageCollectionStart event posted from VM thread - okay because
|
// GarbageCollectionStart event posted from VM thread - okay because
|
||||||
// JVMTI is clear that the "world is stopped" and callback shouldn't
|
// JVMTI is clear that the "world is stopped" and callback shouldn't
|
||||||
// try to call into the VM.
|
// try to call into the VM.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1997-2009 Sun Microsystems, Inc. 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
|
||||||
|
@ -1053,6 +1053,9 @@ class CommandLineFlags {
|
||||||
product(ccstr, TraceJVMTI, NULL, \
|
product(ccstr, TraceJVMTI, NULL, \
|
||||||
"Trace flags for JVMTI functions and events") \
|
"Trace flags for JVMTI functions and events") \
|
||||||
\
|
\
|
||||||
|
product(bool, ForceFullGCJVMTIEpilogues, false, \
|
||||||
|
"Force 'Full GC' was done semantics for JVMTI GC epilogues") \
|
||||||
|
\
|
||||||
/* This option can change an EMCP method into an obsolete method. */ \
|
/* This option can change an EMCP method into an obsolete method. */ \
|
||||||
/* This can affect tests that except specific methods to be EMCP. */ \
|
/* This can affect tests that except specific methods to be EMCP. */ \
|
||||||
/* This option should be used with caution. */ \
|
/* This option should be used with caution. */ \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue