<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Yes, David suggested the same.<br>
      Your emails crossed.<br>
      <br>
      Thanks,<br>
      Serguei<br>
      <br>
      On 1/30/19 21:22, Igor Ignatyev wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:690A8E3B-1B24-4193-9B93-F21B687FE57B@oracle.com">from my
      point of view, having the following code at the end
      of JvmtiManageCapabilities::init_onload_capabilities is much clear
      and easier to understand:
      <div class=""><br class="">
      </div>
      <div class="">
        <blockquote type="cite" class="">
          <div class="">// Workaround for 8195635: disable pop_frame and
            force_early_return capabilities</div>
        </blockquote>
        <blockquote type="cite" class="">
          <div class="">#if INCLUDE_JVMCI</div>
          <div class="">  if (UseJVMCICompiler) {</div>
          <div class="">    jc.can_pop_frame = 0;</div>
          <div class="">    jc.can_force_early_return = 0;</div>
          <div class="">  }</div>
          <div class="">#endif // INCLUDE_JVMCI</div>
        </blockquote>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">Thanks,</div>
      <div class="">-- Igor</div>
      <div class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On Jan 30, 2019, at 9:18 PM, <a
                href="mailto:dean.long@oracle.com" class=""
                moz-do-not-send="true">dean.long@oracle.com</a> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div class=""> On 1/30/19 8:59 PM, <a
                  class="moz-txt-link-abbreviated"
                  href="mailto:serguei.spitsyn@oracle.com"
                  moz-do-not-send="true">serguei.spitsyn@oracle.com</a>
                wrote:<br class="">
                <blockquote type="cite"
                  cite="mid:7afec9a8-602c-9d5b-f899-b806595ad859@oracle.com"
                  class=""> So, the fix needs to be more like this:<br
                    class="">
                  <pre class=""><span class="new">+  // Workaround for 8195635:</span>
<span class="new">+  // disable pop_frame and force_early_return capabilities with Graal</span>
+ #if INCLUDE_JVMCI
<span class="new">+  if (!</span><span class="new">(EnableJVMCI && UseJVMCICompiler)) {</span>
   jc.can_pop_frame = 1;
   jc.can_force_early_return = 1;
<span class="new">+  }
+ #endif

Not sure, if the check for </span><span class="new">EnableJVMCI can be removed above.</span></pre>
                </blockquote>
                <br class="">
                We still need it to work when INCLUDE_JVMCI is not
                defined.<br class="">
                How about<br class="">
                <br class="">
                JVMCI_ONLY(if (UseJVMCICompiler)) {<br class="">
                ...<br class="">
                }<br class="">
                <br class="">
                or<br class="">
                <br class="">
                if (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(true)) {<br
                  class="">
                ...<br class="">
                }<br class="">
                <br class="">
                dl<br class="">
                <br class="">
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <br>
  </body>
</html>