hotspot/src/share/vm/opto/runtime.hpp
author ysr
Fri, 16 Oct 2009 02:05:46 -0700
changeset 4030 4c471254865e
parent 1374 4c24294029a9
child 4637 af4d405aacc1
permissions -rw-r--r--
6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning 6889757: G1: enable card mark elision for initializing writes from compiled code (ReduceInitialCardMarks) Summary: Defer the (compiler-elided) card-mark upon a slow-path allocation until after the store and before the next subsequent safepoint; G1 now answers yes to can_elide_tlab_write_barriers(). Reviewed-by: jcoomes, kvn, never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
//------------------------------OptoRuntime------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
// Opto compiler runtime routines
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
// These are all generated from Ideal graphs.  They are called with the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
// Java calling convention.  Internally they call C++.  They are made once at
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
// startup time and Opto compiles calls to them later.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
// Things are broken up into quads: the signature they will be called with,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
// the address of the generated code, the corresponding C++ code and an
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
// nmethod.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
// The signature (returned by "xxx_Type()") is used at startup time by the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// Generator to make the generated code "xxx_Java".  Opto compiles calls
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
// to the generated code "xxx_Java".  When the compiled code gets executed,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
// it calls the C++ code "xxx_C".  The generated nmethod is saved in the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
// CodeCache.  Exception handlers use the nmethod to get the callee-save
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
// register OopMaps.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
class CallInfo;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
// NamedCounters are tagged counters which can be used for profiling
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
// code in various ways.  Currently they are used by the lock coarsening code
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
class NamedCounter : public CHeapObj {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
    enum CounterTag {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    NoTag,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
    LockCounter,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
    EliminatedLockCounter,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
    BiasedLockingCounter
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  const char *  _name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  int           _count;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  CounterTag    _tag;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  NamedCounter* _next;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  NamedCounter(const char *n, CounterTag tag = NoTag):
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    _name(n),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    _count(0),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    _next(NULL),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
    _tag(tag) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  const char * name() const     { return _name; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  int count() const             { return _count; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  address addr()                { return (address)&_count; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  CounterTag tag() const        { return _tag; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  void set_tag(CounterTag tag)  { _tag = tag; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  NamedCounter* next() const    { return _next; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  void set_next(NamedCounter* next) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    assert(_next == NULL, "already set");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    _next = next;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
class BiasedLockingNamedCounter : public NamedCounter {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  BiasedLockingCounters _counters;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  BiasedLockingNamedCounter(const char *n) :
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    NamedCounter(n, BiasedLockingCounter), _counters() {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  BiasedLockingCounters* counters() { return &_counters; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
typedef const TypeFunc*(*TypeFunc_generator)();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
class OptoRuntime : public AllStatic {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  friend class Matcher;  // allow access to stub names
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  // define stubs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  static address generate_stub(ciEnv* ci_env, TypeFunc_generator gen, address C_function, const char *name, int is_fancy_jump, bool pass_tls, bool save_arguments, bool return_pc);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  // References to generated stubs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  static address _new_instance_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  static address _new_array_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  static address _multianewarray2_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  static address _multianewarray3_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  static address _multianewarray4_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  static address _multianewarray5_Java;
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   111
  static address _g1_wb_pre_Java;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   112
  static address _g1_wb_post_Java;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  static address _vtable_must_compile_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  static address _complete_monitor_locking_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  static address _rethrow_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  static address _slow_arraycopy_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  static address _register_finalizer_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
# ifdef ENABLE_ZAP_DEAD_LOCALS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  static address _zap_dead_Java_locals_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  static address _zap_dead_native_locals_Java;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
# endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  // Implementation of runtime methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  // =================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // Allocate storage for a Java instance.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  static void new_instance_C(klassOopDesc* instance_klass, JavaThread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  // Allocate storage for a objArray or typeArray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  static void new_array_C(klassOopDesc* array_klass, int len, JavaThread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
4030
4c471254865e 6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
ysr
parents: 1374
diff changeset
   136
  // Post-slow-path-allocation step for implementing ReduceInitialCardMarks:
4c471254865e 6888898: CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
ysr
parents: 1374
diff changeset
   137
  static void maybe_defer_card_mark(JavaThread* thread);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  // Allocate storage for a multi-dimensional arrays
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  // Note: needs to be fixed for arbitrary number of dimensions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  static void multianewarray2_C(klassOopDesc* klass, int len1, int len2, JavaThread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  static void multianewarray3_C(klassOopDesc* klass, int len1, int len2, int len3, JavaThread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  static void multianewarray4_C(klassOopDesc* klass, int len1, int len2, int len3, int len4, JavaThread *thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  static void multianewarray5_C(klassOopDesc* klass, int len1, int len2, int len3, int len4, int len5, JavaThread *thread);
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   145
  static void g1_wb_pre_C(oopDesc* orig, JavaThread* thread);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   146
  static void g1_wb_post_C(void* card_addr, JavaThread* thread);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  // Slow-path Locking and Unlocking
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  // Implicit exception support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  static void throw_null_exception_C(JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  // Exception handling
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  static address handle_exception_C       (JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  static address handle_exception_C_helper(JavaThread* thread, nmethod*& nm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  static address rethrow_C                (oopDesc* exception, JavaThread *thread, address return_pc );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  static void deoptimize_caller_frame     (JavaThread *thread, bool doit);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  // CodeBlob support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  // ===================================================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  static ExceptionBlob*       _exception_blob;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  static void generate_exception_blob();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  static void register_finalizer(oopDesc* obj, JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  // zaping dead locals, either from Java frames or from native frames
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
# ifdef ENABLE_ZAP_DEAD_LOCALS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  static void zap_dead_Java_locals_C(   JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  static void zap_dead_native_locals_C( JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  static void zap_dead_java_or_native_locals( JavaThread*, bool (*)(frame*));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
   static int ZapDeadCompiledLocals_count;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
# endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  static bool is_callee_saved_register(MachRegisterNumbers reg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  // One time only generate runtime code stubs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  static void generate(ciEnv* env);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  // Returns the name of a stub
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  static const char* stub_name(address entry);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  // access to runtime stubs entry points for java code
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  static address new_instance_Java()                     { return _new_instance_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  static address new_array_Java()                        { return _new_array_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  static address multianewarray2_Java()                  { return _multianewarray2_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
  static address multianewarray3_Java()                  { return _multianewarray3_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  static address multianewarray4_Java()                  { return _multianewarray4_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  static address multianewarray5_Java()                  { return _multianewarray5_Java; }
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   202
  static address g1_wb_pre_Java()                        { return _g1_wb_pre_Java; }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   203
  static address g1_wb_post_Java()                       { return _g1_wb_post_Java; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  static address vtable_must_compile_stub()              { return _vtable_must_compile_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  static address complete_monitor_locking_Java()         { return _complete_monitor_locking_Java;   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  static address slow_arraycopy_Java()                   { return _slow_arraycopy_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  static address register_finalizer_Java()               { return _register_finalizer_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
# ifdef ENABLE_ZAP_DEAD_LOCALS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  static address zap_dead_locals_stub(bool is_native)    { return is_native
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
                                                                  ? _zap_dead_native_locals_Java
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
                                                                  : _zap_dead_Java_locals_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  static MachNode* node_to_call_zap_dead_locals(Node* n, int block_num, bool is_native);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
# endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  static ExceptionBlob*    exception_blob()                      { return _exception_blob; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  // Leaf routines helping with method data update
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  static void profile_receiver_type_C(DataLayout* data, oopDesc* receiver);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  // Implicit exception support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  static void throw_div0_exception_C      (JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  static void throw_stack_overflow_error_C(JavaThread* thread);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  // Exception handling
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  static address rethrow_stub()             { return _rethrow_Java; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  // Type functions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  // ======================================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  static const TypeFunc* new_instance_Type(); // object allocation (slow case)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  static const TypeFunc* new_array_Type ();   // [a]newarray (slow case)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  static const TypeFunc* multianewarray_Type(int ndim); // multianewarray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  static const TypeFunc* multianewarray2_Type(); // multianewarray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  static const TypeFunc* multianewarray3_Type(); // multianewarray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
  static const TypeFunc* multianewarray4_Type(); // multianewarray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  static const TypeFunc* multianewarray5_Type(); // multianewarray
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   241
  static const TypeFunc* g1_wb_pre_Type();
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 1
diff changeset
   242
  static const TypeFunc* g1_wb_post_Type();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  static const TypeFunc* complete_monitor_enter_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  static const TypeFunc* complete_monitor_exit_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  static const TypeFunc* uncommon_trap_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
  static const TypeFunc* athrow_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  static const TypeFunc* rethrow_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  static const TypeFunc* Math_D_D_Type();  // sin,cos & friends
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
  static const TypeFunc* Math_DD_D_Type(); // mod,pow & friends
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
  static const TypeFunc* modf_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
  static const TypeFunc* l2f_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
  static const TypeFunc* current_time_millis_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  static const TypeFunc* flush_windows_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  // arraycopy routine types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
  static const TypeFunc* fast_arraycopy_Type(); // bit-blasters
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  static const TypeFunc* checkcast_arraycopy_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  static const TypeFunc* generic_arraycopy_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  static const TypeFunc* slow_arraycopy_Type();   // the full routine
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  // leaf on stack replacement interpreter accessor types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  static const TypeFunc* osr_end_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  // leaf methodData routine types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  static const TypeFunc* profile_receiver_type_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  // leaf on stack replacement interpreter accessor types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  static const TypeFunc* fetch_int_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  static const TypeFunc* fetch_long_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  static const TypeFunc* fetch_float_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
  static const TypeFunc* fetch_double_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
  static const TypeFunc* fetch_oop_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  static const TypeFunc* fetch_monitor_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
  static const TypeFunc* register_finalizer_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  // Dtrace support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  static const TypeFunc* dtrace_method_entry_exit_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  static const TypeFunc* dtrace_object_alloc_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
# ifdef ENABLE_ZAP_DEAD_LOCALS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  static const TypeFunc* zap_dead_locals_Type();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
# endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
 static NamedCounter * volatile _named_counters;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
 // helper function which creates a named counter labeled with the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
 // if they are available
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
 static NamedCounter* new_named_counter(JVMState* jvms, NamedCounter::CounterTag tag);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
 // dumps all the named counters
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
 static void          print_named_counters();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
};