-
Notifications
You must be signed in to change notification settings - Fork 707
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
Fix verbose log output of freePhysicalMemory on 31-bit z/OS #424
Comments
1125899906842624 in hex is 0x4,0000,0000,0000 What we return is
I am unsure about the intent of the statement that limits To sum up, I propose the following changes:
|
Another suggestion: we should print in MB (not KB) since it's easier to read. |
According to the investigation related to PR #909 the output coming from j9sysinfo_get_memory_info() for memInfo.cached looks bogus: 0xffffffff3c5c4000. |
I will investigate. |
J9MemoryInfo uses uint64_t to store values. |
The problem is related to the cached memory, so the relevant code is
|
runtime/compiler/trj9/control/CompilationThread.cpp
The format specifiers for elapsed time and memLimit don't match the actual values. The old result was: (warm) Compiling java/lang/Math.powerOfTwoD(I)D OrdinaryMethod j9m=4B9DDD28 t=0 compThread=192 memLimit=0 KB freePhysicalMemory=1125899906842624 KB Fixing them gives: Compiling java/lang/Math.powerOfTwoD(I)D OrdinaryMethod j9m=4B9DDC28 t=184 compThread=0 memLimit=262144 KB freePhysicalMemory=21911196 KB** |
I will add in the fix, the first two issues mentioned was caught, missed the memLimit one. |
@pdbain-ibm The fixes you are proposing are awaiting to be integrated in PR #909. While working on it we discovered that the value for memInfo.cached in particular looks bad. It's a very large value, that when added to the value for physical memory results in an overflow. The outcome is that we print a value that looks reasonable, but it's bogus in reality. |
memInfo.availPhysical=54154899456 Bytes 0xc9be23000 in Hex Since freePhysicalMemory = memInfo.availPhysical + memInfo.cached, |
Made the following changes: - Change _cachedFreePhysicalMemoryB from int64_t to uint64_t because all the fields in J9MemoryInfo are of this type - Remove availSwap from physical memory calculation - Remove the test for LONG_MAX because in practice we could easily have physical memory larger than that (2GB) - Change freePhysicalMemory=%lld to freePhysicalMemory=%llu - Print physical memory report only if it is complete - Change t=%u to t=%llu - Change memLimit=%d to memLimit=%zu Issue: eclipse-openj9#424 Signed-off-by: Harry Yu <harryyu1994@gmail.com>
I think this can be closed since #909 is merged. |
Currently on 31-bit z/OS the verbose log printout of
-Xjit:verbose={compile*}
says thatfreePhysicalMemory=1125899906842624 KB
which is definitely false. There seems to be either a bug in the printout of the wrong value is returned by on of the APIs. If we are unable to retrieve this value we should not be printing it at all rather than misleading the user with an incorrect value.The text was updated successfully, but these errors were encountered: