370 Commits

Author SHA1 Message Date
Antonios Printezis
972acdab81 6937160: G1: should observe GCTimeRatio
Remove the G1GCPercent parameter, that specifies the desired GC overhead percentage in G1, and observe the GCTimeRatio parameter instead.

Reviewed-by: jmasa, johnc
2010-03-30 15:36:55 -04:00
Antonios Printezis
35f23f97b0 6935821: G1: threads created during marking do not active their SATB queues
Newly-created threads always had the active field of their SATB queue initialized to false, even if they were created during marking. As a result, updates from threads created during a marking cycle were never enqueued and never processed. The fix includes remaining a method from active() to is_active() for readability and naming consistency.

Reviewed-by: ysr, johnc
2010-03-18 12:14:59 -04:00
John Coomes
aa951c36cb 6935839: excessive marking stack growth during full gcs
Process one item at a time from the objarray stack/queue

Reviewed-by: apetrusenko, tonyp
2010-03-18 13:31:51 -07:00
Andrey Petrusenko
2fa0d00635 6921710: G1: assert(new_finger >= _finger && new_finger < _region_limit,"invariant")
If CM task was aborted while scanning the last object of the specified region and the size of that object is equal to bitmap's granularity then the next offset would be equal or over the region limit which is exactly what the assertion states.

Reviewed-by: ysr, tonyp, jmasa
2010-03-18 01:48:28 -07:00
John Cuthbertson
e9f77f7ec1 6755988: G1: assert(new_obj != 0 || ... "should be forwarded")
A TLAB became large enough to be considered a humongous object allowing multiple objects to be allocated in a humongous region, which violates a basic assumption about humongous regions. The changes ensure that TLABs cannot be regarded as humongous.

Reviewed-by: iveresov, tonyp
2010-03-11 11:44:43 -08:00
John Coomes
4f82340476 4396719: Mark Sweep stack overflow on deeply nested Object arrays
Use an explicit stack for object arrays and process them in chunks.

Reviewed-by: iveresov, apetrusenko
2010-03-03 14:48:26 -08:00
Jon Masamitsu
5fdec09798 6910182: CMS: assert(_cursor[j] == _survivor_plab_array[j].end(),"Ctl pt invariant")
Calculation of the slicing of survivor spaces for MT was incorrect.

Reviewed-by: ysr
2010-03-03 08:10:41 -08:00
Antonios Printezis
1eb12e87a7 6928065: G1: use existing command line parameters to set the young generation size
See synopsis

Reviewed-by: johnc, jmasa
2010-02-24 14:56:20 -05:00
Jon Masamitsu
f254745228 6928081: G1: rename parameters common with CMS
Rename marking stack sizing flags to be common between G1 and CMS

Reviewed-by: ysr, tonyp
2010-02-24 07:00:33 -08:00
Antonios Printezis
77b2dfce1d 6928073: G1: use existing command line parameters for marking cycle initiation
Replace the combination of the G1SteadyStateUsed / G1SteadyStateUsedDelta parameteres to decide the marking initiation threshold and instead use InitiatingHeapOccupancyPercent.

Reviewed-by: ysr, johnc
2010-02-23 23:14:34 -05:00
Antonios Printezis
b5c83abcd4 6928059: G1: command line parameter renaming
Rename G1 parameters to make them more consistent.

Reviewed-by: jmasa, johnc
2010-02-23 23:13:23 -05:00
Igor Veresov
52b92d5593 6923991: G1: improve scalability of RSet scanning
Implemented block-based work stealing. Moved copying during the rset scanning phase to the main copying phase. Made the size of rset table depend on the region size.

Reviewed-by: apetrusenko, tonyp
2010-02-11 15:52:19 -08:00
Antonios Printezis
a88853347f 6802453: G1: hr()->is_in_reserved(from),"Precondition."
The operations of re-using a RSet component and expanding the same RSet component were not mutually exlusive, and this could lead to RSets getting corrupted and entries being dropped.

Reviewed-by: iveresov, johnc
2010-02-08 14:23:01 -05:00
John Cuthbertson
7f9ba03c32 6914402: G1: assert(!is_young_card(cached_ptr),"shouldn't get a card in young region")
Invalid assert. Filter cards evicted from the card count cache instead.

Reviewed-by: apetrusenko, tonyp
2010-02-02 18:39:50 -08:00
Y. Srinivas Ramakrishna
c61ab190cf 6904516: More object array barrier fixes, following up on 6906727
Fixed missing pre-barrier calls for G1, modified C1 to call pre- and correct post-barrier interfaces, deleted obsolete interface, (temporarily) disabled redundant deferred barrier in BacktraceBuilder.

Reviewed-by: coleenp, jmasa, kvn, never
2010-02-01 17:29:01 -08:00
Y. Srinivas Ramakrishna
342a620a7f 6920090: G1: Disable ReduceInitialCardMarks at least until 6920109 is fixed
G1 now answers "no" to the query can_elide_initializing_store_barrier() in the product build. A debug flag allows alternate behaviour in debug builds.

Reviewed-by: iveresov, tonyp
2010-01-26 16:52:29 -08:00
Jon Masamitsu
b2ed547ec0 6895236: CMS: cmsOopClosures.inline.hpp:43 assert(..., "Should remember klasses in this context")
Adjust assertion checking for ExplicitGCInvokesConcurrentAndUnloadsClasses as a reason for class unloading

Reviewed-by: ysr
2010-01-21 11:33:32 -08:00
John Cuthbertson
29a13dc105 6915005: G1: Hang in PtrQueueSet::completed_buffers_list_length with gcl001
When enqueuing a completed PtrQueue buffer, cache a local pointer to the buffer and clear the field in the PtrQueue prior to unlocking the mutex referenced by the _lock field and pass the cached local value to the enqueuing routine. This will prevent the same completed buffer being enqueued multiple times, which causes the hang.

Reviewed-by: ysr
2010-01-13 15:45:47 -08:00
Y. Srinivas Ramakrishna
331512606a 6896647: card marks can be deferred too long
Deferred card marks are now flushed during the gc prologue. Parallel[Scavege,OldGC] and SerialGC no longer defer card marks generated by COMPILER2 as a result of ReduceInitialCardMarks. For these cases, introduced a diagnostic option to defer the card marks, only for the purposes of testing and diagnostics. CMS and G1 continue to defer card marks. Potential performance concern related to single-threaded flushing of deferred card marks in the gc prologue will be addressed in the future.

Reviewed-by: never, johnc
2010-01-13 15:26:39 -08:00
Jon Masamitsu
69342d1472 6912018: CMS: guarantee(head() != 0,"The head of the list cannot be NULL")
Block too small to split was not correctly putback to free lists.

Reviewed-by: ysr
2010-01-07 08:14:45 -08:00
Y. Srinivas Ramakrishna
272a6d47bb 6631166: CMS: better heuristics when combatting fragmentation
Autonomic per-worker free block cache sizing, tunable coalition policies, fixes to per-size block statistics, retuned gain and bandwidth of some feedback loop filters to allow quicker reactivity to abrupt changes in ambient demand, and other heuristics to reduce fragmentation of the CMS old gen. Also tightened some assertions, including those related to locking.

Reviewed-by: jmasa
2009-12-23 09:23:54 -08:00
Igor Veresov
1383dc414b 6862387: tune concurrent refinement further
Reworked the concurrent refinement: threads activation, feedback-based threshold adjustment, other miscellaneous fixes.

Reviewed-by: apetrusenko, tonyp
2009-12-16 15:12:51 -08:00
Jon Masamitsu
1bed5a3ded Merge 2009-12-11 09:30:48 -08:00
Jon Masamitsu
c5b5e2e3a7 Merge 2009-12-11 08:39:30 -08:00
John Cuthbertson
93d5e80a7e 6908215: G1: SEGV with G1PolicyVerbose=2 debug flag
Change CollectionSetChooser::printSortedHeapRegions to handle null entries in _markedRegions growable array.

Reviewed-by: jmasa, tonyp, iveresov
2009-12-09 23:51:38 -08:00
Antonios Printezis
8a125d9913 6880903: G1: G1 reports incorrect Runtime.maxMemory()
G1 reports committed memory instead of reserved memory from the Runtime.maxMemory() method

Reviewed-by: ysr, jmasa
2009-12-04 07:44:35 -05:00
John Cuthbertson
5a239d996b 6899058: G1: Internal error in ptrQueue.cpp:201 in nightly tests
Fixes a race on the dirty card queue completed buffer list between worker thread(s) performing a flush of a deferred store barrier (enqueueing a newly completed buffer) and worker thread(s) in the RSet updating code claiming completed buffers. Removed the routine that removes elements from the completed update buffer queue using a CAS.

Reviewed-by: ysr, tonyp
2009-11-24 15:19:30 -08:00
Antonios Printezis
9cf0c891d9 6815790: G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC
It introduces the necessary memory pools for G1.

Reviewed-by: mchung, ysr
2009-11-20 14:47:01 -05:00
Y. Srinivas Ramakrishna
b5af9f3408 6902303: G1: ScavengeALot should cause an incremental, rather than a full, collection
ScavengeALot now causes an incremental (but possibly partially young, in the G1 sense) collection. Some such collections may be abandoned on account of MMU specs. Band-aided a native leak associated with abandoned pauses, as well as an MMU tracker overflow related to frequent scavenge events in the face of a large MMU denominator interval; the latter is protected by a product flag that defaults to false.

Reviewed-by: tonyp
2009-11-19 13:43:25 -08:00
Y. Srinivas Ramakrishna
c54bb4236d 6902701: G1: protect debugging code related to 6898948 with a debug flag
Protected stats dump with a new develop flag; other than for the dump, reconciled product and non-product behaviour in face of the error.

Reviewed-by: tonyp
2009-11-19 10:19:19 -08:00
Y. Srinivas Ramakrishna
241f0f0cd8 6898948: G1: forensic instrumentation for out-of-bounds recent_avg_pause_time_ratio()
Added instrumentation and (temporary) assert in non-product mode; clipped the value when found out-of-bounds in product mode. Fix of original issue will follow collection of data from this instrumentation.

Reviewed-by: jcoomes, tonyp
2009-11-13 11:55:26 -08:00
Jon Masamitsu
bedf908436 6898857: [Regression] -XX:NewRatio with -XX:+UseConcMarkSweepGC causes fatal error
Use CollectorPolicy information instead of MaxNewSize

Reviewed-by: ysr, jcoomes
2009-11-10 11:32:48 -08:00
John Cuthbertson
f473d94b9c 6895788: G1: SATB and update buffer allocation code allocates too much space
The type in the NEW_C_HEAP_ARRRY and FREE_C_HEAP_ARRAY calls in the buffer allocation code was changed from void* to char as the size argument had already been mulitipled by the byte size of an object pointer.

Reviewed-by: ysr, tonyp
2009-11-06 11:10:05 -08:00
Xiaobin Lu
f5e722511a Merge 2009-10-30 17:24:14 -07:00
Paul Hohensee
2f7d60fa36 6887571: Increase default heap config sizes
Apply modification of existing server heap size ergo to all collectors except CMS.

Reviewed-by: jmasa, ysr, xlu
2009-10-28 16:25:51 -04:00
Andrey Petrusenko
79580cb425 6870843: G1: G1 GC memory leak
The fix addresses two memory leaks in G1 code: (1) _evac_failure_scan_stack - a resource object allocated on the C heap was not freed; (2) RSHashTable were linked into deleted list which was only cleared at full GC.

Reviewed-by: tonyp, iveresov
2009-10-27 02:42:24 -07:00
Andrey Petrusenko
da1b89b746 6858886: G1: guarantee(_next_marked_bytes <= used(),"invariant") at heapRegion.hpp:359
Reviewed-by: tonyp, ysr
2009-10-22 07:43:49 -07:00
Antonios Printezis
e57cedc5ed Merge 2009-10-20 11:28:25 -07:00
Antonios Printezis
9f337f438a Merge 2009-10-19 17:02:19 -04:00
Y. Srinivas Ramakrishna
928ac69fcd 6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
6889757: G1: enable card mark elision for initializing writes from compiled code (ReduceInitialCardMarks)

Defer the (compiler-elided) card-mark upon a slow-path allocation until after the store  and before the next subsequent safepoint; G1 now answers yes to can_elide_tlab_write_barriers().

Reviewed-by: jcoomes, kvn, never
2009-10-16 02:05:46 -07:00
John Coomes
7e76feaf42 6888953: some calls to function-like macros are missing semicolons
Reviewed-by: pbk, kvn
2009-10-11 16:19:25 -07:00
Erik Trimble
8cea3ed3b4 Merge 2009-10-09 15:18:52 -07:00
Antonios Printezis
9288a18639 6888619: G1: too many guarantees in concurrent marking
Change more guarantees in concurrent marking into asserts.

Reviewed-by: apetrusenko, iveresov
2009-10-07 10:09:57 -04:00
Antonios Printezis
0835f0c4df 6888316: G1: has_aborted() || _cm->region_stack_empty() fails
Remove incorrect guarantee.

Reviewed-by: apetrusenko, iveresov
2009-10-07 09:42:18 -04:00
Antonios Printezis
31de6adee9 6847956: G1: crash in oopDesc*G1ParCopyHelper::copy_to_survivor_space(oopDesc*)
When we copy objects to survivors during marking, we incorrectly set NTAMS to bottom, which causes marking to miss visiting some of those objects.

Reviewed-by: apetrusenko, iveresov
2009-10-05 12:05:48 -04:00
Antonios Printezis
2684c3a431 6882730: G1: parallel heap verification messes up region dump
It tidies up the G1 heap verification a bit. In particular, when the verification is done in parallel and there is a failure, this is propagated to the top level and the heap is dumped at the end, not by every thread that encounters a failure.

Reviewed-by: johnc, jmasa
2009-10-02 16:20:42 -04:00
Antonios Printezis
99a529bb86 6885041: G1: inconsistent thread dump
When G1 is enabled, thread dumps are inconsistent as the info for some of the G1 threads is not formatted properly.

Reviewed-by: ysr, johnc
2009-10-02 16:12:07 -04:00
John R Rose
f34acd6601 Merge 2009-09-30 13:25:39 -07:00
Antonios Printezis
2c2a8ae8b1 6890137: G1: revamp reachable object dump
Revamp the reachable object dump debugging facility.

Reviewed-by: jmasa, apetrusenko
2009-09-30 14:50:51 -04:00
Antonios Printezis
7c9b6d8d16 6886024: G1: assert(recent_avg_pause_time_ratio() < 1.00,"All GC?")
The assert is incorrect and can fire incorrectly due to floating point inaccuracy.

Reviewed-by: apetrusenko, ysr, jcoomes
2009-10-23 14:34:27 -04:00