-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[GR-30765] Extend Native Image diagnostic output. #3515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f4e32cd to
bed7476
Compare
19dd112 to
a0c943c
Compare
peter-hofer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be a lot more useful than our current diagnostic output. Thank you!
| PosixUtils.checkStatusIs0(Pthread.pthread_getattr_np(Pthread.pthread_self(), attr), "LinuxStackOverflowSupport: pthread_getattr_np"); | ||
|
|
||
| WordPointer stackaddrPtr = StackValue.get(WordPointer.class); | ||
| WordPointer stacksizePtr = StackValue.get(WordPointer.class); | ||
| PosixUtils.checkStatusIs0(Pthread.pthread_attr_getstack(attr, stackaddrPtr, stacksizePtr), "LinuxStackOverflowSupport: pthread_attr_getstack"); | ||
| PosixUtils.checkStatusIs0(Pthread.pthread_attr_destroy(attr), "LinuxStackOverflowSupport: pthread_attr_destroy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be more fault-tolerant in the context of an segfault handler -- this method may return 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That shouldn't be an issue as the stack boundaries are cached in thread-local values during thread startup. The segfault handler only accesses those thread-local values.
| @Uninterruptible(reason = "Called from uninterruptible code.", mayBeInlined = true) | ||
| @Override | ||
| public UnsignedWord lookupStackBase() { | ||
| int sizeOfMInfo = SizeOf.get(MemoryAPI.MEMORY_BASIC_INFORMATION.class); | ||
| MemoryAPI.MEMORY_BASIC_INFORMATION minfo = StackValue.get(sizeOfMInfo); | ||
| MemoryAPI.VirtualQuery(minfo, minfo, WordFactory.unsigned(sizeOfMInfo)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VirtualQuery can fail, we should handle that.
...oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsSubstrateSegfaultHandler.java
Outdated
Show resolved
Hide resolved
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoAccess.java
Outdated
Show resolved
Hide resolved
...m/src/com.oracle.svm.core/src/com/oracle/svm/core/graal/snippets/StackOverflowCheckImpl.java
Show resolved
Hide resolved
...atevm/src/com.oracle.svm.core/src/com/oracle/svm/core/locks/SingleThreadedVMLockSupport.java
Show resolved
Hide resolved
…chine code instructions.
Refactored DiagnosticThunk.
…pilations via a signal.
…ot use a negative marker value
Fixed output formatting issues. Fixes for printing the RuntimeCodeInfoMemory.
Changed how stack traces are printed for the failing thread.
58cdb66 to
7c55d0f
Compare
No description provided.