<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Vitaly,<br>
    <br>
    yes, but the comment only says that we don't need any _method_ code
    heaps. Of course we do need the non-nmethod code heap (for example
    to store the interpreter).<br>
    <br>
    Best,<br>
    Tobias<br>
    <br>
    <div class="moz-cite-prefix">On 03.10.2014 14:29, Vitaly Davidovich
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAHjP37GzQW3QZr743DMdw9ELJvZyy0ixvXXYcCW9dApJTps6ug@mail.gmail.com"
      type="cite">
      <p dir="ltr">Ok.  The reason I mentioned this is because of these
        lines right below the one you changed:</p>
      <p dir="ltr">264     // No TieredCompilation: we only need the
        non-nmethod and non-profiled code heap<br>
        265     return (code_blob_type == CodeBlobType::NonNMethod) ||<br>
        266            (code_blob_type ==
        CodeBlobType::MethodNonProfiled);</p>
      <p dir="ltr">That one mentions that it needs non-nmethod heap, so
        thought similar comment was warranted in your change.  But you
        know better than me :).</p>
      <p dir="ltr">Thanks<br>
        Sent from my phone</p>
      <div class="gmail_quote">On Oct 3, 2014 3:47 AM, "Tobias Hartmann"
        <<a moz-do-not-send="true"
          href="mailto:tobias.hartmann@oracle.com">tobias.hartmann@oracle.com</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> Hi Vitaly,<br>
            <br>
            thanks for the feedback.<br>
            <br>
            <div>On 02.10.2014 18:21, Vitaly Davidovich wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hi Tobias,
                <div><br>
                </div>
                <div>
                  <pre style="color:rgb(0,0,0);background-color:rgb(238,238,238)"><span style="color:blue"> } else if (Arguments::mode() == Arguments::_int) {</span>

 258     // Interpreter only: we don't need any method code heaps
 259     return (code_blob_type == CodeBlobType::NonNMethod);</pre>
                </div>
                <div class="gmail_extra"><br>
                </div>
                <div class="gmail_extra">Minor point, but perhaps the
                  comment should be amended?</div>
              </div>
            </blockquote>
            <br>
            The comment is still correct because we don't need any
            method code heaps in interpreter-only mode.<br>
            <br>
            However, if TieredStopAtLevel=0 is set, we are not in
            interpreter-only mode and therefore need the non-profiled
            code heap (we exit through the else branch annotated with
            "No TieredCompilation").<br>
            <br>
            Best,<br>
            Tobias<br>
            <br>
            <blockquote type="cite">
              <div dir="ltr">
                <div class="gmail_extra"><br>
                </div>
                <div class="gmail_extra">Thanks</div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Thu, Oct 2, 2014 at 7:49
                    AM, Tobias Hartmann <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:tobias.hartmann@oracle.com"
                        target="_blank">tobias.hartmann@oracle.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF"> Hi,<br>
                        <br>
                        please review the following patch.<br>
                        <br>
                        Bug: <a moz-do-not-send="true"
                          href="https://bugs.openjdk.java.net/browse/JDK-8059559"
                          target="_blank">https://bugs.openjdk.java.net/browse/JDK-8059559</a><br>
                        Webrev: <a moz-do-not-send="true"
                          href="http://cr.openjdk.java.net/%7Ethartmann/8059559/webrev.00/"
                          target="_blank">http://cr.openjdk.java.net/~thartmann/8059559/webrev.00/</a><br>
                        <br>
                        Problem:<br>
                        'CodeCache::heap_available' assumes that with
                        '-XX:TieredStopAtLevel=0' we only use the
                        interpreter. This is wrong because we still
                        generate compiled forms of method handle
                        intrinsics (see
                        'SystemDictionary::find_method_handle_intrinsic').
                        We therefore need to create the non-profiled
                        code heap.<br>
                        <br>
                        Solution:<br>
                        Change 'CodeCache::heap_available' to create the
                        non-profiled code heap if TieredStopAtLevel=0 is
                        set. I also adapted the test '
                        compiler/codecache/CheckSegmentedCodeCache'.<br>
                        <br>
                        Thanks,<br>
                        Tobias<br>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>