aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/runtime/frame.hpp
diff options
context:
space:
mode:
authornever <none@none>2011-05-02 18:53:37 -0700
committernever <none@none>2011-05-02 18:53:37 -0700
commit81bee76dcb7c4a57fa21cb0692672fe2310754f6 (patch)
tree29fb538b4d292d2dddf5a0d7b9e8949cbffe9206 /src/share/vm/runtime/frame.hpp
parent89494cf4ded68cf30fc20e772e36016f269dd3d0 (diff)
7009361: JSR 292 Invalid value on stack on solaris-sparc with -Xcomp
Reviewed-by: kvn, twisti
Diffstat (limited to 'src/share/vm/runtime/frame.hpp')
-rw-r--r--src/share/vm/runtime/frame.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/share/vm/runtime/frame.hpp b/src/share/vm/runtime/frame.hpp
index a48c2af37..66d17a9f7 100644
--- a/src/share/vm/runtime/frame.hpp
+++ b/src/share/vm/runtime/frame.hpp
@@ -60,6 +60,7 @@
typedef class BytecodeInterpreter* interpreterState;
class CodeBlob;
+class FrameValues;
class vframeArray;
@@ -381,6 +382,8 @@ class frame VALUE_OBJ_CLASS_SPEC {
private:
const char* print_name() const;
+ void describe_pd(FrameValues& values, int frame_no);
+
public:
void print_value() const { print_value_on(tty,NULL); }
void print_value_on(outputStream* st, JavaThread *thread) const;
@@ -388,6 +391,9 @@ class frame VALUE_OBJ_CLASS_SPEC {
void interpreter_frame_print_on(outputStream* st) const;
void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
+ // Add annotated descriptions of memory locations belonging to this frame to values
+ void describe(FrameValues& values, int frame_no);
+
// Conversion from an VMReg to physical stack location
oop* oopmapreg_to_location(VMReg reg, const RegisterMap* regmap) const;
@@ -472,6 +478,41 @@ class frame VALUE_OBJ_CLASS_SPEC {
};
+#ifdef ASSERT
+// A simple class to describe a location on the stack
+class FrameValue VALUE_OBJ_CLASS_SPEC {
+ public:
+ intptr_t* location;
+ char* description;
+ int owner;
+ int priority;
+};
+
+
+// A collection of described stack values that can print a symbolic
+// description of the stack memory. Interpreter frame values can be
+// in the caller frames so all the values are collected first and then
+// sorted before being printed.
+class FrameValues {
+ private:
+ GrowableArray<FrameValue> _values;
+
+ static int compare(FrameValue* a, FrameValue* b) {
+ if (a->location == b->location) {
+ return a->priority - b->priority;
+ }
+ return a->location - b->location;
+ }
+
+ public:
+ // Used by frame functions to describe locations.
+ void describe(int owner, intptr_t* location, const char* description, int priority = 0);
+
+ bool validate();
+ void print();
+};
+
+#endif
//
// StackFrameStream iterates through the frames of a thread starting from