src/hotspot/cpu/zero/frame_zero.cpp
author jlahoda
Tue, 24 Sep 2019 15:40:26 +0200
branchJDK-8226585-branch
changeset 58290 d885633d9de4
parent 57811 947252a54b98
permissions -rw-r--r--
Converting the test to a combo-framework test.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
46589
f1c04490ded1 8182848: Some functions misplaced in debug.hpp
coleenp
parents: 38166
diff changeset
     2
 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
     3
 * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     5
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     8
 * published by the Free Software Foundation.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     9
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    14
 * accompanied this code).
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    15
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    19
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5425
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5425
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5425
diff changeset
    22
 * questions.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    23
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    24
 */
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    25
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
#include "code/scopeDesc.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "interpreter/interpreter.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "interpreter/interpreterRuntime.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "memory/resourceArea.hpp"
54786
ebf733a324d4 8223624: Cleanup includes of universe.hpp
stefank
parents: 47687
diff changeset
    31
#include "memory/universe.hpp"
57811
947252a54b98 8229838: Rename markOop files to markWord
stefank
parents: 54786
diff changeset
    32
#include "oops/markWord.hpp"
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 11571
diff changeset
    33
#include "oops/method.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
#include "oops/oop.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#include "runtime/frame.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#include "runtime/handles.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
#include "runtime/javaCalls.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    38
#include "runtime/monitorChunk.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#include "runtime/signature.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
#include "runtime/stubCodeGenerator.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#include "runtime/stubRoutines.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    42
#include "vmreg_zero.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    43
#ifdef COMPILER1
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    44
#include "c1/c1_Runtime1.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    45
#include "runtime/vframeArray.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    46
#endif
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    47
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    48
#ifdef ASSERT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    49
void RegisterMap::check_location_valid() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    50
  ShouldNotCallThis();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    51
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
#endif
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    53
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    54
bool frame::is_interpreted_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
  return zeroframe()->is_interpreter_frame();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
5425
3f8de5a243d2 6950617: Zero/Shark interface updates
twisti
parents: 5418
diff changeset
    58
bool frame::is_fake_stub_frame() const {
3f8de5a243d2 6950617: Zero/Shark interface updates
twisti
parents: 5418
diff changeset
    59
  return zeroframe()->is_fake_stub_frame();
3f8de5a243d2 6950617: Zero/Shark interface updates
twisti
parents: 5418
diff changeset
    60
}
3f8de5a243d2 6950617: Zero/Shark interface updates
twisti
parents: 5418
diff changeset
    61
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
frame frame::sender_for_entry_frame(RegisterMap *map) const {
4448
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    63
  assert(zeroframe()->is_entry_frame(), "wrong type of frame");
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    64
  assert(map != NULL, "map must be set");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    65
  assert(!entry_frame_is_first(), "next Java fp must be non zero");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    66
  assert(entry_frame_call_wrapper()->anchor()->last_Java_sp() == sender_sp(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    67
         "sender should be next Java frame");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    68
  map->clear();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    69
  assert(map->include_argument_oops(), "should be set by clear");
5418
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 4448
diff changeset
    70
  return frame(zeroframe()->next(), sender_sp());
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
4448
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    73
frame frame::sender_for_nonentry_frame(RegisterMap *map) const {
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    74
  assert(zeroframe()->is_interpreter_frame() ||
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    75
         zeroframe()->is_fake_stub_frame(), "wrong type of frame");
5418
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 4448
diff changeset
    76
  return frame(zeroframe()->next(), sender_sp());
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    77
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    78
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
frame frame::sender(RegisterMap* map) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    80
  // Default is not to follow arguments; the various
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    81
  // sender_for_xxx methods update this accordingly.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    82
  map->set_include_argument_oops(false);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    83
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    84
  if (is_entry_frame())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
    return sender_for_entry_frame(map);
4448
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    86
  else
d6ec2737186c 6896043: first round of zero fixes
twisti
parents: 4013
diff changeset
    87
    return sender_for_nonentry_frame(map);
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    88
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    89
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    90
#ifdef CC_INTERP
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    91
BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    92
  return get_interpreterState()->monitor_base();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    93
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    94
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    95
BasicObjectLock* frame::interpreter_frame_monitor_end() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    96
  return (BasicObjectLock*) get_interpreterState()->stack_base();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    97
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    98
#endif // CC_INTERP
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    99
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   100
void frame::patch_pc(Thread* thread, address pc) {
15205
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   101
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   102
  if (pc != NULL) {
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   103
    _cb = CodeCache::find_blob(pc);
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   104
    _pc = pc;
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   105
    _deopt_state = is_deoptimized;
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   106
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   107
  } else {
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   108
    // We borrow this call to set the thread pointer in the interpreter
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   109
    // state; the hook to set up deoptimized frames isn't supplied it.
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   110
    assert(pc == NULL, "should be");
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   111
    get_interpreterState()->set_thread((JavaThread *) thread);
17da82a12ff4 8005817: Shark: implement deoptimization support
twisti
parents: 14294
diff changeset
   112
  }
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   113
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   114
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   115
bool frame::safe_for_sender(JavaThread *thread) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   116
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 15205
diff changeset
   117
  return false;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   118
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   119
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   120
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   121
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 15205
diff changeset
   122
  return false;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   123
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   124
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   125
BasicType frame::interpreter_frame_result(oop* oop_result,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   126
                                          jvalue* value_result) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   127
  assert(is_interpreted_frame(), "interpreted frame expected");
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 11571
diff changeset
   128
  Method* method = interpreter_frame_method();
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   129
  BasicType type = method->result_type();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   130
  intptr_t* tos_addr = (intptr_t *) interpreter_frame_tos_address();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   131
  oop obj;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   132
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   133
  switch (type) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   134
  case T_VOID:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   135
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   136
  case T_BOOLEAN:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   137
    value_result->z = *(jboolean *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   138
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   139
  case T_BYTE:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   140
    value_result->b = *(jbyte *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   141
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   142
  case T_CHAR:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   143
    value_result->c = *(jchar *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   144
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   145
  case T_SHORT:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   146
    value_result->s = *(jshort *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   147
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   148
  case T_INT:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   149
    value_result->i = *(jint *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   150
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   151
  case T_LONG:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   152
    value_result->j = *(jlong *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   153
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   154
  case T_FLOAT:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   155
    value_result->f = *(jfloat *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   156
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   157
  case T_DOUBLE:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   158
    value_result->d = *(jdouble *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   159
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   160
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   161
  case T_OBJECT:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   162
  case T_ARRAY:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   163
    if (method->is_native()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   164
      obj = get_interpreterState()->oop_temp();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   165
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   166
    else {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   167
      oop* obj_p = (oop *) tos_addr;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   168
      obj = (obj_p == NULL) ? (oop) NULL : *obj_p;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   169
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   170
    assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   171
    *oop_result = obj;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   172
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   173
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   174
  default:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   175
    ShouldNotReachHere();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   176
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   177
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   178
  return type;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   179
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   180
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   181
int frame::frame_size(RegisterMap* map) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   182
#ifdef PRODUCT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   183
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 15205
diff changeset
   184
#endif // PRODUCT
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   185
  return 0; // make javaVFrame::print_value work
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   186
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   187
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   188
intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   189
  int index = (Interpreter::expr_offset_in_bytes(offset) / wordSize);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   190
  return &interpreter_frame_tos_address()[index];
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   191
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   192
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   193
void frame::zero_print_on_error(int           frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   194
                                outputStream* st,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   195
                                char*         buf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   196
                                int           buflen) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   197
  // Divide the buffer between the field and the value
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   198
  buflen >>= 1;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   199
  char *fieldbuf = buf;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   200
  char *valuebuf = buf + buflen;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   201
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   202
  // Print each word of the frame
5418
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 4448
diff changeset
   203
  for (intptr_t *addr = sp(); addr <= fp(); addr++) {
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 4448
diff changeset
   204
    int offset = fp() - addr;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   205
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   206
    // Fill in default values, then try and improve them
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   207
    snprintf(fieldbuf, buflen, "word[%d]", offset);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   208
    snprintf(valuebuf, buflen, PTR_FORMAT, *addr);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   209
    zeroframe()->identify_word(frame_index, offset, fieldbuf, valuebuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   210
    fieldbuf[buflen - 1] = '\0';
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   211
    valuebuf[buflen - 1] = '\0';
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   212
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   213
    // Print the result
30118
dadad0daaab4 8075967: Zero interpreter asserts for SafeFetch<32,N> calls in ObjectMonitor
coleenp
parents: 26821
diff changeset
   214
    st->print_cr(" " PTR_FORMAT ": %-21s = %s", p2i(addr), fieldbuf, valuebuf);
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   215
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   216
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   217
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   218
void ZeroFrame::identify_word(int   frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   219
                              int   offset,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   220
                              char* fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   221
                              char* valuebuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   222
                              int   buflen) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   223
  switch (offset) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   224
  case next_frame_off:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   225
    strncpy(fieldbuf, "next_frame", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   226
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   227
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   228
  case frame_type_off:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   229
    strncpy(fieldbuf, "frame_type", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   230
    if (is_entry_frame())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   231
      strncpy(valuebuf, "ENTRY_FRAME", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   232
    else if (is_interpreter_frame())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   233
      strncpy(valuebuf, "INTERPRETER_FRAME", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   234
    else if (is_fake_stub_frame())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   235
      strncpy(valuebuf, "FAKE_STUB_FRAME", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   236
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   237
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   238
  default:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   239
    if (is_entry_frame()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   240
      as_entry_frame()->identify_word(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   241
        frame_index, offset, fieldbuf, valuebuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   242
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   243
    else if (is_interpreter_frame()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   244
      as_interpreter_frame()->identify_word(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   245
        frame_index, offset, fieldbuf, valuebuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   246
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   247
    else if (is_fake_stub_frame()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   248
      as_fake_stub_frame()->identify_word(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   249
        frame_index, offset, fieldbuf, valuebuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   250
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   251
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   252
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   253
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   254
void EntryFrame::identify_word(int   frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   255
                               int   offset,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   256
                               char* fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   257
                               char* valuebuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   258
                               int   buflen) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   259
  switch (offset) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   260
  case call_wrapper_off:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   261
    strncpy(fieldbuf, "call_wrapper", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   262
    break;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   263
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   264
  default:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   265
    snprintf(fieldbuf, buflen, "local[%d]", offset - 3);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   266
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   267
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   268
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   269
void InterpreterFrame::identify_word(int   frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   270
                                     int   offset,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   271
                                     char* fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   272
                                     char* valuebuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   273
                                     int   buflen) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   274
  interpreterState istate = interpreter_state();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   275
  bool is_valid = istate->self_link() == istate;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   276
  intptr_t *addr = addr_of_word(offset);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   277
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   278
  // Fixed part
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   279
  if (addr >= (intptr_t *) istate) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   280
    const char *field = istate->name_of_field_at_address((address) addr);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   281
    if (field) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   282
      if (is_valid && !strcmp(field, "_method")) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   283
        istate->method()->name_and_sig_as_C_string(valuebuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   284
      }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   285
      else if (is_valid && !strcmp(field, "_bcp") && istate->bcp()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   286
        snprintf(valuebuf, buflen, PTR_FORMAT " (bci %d)",
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   287
                 (intptr_t) istate->bcp(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   288
                 istate->method()->bci_from(istate->bcp()));
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   289
      }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   290
      snprintf(fieldbuf, buflen, "%sistate->%s",
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   291
               field[strlen(field) - 1] == ')' ? "(": "", field);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   292
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   293
    else if (addr == (intptr_t *) istate) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   294
      strncpy(fieldbuf, "(vtable for istate)", buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   295
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   296
    return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   297
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   298
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   299
  // Variable part
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   300
  if (!is_valid)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   301
    return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   302
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   303
  // JNI stuff
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   304
  if (istate->method()->is_native() && addr < istate->stack_base()) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   305
    address hA = istate->method()->signature_handler();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   306
    if (hA != NULL) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   307
      if (hA != (address) InterpreterRuntime::slow_signature_handler) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   308
        InterpreterRuntime::SignatureHandler *handler =
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   309
          InterpreterRuntime::SignatureHandler::from_handlerAddr(hA);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   310
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   311
        intptr_t *params = istate->stack_base() - handler->argument_count();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   312
        if (addr >= params) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   313
          int param = addr - params;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   314
          const char *desc = "";
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   315
          if (param == 0)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   316
            desc = " (JNIEnv)";
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   317
          else if (param == 1) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   318
            if (istate->method()->is_static())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   319
              desc = " (mirror)";
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   320
            else
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   321
              desc = " (this)";
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   322
          }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   323
          snprintf(fieldbuf, buflen, "parameter[%d]%s", param, desc);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   324
          return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   325
        }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   326
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   327
        for (int i = 0; i < handler->argument_count(); i++) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   328
          if (params[i] == (intptr_t) addr) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   329
            snprintf(fieldbuf, buflen, "unboxed parameter[%d]", i);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   330
            return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   331
          }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   332
        }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   333
      }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   334
    }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   335
    return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   336
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   337
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   338
  // Monitors and stack
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   339
  identify_vp_word(frame_index, addr,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   340
                   (intptr_t *) istate->monitor_base(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   341
                   istate->stack_base(),
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   342
                   fieldbuf, buflen);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   343
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   344
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   345
void ZeroFrame::identify_vp_word(int       frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   346
                                 intptr_t* addr,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   347
                                 intptr_t* monitor_base,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   348
                                 intptr_t* stack_base,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   349
                                 char*     fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   350
                                 int       buflen) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   351
  // Monitors
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   352
  if (addr >= stack_base && addr < monitor_base) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   353
    int monitor_size = frame::interpreter_frame_monitor_size();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   354
    int last_index = (monitor_base - stack_base) / monitor_size - 1;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   355
    int index = last_index - (addr - stack_base) / monitor_size;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   356
    intptr_t monitor = (intptr_t) (
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   357
      (BasicObjectLock *) monitor_base - 1 - index);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   358
    intptr_t offset = (intptr_t) addr - monitor;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   359
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   360
    if (offset == BasicObjectLock::obj_offset_in_bytes())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   361
      snprintf(fieldbuf, buflen, "monitor[%d]->_obj", index);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   362
    else if (offset ==  BasicObjectLock::lock_offset_in_bytes())
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   363
      snprintf(fieldbuf, buflen, "monitor[%d]->_lock", index);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   364
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   365
    return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   366
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   367
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   368
  // Expression stack
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   369
  if (addr < stack_base) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   370
    snprintf(fieldbuf, buflen, "%s[%d]",
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   371
             frame_index == 0 ? "stack_word" : "local",
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   372
             (int) (stack_base - addr - 1));
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   373
    return;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   374
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   375
}
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   376
11571
23f825a42a85 7120468: SPARC/x86: use frame::describe to enhance trace_method_handle
bdelsart
parents: 10539
diff changeset
   377
#ifndef PRODUCT
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   378
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   379
void frame::describe_pd(FrameValues& values, int frame_no) {
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   380
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   381
}
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   382
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 7397
diff changeset
   383
#endif
10539
f87cedf7983c 7087445: Improve platform independence of JSR292 shared code
bdelsart
parents: 10260
diff changeset
   384
f87cedf7983c 7087445: Improve platform independence of JSR292 shared code
bdelsart
parents: 10260
diff changeset
   385
intptr_t *frame::initial_deoptimization_info() {
f87cedf7983c 7087445: Improve platform independence of JSR292 shared code
bdelsart
parents: 10260
diff changeset
   386
  // unused... but returns fp() to minimize changes introduced by 7087445
f87cedf7983c 7087445: Improve platform independence of JSR292 shared code
bdelsart
parents: 10260
diff changeset
   387
  return fp();
f87cedf7983c 7087445: Improve platform independence of JSR292 shared code
bdelsart
parents: 10260
diff changeset
   388
}
26821
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   389
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   390
#ifndef PRODUCT
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   391
// This is a generic constructor which is only used by pns() in debug.cpp.
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   392
frame::frame(void* sp, void* fp, void* pc) {
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   393
  Unimplemented();
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   394
}
46589
f1c04490ded1 8182848: Some functions misplaced in debug.hpp
coleenp
parents: 38166
diff changeset
   395
f1c04490ded1 8182848: Some functions misplaced in debug.hpp
coleenp
parents: 38166
diff changeset
   396
void frame::pd_ps() {}
26821
ce9f82507dc2 8058345: Refactor native stack printing from vmError.cpp to debug.cpp to make it available in gdb as well
simonis
parents: 25714
diff changeset
   397
#endif