<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 3/10/15 2:32 PM, Jon Masamitsu
wrote:<br>
</div>
<blockquote cite="mid:54FF38DA.4020805@oracle.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<br>
<div class="moz-cite-prefix">On 3/10/2015 9:43 AM, Derek White
wrote:<br>
</div>
<blockquote cite="mid:54FF1F4B.9090609@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 3/10/15 12:26 PM, Jon Masamitsu
wrote:<br>
</div>
<blockquote cite="mid:54FF1B4A.9020609@oracle.com" type="cite">8017462:
G1: guarantee fails with UseDynamicNumberOfGCThreads <br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8017462">https://bugs.openjdk.java.net/browse/JDK-8017462</a>
<br>
<br>
When fewer than the maximum number of threads was being used
for <br>
a parallel section, phase times for the threads that did not
execute and <br>
averages for the phase were misleading. The fix passes the
active number of <br>
GC threads to the G1 phase timers. <br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Ejmasa/8017462/webrev.00/">http://cr.openjdk.java.net/~jmasa/8017462/webrev.00/</a>
<br>
<br>
Tested with gc_test_suite. <br>
</blockquote>
Hi Jon,<br>
<br>
Looks good to me.<br>
<br>
Just a question: In g1StringDedup.cpp:<br>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<pre> void G1StringDedup::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, bool allow_resize_and_rehash) {
assert(is_enabled(), "String deduplication not enabled");
<span class="removed">- G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy();</span>
<span class="removed">- g1p->phase_times()->note_string_dedup_fixup_start();</span>
<span class="new">+ G1CollectedHeap* g1h = G1CollectedHeap::heap();</span>
<span class="new">+ G1CollectorPolicy* g1p = g1h->g1_policy();</span>
<span class="new">+ uint active_workers = g1h->workers()->active_workers();</span>
<span class="new">+ g1p->phase_times()->note_string_dedup_fixup_start(active_workers);</span>
double fixup_start = os::elapsedTime();
G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash);
<span class="removed">- G1CollectedHeap* g1h = G1CollectedHeap::heap();</span>
<span class="removed">- g1h->set_par_threads();</span>
<span class="new">+ g1h->set_par_threads(active_workers);
</span></pre>
<span class="new">You switched from not changing the number of
active workers "</span><span class="removed">set_par_threads()</span>"
to explicitly setting the <br>
number "<span class="new">g1h->set_par_threads(active_workers)</span>".
<br>
<br>
Do you expect to get a different number of active threads this
way, or are you just making the code clearer by<br>
making the count explicit? <br>
</blockquote>
<br>
I expect to get a different number of active workers. The policy
for number of GC workers depends<br>
on the number of Java threads and the size of the heap that has
been committed. Either/both can<br>
change so the number of GC workers can change. Does that answer
the question?<br>
</blockquote>
<br>
OK, Thanks for the info Jon. So I guess there could be a slight
performance difference then. To extent that the new active count is
more up to date, it could be a tiny win.<br>
<br>
- Derek<br>
<br>
</body>
</html>