<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks.  Would you like to add comments as suggested by Boris?  I
    think it's a good idea.<br>
    <br>
    dl<br>
    <br>
    <div class="moz-cite-prefix">On 12/16/18 6:00 PM, Nick Gasson (Arm
      Technology China) wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB6PR0801MB2072D4217CD81BE21515DFA0EDBC0@DB6PR0801MB2072.eurprd08.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi Dean,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Sorry for the delay. This is submitted on
          behalf of ARM Ltd.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks,<o:p></o:p></p>
        <p class="MsoNormal">Nick<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div style="border:none;border-left:solid blue 1.5pt;padding:0cm
          0cm 0cm 4.0pt">
          <div>
            <div style="border:none;border-top:solid #E1E1E1
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:dean.long@oracle.com">dean.long@oracle.com</a>
                <a class="moz-txt-link-rfc2396E" href="mailto:dean.long@oracle.com"><dean.long@oracle.com></a> <br>
                <b>Sent:</b> 13 December 2018 12:01<br>
                <b>To:</b> Nick Gasson (Arm Technology China)
                <a class="moz-txt-link-rfc2396E" href="mailto:Nick.Gasson@arm.com"><Nick.Gasson@arm.com></a>;
                <a class="moz-txt-link-abbreviated" href="mailto:hotspot-dev@openjdk.java.net">hotspot-dev@openjdk.java.net</a>; Boris Ulasevich
                <a class="moz-txt-link-rfc2396E" href="mailto:boris.ulasevich@bell-sw.com"><boris.ulasevich@bell-sw.com></a><br>
                <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:hotspot-compiler-dev@openjdk.java.net">hotspot-compiler-dev@openjdk.java.net</a>
                compiler <a class="moz-txt-link-rfc2396E" href="mailto:hotspot-compiler-dev@openjdk.java.net"><hotspot-compiler-dev@openjdk.java.net></a>;
                nd <a class="moz-txt-link-rfc2396E" href="mailto:nd@arm.com"><nd@arm.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:aarch32-port-dev@openjdk.java.net">aarch32-port-dev@openjdk.java.net</a><br>
                <b>Subject:</b> Re: RFR: 8214512: Jtreg test
                compiler/c2/Test8062950.java fails on ARM32<o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt">Nick, can
            you please confirm that you are covered under the<o:p></o:p></p>
          <p class="MsoNormal"><span style="font-family:Symbol">·</span> 
            ARM Ltd. - OpenJDK, MySQL
            <o:p></o:p></p>
          <div>
            <p class="MsoNormal"><br>
              OCA agreement?  I'm guessing Arm Technology China is under
              ARM Ltd., judging<br>
              by your email domain, but please confirm.<br>
              <br>
              dl<br>
              <br>
              On 12/11/18 5:30 PM, <a
                href="mailto:dean.long@oracle.com"
                moz-do-not-send="true">dean.long@oracle.com</a> wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal">I can help you commit it, but first I
              think another review would be good.
              <br>
              <br>
              dl <br>
              <br>
              On 12/11/18 5:15 PM, Nick Gasson (Arm Technology China)
              wrote: <br>
              <br>
              <o:p></o:p></p>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal">Hi Nick.  This change looks good to
                  me. <o:p></o:p></p>
              </blockquote>
              <p class="MsoNormal">Thanks Dean. Could you help me to
                commit this patch if it doesn't need other reviews?
                <br>
                <br>
                Nick <br>
                <br>
                <br>
                <br>
                <o:p></o:p></p>
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal">-----Original Message----- <br>
                  From: <a href="mailto:dean.long@oracle.com"
                    moz-do-not-send="true">dean.long@oracle.com</a> <a
                    href="mailto:dean.long@oracle.com"
                    moz-do-not-send="true">
                    <dean.long@oracle.com></a> <br>
                  Sent: 12 December 2018 06:05 <br>
                  To: Nick Gasson (Arm Technology China) <a
                    href="mailto:Nick.Gasson@arm.com"
                    moz-do-not-send="true"><Nick.Gasson@arm.com></a>;
                  hotspot-
                  <br>
                  <a href="mailto:dev@openjdk.java.net"
                    moz-do-not-send="true">dev@openjdk.java.net</a>;
                  Boris Ulasevich <a
                    href="mailto:boris.ulasevich@bell-sw.com"
                    moz-do-not-send="true">
                    <boris.ulasevich@bell-sw.com></a> <br>
                  Cc: nd <a href="mailto:nd@arm.com"
                    moz-do-not-send="true"><nd@arm.com></a>; <a
                    href="mailto:hotspot-compiler-dev@openjdk.java.net"
                    moz-do-not-send="true">
                    hotspot-compiler-dev@openjdk.java.net</a> compiler <br>
                  <a href="mailto:hotspot-compiler-dev@openjdk.java.net"
                    moz-do-not-send="true"><hotspot-compiler-dev@openjdk.java.net></a>;
                  aarch32-port-
                  <br>
                  <a href="mailto:dev@openjdk.java.net"
                    moz-do-not-send="true">dev@openjdk.java.net</a> <br>
                  Subject: Re: RFR: 8214512: Jtreg test
                  compiler/c2/Test8062950.java fails on <br>
                  ARM32 <br>
                  <br>
                  Hi Nick.  This change looks good to me. <br>
                  <br>
                  dl <br>
                  <br>
                  On 12/2/18 10:06 PM, Nick Gasson wrote: <br>
                  <br>
                  <o:p></o:p></p>
                <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                  <p class="MsoNormal">Hi, <br>
                    <br>
                    Could someone please help me review this fix for a
                    test failure on ARM32: <br>
                    <br>
                    Bug: <a
                      href="https://bugs.openjdk.java.net/browse/JDK-8214512"
                      moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8214512</a>
                    <br>
                    Webrev: <a
                      href="http://cr.openjdk.java.net/~njian/8214512/webrev.0/"
                      moz-do-not-send="true">http://cr.openjdk.java.net/~njian/8214512/webrev.0/</a>
                    <br>
                    <br>
                    This fixes two assertion failures related to biased
                    locking when C2's <br>
                    bias inlining feature is disabled
                    (-XX:-OptoBiasInlining): <br>
                    <br>
                    MacroAssembler::atomic_cas_bool takes three register
                    arguments plus a <br>
                    temporary register for use in the CAS loop. If the
                    caller passes <br>
                    `noreg' as this temporary register (which happens in
                    the <br>
                    !OptoBiasInlining call path from
                    MacroAssembler::fast_lock) then <br>
                    MacroAssembler::atomic_cas_bool will default to
                    using LR as a <br>
                    temporary. But it's possible with C2 that LR is one
                    of the other three <br>
                    arguments which then triggers an
                    assert_different_registers assertion <br>
                    failure. Fix this by supplying an additional scratch
                    register to <br>
                    MacroAssembler::fast_lock if !OptoBiasInlining. <br>
                    <br>
                    In the !OptoBiasInlining case
                    MacroAssembler::fast_lock calls <br>
                    MacroAssembler::biased_locking_enter to handle the
                    case where the mark <br>
                    word contains the biased lock pattern which
                    fast_lock wouldn't <br>
                    otherwise see if OptoBiasInlining was true. However
                    in the case that <br>
                    we fail to acquire the biased lock this falls
                    through to label <br>
                    `failed' and runs the normal fast_lock code that
                    implicitly assumes <br>
                    the mark word does not have the bias pattern. This
                    means we can end up <br>
                    with a BasicLock where _displaced_header contains
                    the biased lock <br>
                    pattern which is an illegal state and subsequently
                    triggers an <br>
                    assertion failure in ObjectSynchronizer::fast_exit.
                    <br>
                    <br>
                    The right thing to do here is branch to `done'
                    whenever the bias lock <br>
                    pattern is present and let the runtime handle the
                    failure case.  Also <br>
                    edited the comment describing
                    MacroAssembler::biased_locking_enter to <br>
                    more accurately describe what it does (the comment
                    about `slow_case' <br>
                    being optional is wrong). <br>
                    <br>
                    Jtreg test compiler/c2/Test8062950.java now passes
                    on ARM32 with this <br>
                    patch. <br>
                    <br>
                    Thanks, <br>
                    Nick <o:p></o:p></p>
                </blockquote>
              </blockquote>
            </blockquote>
            <p class="MsoNormal"><o:p> </o:p></p>
          </blockquote>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>