<div dir="ltr"><pre class="" style="margin-top:0px;margin-bottom:0px;font-family:inherit;font-size:14px;white-space:pre-wrap;color:rgb(0,0,0);line-height:22.4px">Hi Thomas, Mikael,<br><br>I've refined the code based on your recommendations on the code style.<br><br>However, in my opinion, to provide an additional context in GCThread instead of Thread may lead to massive modifications </pre><pre class="" style="margin-top:0px;margin-bottom:0px;font-family:inherit;font-size:14px;white-space:pre-wrap;color:rgb(0,0,0);line-height:22.4px">and I'm not sure if it may bring some impact on the correctness of other codes.<br>So I have not revised this part so far, in order to keep our patch pure and independent.<br>(Or maybe it's because I did not quite catch your ideas?)<br><br>May I have your reviews on the new patch?</pre><pre class="" style="margin-top:0px;margin-bottom:0px;font-family:inherit;font-size:14px;white-space:pre-wrap;color:rgb(0,0,0);line-height:22.4px"><br></pre><div class="gmail_extra"><br><div class="gmail_quote">2015-12-16 0:15 GMT+08:00 Mikael Gerdin <span dir="ltr"><<a href="mailto:mikael.gerdin@oracle.com" target="_blank">mikael.gerdin@oracle.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><div class="h5"><br>
<br>
On 2015-12-14 17:49, Thomas Schatzl wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Mon, 2015-12-14 at 23:57 +0800, ray alex wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks, Thomas!<br>
<br>
I will refine my code carefully according to your suggestions as soon<br>
as possible.<br>
</blockquote>
<br>
Thanks.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Since I'm new in contributing to OpenJDK, actually I'm not sure how to<br>
upload when my new code is ready?<br>
Just upload an attach of diffs as I did, or some other ways?<br>
</blockquote>
<br>
The best way as long as we have no confirmation about the OCA signing,<br>
is to attach a patch (or a webrev, see<br>
<a href="http://openjdk.java.net/contribute/" rel="noreferrer" target="_blank">http://openjdk.java.net/contribute/</a>) and send it to this list. Later it<br>
will be more convenient to send me a patch that I will convert into a<br>
webrev and put on <a href="http://cr.openjdk.java.net" rel="noreferrer" target="_blank">cr.openjdk.java.net</a>.<br>
<br>
As soon as you have two contributions, you can upload patches yourselves<br>
onto your own account on <a href="http://cr.openjdk.java.net" rel="noreferrer" target="_blank">cr.openjdk.java.net</a>.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Besides, I'm currently processing my signed OCA for the committer<br>
rights,<br>
I'm not sure how long it will take, does it matter?<br>
</blockquote>
<br>
The OCA is only for us to be able to accept your patch in Hotspot. The<br>
various levels of contributor status are a different matter, and signify<br>
your level of expertise within the community.<br>
<br>
See also <a href="http://openjdk.java.net/contribute/" rel="noreferrer" target="_blank">http://openjdk.java.net/contribute/</a> for more information.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As for the VM Thread, it does a serial adjust_roots() within the<br>
current thread (VM thread) during<br>
PSParallelCompact::invoke_no_policy().<br>
I think psCompactionManager.cpp:117 and the surrounding comments<br>
confirm the use of VMThread in full GC.<br>
Do you agree with my above understanding of the use of VMThread?<br>
<br>
</blockquote>
You are right :(<br>
<br>
There are multiple options to provide an additional per-thread context:<br>
<br>
- passing around some context. Looks like lots of work.<br>
</blockquote>
<br></div></div>
I actually think this is the correct way to go.<br>
In my mind you would only have to change ParCompactionMangager::update_contents to pass on the ParCompactionManager* through oopDesc::pc_update_contents to *Klass::oop_pc_update_contents<br>
It's similar to how the marking phase passes around the current worker's compaction manager.<br>
<br>
Then the AdjustPointerClosure needs to become a per-ParCompactionManager thing and then it's all set :)<span class="HOEnZb"><font color="#888888"><br>
<br>
/Mikael</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- change the code so that even that serial portion is performed by some<br>
GCTaskThread (which actually sounds best to me)<br>
- Another would be to add a field to both GCTaskThread and VMThread, and<br>
via a virtual method in Thread get the necessary values.<br>
- make VMThread a WorkerThread (that has an id that can be used to query<br>
an extra data structure for this cache)<br>
- others<br>
<br>
Let's see if other people have a better idea.<br>
<br>
Thanks,<br>
Thomas<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Lei Tianyang<div><br></div></div>
</div></div>