RFR: 8177959: G1CollectedHeap::print_on prints incorrect capacity

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8177959: G1CollectedHeap::print_on prints incorrect capacity

Leo Korinth
Hi,

Remove wrong/inaccurate reporting in print_on() in g1

In g1 -- when printing the memory region used -- the middle value is
incorrectly calculated using (+) instead of (*). Further more, the
middle value in the print does not give precise information. In g1 the
heap is not necessarily contiguous, and holes of non-committed memory
can be present. Thus, instead of fixing the typo, the printout is
modified and the middle value removed.

A more detailed (and verbose) memory usage map is printed in
print_regions_on() and can be obtained with extra flags.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8177959

Webrev:
http://cr.openjdk.java.net/~sjohanss/8177959/00/

Testing:
- JPRT
- Manual check of output

Thanks,
Leo
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8177959: G1CollectedHeap::print_on prints incorrect capacity

Stefan Johansson
Hi Leo,

On 2017-10-26 11:57, Leo Korinth wrote:

> Hi,
>
> Remove wrong/inaccurate reporting in print_on() in g1
>
> In g1 -- when printing the memory region used -- the middle value is
> incorrectly calculated using (+) instead of (*). Further more, the
> middle value in the print does not give precise information. In g1 the
> heap is not necessarily contiguous, and holes of non-committed memory
> can be present. Thus, instead of fixing the typo, the printout is
> modified and the middle value removed.
>
> A more detailed (and verbose) memory usage map is printed in
> print_regions_on() and can be obtained with extra flags.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8177959
>
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8177959/00/
>
Thanks for doing this cleanup. Looks good.

I can sponsor the change.

Cheers,
Stefan
> Testing:
> - JPRT
> - Manual check of output
>
> Thanks,
> Leo

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8177959: G1CollectedHeap::print_on prints incorrect capacity

Per Liden
In reply to this post by Leo Korinth
Hi Leo,

On 2017-10-26 11:57, Leo Korinth wrote:

> Hi,
>
> Remove wrong/inaccurate reporting in print_on() in g1
>
> In g1 -- when printing the memory region used -- the middle value is
> incorrectly calculated using (+) instead of (*). Further more, the
> middle value in the print does not give precise information. In g1 the
> heap is not necessarily contiguous, and holes of non-committed memory
> can be present. Thus, instead of fixing the typo, the printout is
> modified and the middle value removed.
>
> A more detailed (and verbose) memory usage map is printed in
> print_regions_on() and can be obtained with extra flags.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8177959
>
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8177959/00/

Looks good!

/Per

>
> Testing:
> - JPRT
> - Manual check of output
>
> Thanks,
> Leo
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8177959: G1CollectedHeap::print_on prints incorrect capacity

Erik Helin-2
In reply to this post by Leo Korinth
On 10/26/2017 11:57 AM, Leo Korinth wrote:

> Hi,
>
> Remove wrong/inaccurate reporting in print_on() in g1
>
> In g1 -- when printing the memory region used -- the middle value is
> incorrectly calculated using (+) instead of (*). Further more, the
> middle value in the print does not give precise information. In g1 the
> heap is not necessarily contiguous, and holes of non-committed memory
> can be present. Thus, instead of fixing the typo, the printout is
> modified and the middle value removed.
>
> A more detailed (and verbose) memory usage map is printed in
> print_regions_on() and can be obtained with extra flags.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8177959
>
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8177959/00/

Looks good, Reviewed. Thanks for taking care of this bug Leo!

Erik

> Testing:
> - JPRT
> - Manual check of output
>
> Thanks,
> Leo