<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Thomas,</div> <br><p class="airmail_on" style="color:#000;">On June 25, 2015 at 4:36:08 PM, Thomas Schatzl (<a href="mailto:thomas.schatzl@oracle.com">thomas.schatzl@oracle.com</a>) wrote:</p> <div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div></div><div>Hi,<span class="Apple-converted-space"> </span><br><br>On Thu, 2015-06-25 at 13:06 -0700, Tony Printezis wrote:<span class="Apple-converted-space"> </span><br>> Thomas,<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Inline, towards the end.<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>[...]<span class="Apple-converted-space"> </span><br>> > You are right about this. However considering these are going to be<span class="Apple-converted-space"> </span><br>> > dead<span class="Apple-converted-space"> </span><br>> > objects, they will never be iterated over using the BOT in<span class="Apple-converted-space"> </span><br>> > performance<span class="Apple-converted-space"> </span><br>> > sensitive code.<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> I agree. But isn’t there an edge case? Imagine you have the sequence<span class="Apple-converted-space"> </span><br>> of D* dead objects, followed by A (a live object):<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 A<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Let’s say your code replaces the D* dead objects with two filler<span class="Apple-converted-space"> </span><br>> objects, F0 and F1:<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> F0 F1 A<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> If A’s start is in the middle of a card, in order to scan that card,<span class="Apple-converted-space"> </span><br>> won’t the BOT do more work to find the first object on that card given<span class="Apple-converted-space"> </span><br>> that it will have to look-up F0 which is further away? Also, note that<span class="Apple-converted-space"> </span><br>> the BOT look-up for A will actually NOT return the first object on<span class="Apple-converted-space"> </span><br>> that card (F0). Will that break any asserts?<span class="Apple-converted-space"> </span><br><br>actually there are cases when the code may try to scan random cards<span class="Apple-converted-space"> </span><br>within these regions anyway: remembered sets may contain stale entries<span class="Apple-converted-space"> </span><br>forever to these areas, so these objects may be scanned through<span class="Apple-converted-space"> </span><br>(needlessly).<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p><br></p><p>Yes.</p><p><br></p><div><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div><br>However this will likely be fast, as the code will likely create a<span class="Apple-converted-space"> </span><br>log-based slide on the BOT<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p><br></p><p>Yes, that iteration over the BOT to find F0 from A’s card was what I was a bit concerned about. F0 will always be larger than F1, so if you can actually try to look-up F1, instead of F0, you’ll always be better off. :-)</p><p><br></p><div><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div>for combined F0/F1. Catching up to A from F0<span class="Apple-converted-space"> </span><br>will be fast because there are just two objects in there now to iterate,<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p><br></p><p>The iteration over F0 / F1 was less of a concern (even though you’ll probably hit an extra cache miss or two).</p><p><br></p><div><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div><br>and after that first lookup of the start of A, the BOT will have been<span class="Apple-converted-space"> </span><br>fixed up.<span class="Apple-converted-space"> </span><br><br>I will fix it anyway for hygiene reasons,<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p><br></p><p>Cool.</p><p><br></p><div><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div>it will not be the nicest code<span class="Apple-converted-space"> </span><br>but do the job. Still a lot faster than trying to fix up the BOT for<span class="Apple-converted-space"> </span><br>every tiny object as done previously. :)<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p><br></p><p>Agreed, this is a good change.</p><p><br></p><p>Tony</p><p><br></p><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span><div><div><br>Thanks,<span class="Apple-converted-space"> </span><br>Thomas<span class="Apple-converted-space"> </span><br><br><br></div></div></span></blockquote><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div> <div id="bloop_sign_1435267740359642880" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px"><div>-----</div><div><br></div><div>Tony Printezis | JVM/GC Engineer / VM Team | Twitter</div><div><br></div><div>@TonyPrintezis</div><div><a href="mailto:tprintezis@twitter.com">tprintezis@twitter.com</a></div><div><br></div></div></div></body></html>