RFR (S): 8004924: NPG: jmap -heap output should contain ClassMetaspaceSize value
erik.helin at oracle.com
Tue Feb 26 15:47:17 UTC 2013
thanks for reviewing!
On 02/26/2013 04:19 PM, Mikael Gerdin wrote:
> On 2013-02-21 12:41, Erik Helin wrote:
>> based on internal feedback, I've updated the test. Since the test
>> spawned the "jmap -heap" process and connected the jmap process to
>> itself, there was a race condition: if the "jmap -heap" process produced
>> a lot of output, then the JVM process would not be able to consume this
>> output because it has been stopped by jmap. At the same time, jmap would
>> wait for the JVM to consume the output from jmap.
>> The test now pipes the output from "jmap -heap" to a fike and then later
>> analyzes the file.
> Overall this approach seems much safer than having a java thread copy
> the contents. However in this case you do not drain the stderr from the
> process you created so in some cases, for example if the SA is broken
> then it will throw up a long exception stacktrace on stderr.
> Please either use ProcessBuilder.redirectErrorStream to pipe all output
> to one file (and rename it to remove stdout from its name)
> or use redirectError and pipe that output to a separate file.
Agree, I now use redirectError to pipe stderr to another file.
Please see new webrev at:
>> On 02/20/2013 09:50 PM, Erik Helin wrote:
>>> Hi all,
>>> this change the flag ClassMetapaceSize to the output of jmap -heap. I
>>> have also added a test that checks the ouput (the test uses the new
>>> process builder framework).
More information about the hotspot-gc-dev