src/hotspot/share/runtime/vframeArray.hpp
author vromero
Mon, 08 Oct 2018 06:52:41 -0700
changeset 52038 957de5be48bc
parent 49480 d7df2dd501ce
child 53244 9807daeb47c4
permissions -rw-r--r--
8209407: VerifyError is thrown for inner class with lambda Reviewed-by: mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
1
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
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3795
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3795
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3795
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_RUNTIME_VFRAMEARRAY_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_RUNTIME_VFRAMEARRAY_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 47216
diff changeset
    28
#include "memory/allocation.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "oops/arrayOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "runtime/deoptimization.hpp"
49480
d7df2dd501ce 8199809: Don't include frame.inline.hpp and other.inline.hpp from .hpp files
coleenp
parents: 49392
diff changeset
    31
#include "runtime/frame.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "runtime/monitorChunk.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    33
#include "utilities/growableArray.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
// A vframeArray is an array used for momentarily storing off stack Java method activations
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// during deoptimization. Essentially it is an array of vframes where each vframe
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
// data is stored off stack. This structure will never exist across a safepoint so
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
// there is no need to gc any oops that are stored in the structure.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
class LocalsClosure;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
class ExpressionStackClosure;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
class MonitorStackClosure;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
class MonitorArrayElement;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
class StackValueCollection;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
// A vframeArrayElement is an element of a vframeArray. Each element
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
// represent an interpreter frame which will eventually be created.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 47216
diff changeset
    50
class vframeArrayElement {
10547
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 9636
diff changeset
    51
  friend class VMStructs;
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 9636
diff changeset
    52
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    frame _frame;                                                // the interpreter frame we will unpack into
3600
27aa4477d039 6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents: 1
diff changeset
    56
    int  _bci;                                                   // raw bci for this vframe
22551
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 22234
diff changeset
    57
    bool _reexecute;                                             // whether we should reexecute this bytecode
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
    58
    Method*    _method;                                          // the method for this vframe
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    MonitorChunk* _monitors;                                     // active monitors for this vframe
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    StackValueCollection* _locals;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    StackValueCollection* _expressions;
28039
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
    62
#ifdef ASSERT
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
    63
    bool _removed_monitors;
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
    64
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  frame* iframe(void)                { return &_frame; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  int bci(void) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  int raw_bci(void) const            { return _bci; }
3600
27aa4477d039 6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents: 1
diff changeset
    73
  bool should_reexecute(void) const  { return _reexecute; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13195
diff changeset
    75
  Method* method(void) const       { return _method; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  MonitorChunk* monitors(void) const { return _monitors; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  void free_monitors(JavaThread* jt);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  StackValueCollection* locals(void) const             { return _locals; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  StackValueCollection* expressions(void) const        { return _expressions; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
28039
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
    85
  void fill_in(compiledVFrame* vf, bool realloc_failures);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // Formerly part of deoptimizedVFrame
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  // Returns the on stack word size for this frame
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  // callee_parameters is the number of callee locals residing inside this frame
24018
77b156916bab 8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9
roland
parents: 22551
diff changeset
    92
  int on_stack_size(int callee_parameters,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
                    int callee_locals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
                    bool is_top_frame,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
                    int popframe_extra_stack_expression_els) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  // Unpacks the element to skeletal interpreter frame
9636
363ca5579aff 7043461: VM crashes in void LinkResolver::runtime_resolve_virtual_method
never
parents: 7397
diff changeset
    98
  void unpack_on_stack(int caller_actual_parameters,
363ca5579aff 7043461: VM crashes in void LinkResolver::runtime_resolve_virtual_method
never
parents: 7397
diff changeset
    99
                       int callee_parameters,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
                       int callee_locals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
                       frame* caller,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
                       bool is_top_frame,
15943
d830a939d985 8009761: Deoptimization on sparc doesn't set Llast_SP correctly in the interpreter frames it creates
roland
parents: 13728
diff changeset
   103
                       bool is_bottom_frame,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
                       int exec_mode);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
28039
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   106
#ifdef ASSERT
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   107
  void set_removed_monitors() {
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   108
    _removed_monitors = true;
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   109
  }
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   110
#endif
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   111
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  void print(outputStream* st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
#endif /* PRODUCT */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
// this can be a ResourceObj if we don't save the last one...
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
// but it does make debugging easier even if we can't look
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
// at the data in each vframeElement
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 10547
diff changeset
   121
class vframeArray: public CHeapObj<mtCompiler> {
10547
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 9636
diff changeset
   122
  friend class VMStructs;
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 9636
diff changeset
   123
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  // Here is what a vframeArray looks like in memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  /*
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
      fixed part
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
        description of the original frame
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
        _frames - number of vframes in this array
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
        adapter info
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
        callee register save area
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
      variable part
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
        vframeArrayElement   [ 0 ]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
        ...
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
        vframeArrayElement   [_frames - 1]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  JavaThread*                  _owner_thread;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  vframeArray*                 _next;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  frame                        _original;          // the original frame of the deoptee
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  frame                        _caller;            // caller of root frame in vframeArray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  frame                        _sender;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  Deoptimization::UnrollBlock* _unroll_block;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  int                          _frame_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  int                          _frames; // number of javavframes in the array (does not count any adapter)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  intptr_t                     _callee_registers[RegisterMap::reg_count];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  unsigned char                _valid[RegisterMap::reg_count];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  vframeArrayElement           _elements[1];   // First variable section.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  void fill_in_element(int index, compiledVFrame* vf);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  bool is_location_valid(int i) const        { return _valid[i] != 0; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  void set_location_valid(int i, bool valid) { _valid[i] = valid; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  // Tells whether index is within bounds.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  bool is_within_bounds(int index) const        { return 0 <= index && index < frames(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
22551
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 22234
diff changeset
   169
  // Accessories for instance variable
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  int frames() const                            { return _frames;   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  static vframeArray* allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk,
28039
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   173
                               RegisterMap* reg_map, frame sender, frame caller, frame self,
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   174
                               bool realloc_failures);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  vframeArrayElement* element(int index)        { assert(is_within_bounds(index), "Bad index"); return &_elements[index]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  // Allocates a new vframe in the array and fills the array with vframe information in chunk
28039
bf5a8340bf8a 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
roland
parents: 24018
diff changeset
   180
  void fill_in(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk, const RegisterMap *reg_map, bool realloc_failures);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  // Returns the owner of this vframeArray
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  JavaThread* owner_thread() const           { return _owner_thread; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  // Accessors for next
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  vframeArray* next() const                  { return _next; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  void set_next(vframeArray* value)          { _next = value; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  // Accessors for sp
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  intptr_t* sp() const                       { return _original.sp(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
49480
d7df2dd501ce 8199809: Don't include frame.inline.hpp and other.inline.hpp from .hpp files
coleenp
parents: 49392
diff changeset
   192
  intptr_t* unextended_sp() const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  address original_pc() const                { return _original.pc(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  frame original() const                     { return _original; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  frame caller() const                       { return _caller; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  frame sender() const                       { return _sender; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  // Accessors for unroll block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  Deoptimization::UnrollBlock* unroll_block() const         { return _unroll_block; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  void set_unroll_block(Deoptimization::UnrollBlock* block) { _unroll_block = block; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  // Returns the size of the frame that got deoptimized
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  int frame_size() const { return _frame_size; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  // Unpack the array on the stack passed in stack interval
9636
363ca5579aff 7043461: VM crashes in void LinkResolver::runtime_resolve_virtual_method
never
parents: 7397
diff changeset
   210
  void unpack_to_stack(frame &unpack_frame, int exec_mode, int caller_actual_parameters);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  // Deallocates monitor chunks allocated during deoptimization.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  // This should be called when the array is not used anymore.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  void deallocate_monitor_chunks();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  // Accessor for register map
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  address register_location(int i) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  void print_on_2(outputStream* st) PRODUCT_RETURN;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  void print_value_on(outputStream* st) const PRODUCT_RETURN;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  // Comparing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  bool structural_compare(JavaThread* thread, GrowableArray<compiledVFrame*>* chunk);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   230
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   231
#endif // SHARE_VM_RUNTIME_VFRAMEARRAY_HPP