Add variable names and values to stacktrace#2
Open
xardazz wants to merge 14 commits into
Open
Conversation
- add object toString value instead of address
# Conflicts: # test/one/helfy/StackTrace.java
apangin
reviewed
Apr 24, 2018
| public static Frame currentFrame() { | ||
| return JavaThread.topFrame(current()); | ||
| } | ||
| } |
Owner
There was a problem hiding this comment.
What is this class for?
VMThread::of is a rather light operation - probably even simpler than computeIfAbsent.
| private static final int slot_interp_sender_sp = -1; | ||
| private static final int slot_link = 0; | ||
| private static final int slot_return_addr = 1; | ||
| private static final int slot_sender_sp = 2; |
Owner
There was a problem hiding this comment.
These constants are platform-dependent.
It's OK to have them in a sample that works only on a particular platform, but if you are implementing a general-purpose struct, this would require pd subclasses, e.g. FrameX64 extends Frame etc.
| boolean isArray = vmType.startsWith("["); | ||
| if (isArray) { | ||
| vmType = vmType.substring(1); | ||
| } |
Owner
There was a problem hiding this comment.
What about multidimensional arrays?
| ObjRef strRef = new ObjRef(); | ||
| // if we have -XX:-UseCompressedOops specified base and offset will be 0 | ||
| strRef.ptr = (int) ((localVarVal - _narrow_oop_base) >> _narrow_oop_shift); | ||
| Object val = jvm.getObject(strRef, jvm.fieldOffset(ObjRef.ptrField)); |
Owner
There was a problem hiding this comment.
This operation is inherently unsafe, since GC may happen between strRef.ptr and jvm.getObject.
- add reading of vframes - some refactoring
- fixed bci for compiled frames
- refactoring for cleaner code
- do some refactoring for frames - support multidimensional arrays
|
Is there any progress on this pull request? |
|
i think no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.