RFR: JDK-8256864: [windows] Improve tracing for mapping errors [v4]
Ioi Lam
iklam at openjdk.java.net
Tue Dec 1 20:13:02 UTC 2020
On Tue, 1 Dec 2020 11:16:17 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> To analyze JDK-8256729 further, we need more tracing:
>>
>> 1) We should print all mappings inside the split area if os::split_reserved_memory() fails
>>
>> 2) The print-mapping code on windows has some shortcomings:
>> - should not probe for mappings outside of what we know are valid address ranges for Windows
>> - should handle wrap-arounds - it should be possible to print the whole address space
>> - Protection information is printed wrong (MEMORY_BASIC_INFORMATION.Protect would be the correct member)
>> - should be printed in a more compact manner - base address should be on the same line as the first region
>> - maybe adorned with some basic range info, e.g. library mappings
>
> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - Print a short snippet for unknown mappings
> - Merge
> - Fix gtest for MacOS and AIX
> - Merge
> - Initial patch
Marked as reviewed by iklam (Reviewer).
src/hotspot/os/windows/os_windows.cpp line 6002:
> 6000: for (int i = 0; i < num_words; i++) {
> 6001: v[i] = SafeFetch32((int*)p + i, errval);
> 6002: if (v[i] == errval) {
How about
if (SafeFetch32((int*)p + i, 0x1234) == 0x1234 &&
SafeFetch32((int*)p + i, 0x5678) == 0x5678) {
return;
} else {
v[i] = SafeFetch32((int*)p + i, 0);
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/1390
More information about the hotspot-dev
mailing list