src/share/vm/opto/runtime.hpp

Print this page


   1 /*
   2  * Copyright (c) 1998, 2007, 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  *
  23  */
  24 










  25 //------------------------------OptoRuntime------------------------------------
  26 // Opto compiler runtime routines
  27 //
  28 // These are all generated from Ideal graphs.  They are called with the
  29 // Java calling convention.  Internally they call C++.  They are made once at
  30 // startup time and Opto compiles calls to them later.
  31 // Things are broken up into quads: the signature they will be called with,
  32 // the address of the generated code, the corresponding C++ code and an
  33 // nmethod.
  34 
  35 // The signature (returned by "xxx_Type()") is used at startup time by the
  36 // Generator to make the generated code "xxx_Java".  Opto compiles calls
  37 // to the generated code "xxx_Java".  When the compiled code gets executed,
  38 // it calls the C++ code "xxx_C".  The generated nmethod is saved in the
  39 // CodeCache.  Exception handlers use the nmethod to get the callee-save
  40 // register OopMaps.
  41 class CallInfo;
  42 
  43 //
  44 // NamedCounters are tagged counters which can be used for profiling


 281   // Dtrace support
 282   static const TypeFunc* dtrace_method_entry_exit_Type();
 283   static const TypeFunc* dtrace_object_alloc_Type();
 284 
 285 # ifdef ENABLE_ZAP_DEAD_LOCALS
 286   static const TypeFunc* zap_dead_locals_Type();
 287 # endif
 288 
 289  private:
 290  static NamedCounter * volatile _named_counters;
 291 
 292  public:
 293  // helper function which creates a named counter labeled with the
 294  // if they are available
 295  static NamedCounter* new_named_counter(JVMState* jvms, NamedCounter::CounterTag tag);
 296 
 297  // dumps all the named counters
 298  static void          print_named_counters();
 299 
 300 };


   1 /*
   2  * Copyright (c) 1998, 2010, 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  *
  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_RUNTIME_HPP
  26 #define SHARE_VM_OPTO_RUNTIME_HPP
  27 
  28 #include "code/codeBlob.hpp"
  29 #include "opto/machnode.hpp"
  30 #include "opto/type.hpp"
  31 #include "runtime/biasedLocking.hpp"
  32 #include "runtime/deoptimization.hpp"
  33 #include "runtime/vframe.hpp"
  34 
  35 //------------------------------OptoRuntime------------------------------------
  36 // Opto compiler runtime routines
  37 //
  38 // These are all generated from Ideal graphs.  They are called with the
  39 // Java calling convention.  Internally they call C++.  They are made once at
  40 // startup time and Opto compiles calls to them later.
  41 // Things are broken up into quads: the signature they will be called with,
  42 // the address of the generated code, the corresponding C++ code and an
  43 // nmethod.
  44 
  45 // The signature (returned by "xxx_Type()") is used at startup time by the
  46 // Generator to make the generated code "xxx_Java".  Opto compiles calls
  47 // to the generated code "xxx_Java".  When the compiled code gets executed,
  48 // it calls the C++ code "xxx_C".  The generated nmethod is saved in the
  49 // CodeCache.  Exception handlers use the nmethod to get the callee-save
  50 // register OopMaps.
  51 class CallInfo;
  52 
  53 //
  54 // NamedCounters are tagged counters which can be used for profiling


 291   // Dtrace support
 292   static const TypeFunc* dtrace_method_entry_exit_Type();
 293   static const TypeFunc* dtrace_object_alloc_Type();
 294 
 295 # ifdef ENABLE_ZAP_DEAD_LOCALS
 296   static const TypeFunc* zap_dead_locals_Type();
 297 # endif
 298 
 299  private:
 300  static NamedCounter * volatile _named_counters;
 301 
 302  public:
 303  // helper function which creates a named counter labeled with the
 304  // if they are available
 305  static NamedCounter* new_named_counter(JVMState* jvms, NamedCounter::CounterTag tag);
 306 
 307  // dumps all the named counters
 308  static void          print_named_counters();
 309 
 310 };
 311 
 312 #endif // SHARE_VM_OPTO_RUNTIME_HPP