< prev index next >

src/hotspot/share/c1/c1_IR.hpp

Print this page
rev 60137 : 8227745: Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
Reviewed-by: mdoerr, goetz
   1 /*
   2  * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 227   GrowableArray<ScopeValue*>*   locals()      { return _locals;      }
 228   GrowableArray<ScopeValue*>*   expressions() { return _expressions; }
 229   GrowableArray<MonitorValue*>* monitors()    { return _monitors;    }
 230   IRScopeDebugInfo*             caller()      { return _caller;      }
 231 
 232   //Whether we should reexecute this bytecode for deopt
 233   bool should_reexecute();
 234 
 235   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool topmost, bool is_method_handle_invoke = false) {
 236     if (caller() != NULL) {
 237       // Order is significant:  Must record caller first.
 238       caller()->record_debug_info(recorder, pc_offset, false/*topmost*/);
 239     }
 240     DebugToken* locvals = recorder->create_scope_values(locals());
 241     DebugToken* expvals = recorder->create_scope_values(expressions());
 242     DebugToken* monvals = recorder->create_monitor_values(monitors());
 243     // reexecute allowed only for the topmost frame
 244     bool reexecute = topmost ? should_reexecute() : false;
 245     bool return_oop = false; // This flag will be ignored since it used only for C2 with escape analysis.
 246     bool rethrow_exception = false;
 247     recorder->describe_scope(pc_offset, methodHandle(), scope()->method(), bci(), reexecute, rethrow_exception, is_method_handle_invoke, return_oop, locvals, expvals, monvals);




 248   }
 249 };
 250 
 251 
 252 class CodeEmitInfo: public CompilationResourceObj {
 253   friend class LinearScan;
 254  private:
 255   IRScopeDebugInfo* _scope_debug_info;
 256   IRScope*          _scope;
 257   XHandlers*        _exception_handlers;
 258   OopMap*           _oop_map;
 259   ValueStack*       _stack;                      // used by deoptimization (contains also monitors
 260   bool              _is_method_handle_invoke;    // true if the associated call site is a MethodHandle call site.
 261   bool              _deoptimize_on_exception;
 262 
 263   FrameMap*     frame_map() const                { return scope()->compilation()->frame_map(); }
 264   Compilation*  compilation() const              { return scope()->compilation(); }
 265 
 266  public:
 267 


   1 /*
   2  * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 227   GrowableArray<ScopeValue*>*   locals()      { return _locals;      }
 228   GrowableArray<ScopeValue*>*   expressions() { return _expressions; }
 229   GrowableArray<MonitorValue*>* monitors()    { return _monitors;    }
 230   IRScopeDebugInfo*             caller()      { return _caller;      }
 231 
 232   //Whether we should reexecute this bytecode for deopt
 233   bool should_reexecute();
 234 
 235   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool topmost, bool is_method_handle_invoke = false) {
 236     if (caller() != NULL) {
 237       // Order is significant:  Must record caller first.
 238       caller()->record_debug_info(recorder, pc_offset, false/*topmost*/);
 239     }
 240     DebugToken* locvals = recorder->create_scope_values(locals());
 241     DebugToken* expvals = recorder->create_scope_values(expressions());
 242     DebugToken* monvals = recorder->create_monitor_values(monitors());
 243     // reexecute allowed only for the topmost frame
 244     bool reexecute = topmost ? should_reexecute() : false;
 245     bool return_oop = false; // This flag will be ignored since it used only for C2 with escape analysis.
 246     bool rethrow_exception = false;
 247     bool not_global_escape_in_scope = false;
 248     bool arg_escape = false;
 249     recorder->describe_scope(pc_offset, methodHandle(), scope()->method(), bci(),
 250                              reexecute, rethrow_exception, is_method_handle_invoke, return_oop,
 251                              not_global_escape_in_scope, arg_escape, locvals, expvals, monvals);
 252   }
 253 };
 254 
 255 
 256 class CodeEmitInfo: public CompilationResourceObj {
 257   friend class LinearScan;
 258  private:
 259   IRScopeDebugInfo* _scope_debug_info;
 260   IRScope*          _scope;
 261   XHandlers*        _exception_handlers;
 262   OopMap*           _oop_map;
 263   ValueStack*       _stack;                      // used by deoptimization (contains also monitors
 264   bool              _is_method_handle_invoke;    // true if the associated call site is a MethodHandle call site.
 265   bool              _deoptimize_on_exception;
 266 
 267   FrameMap*     frame_map() const                { return scope()->compilation()->frame_map(); }
 268   Compilation*  compilation() const              { return scope()->compilation(); }
 269 
 270  public:
 271 


< prev index next >