RFR: JDK-8301749: Tracking malloc pooled memory size [v2]

Thomas Stüfe thomas.stuefe at gmail.com
Fri Feb 10 05:20:43 UTC 2023


On Fri, Feb 10, 2023 at 2:23 AM David Holmes <dholmes at openjdk.org> wrote:

> On Thu, 9 Feb 2023 06:15:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
> >> Johan Sjölen has updated the pull request incrementally with four
> additional commits since the last revision:
> >>
> >>  - Fix the test
> >>  - Note man section
> >>  - Add test
> >>  - Reimplement malloc_info as requested
> >
> > test/hotspot/jtreg/serviceability/dcmd/vm/MallocInfoTest.java line 43:
> >
> >> 41:     public void run(CommandExecutor executor) {
> >> 42:         OutputAnalyzer output =
> executor.execute("System.native_heap_info");
> >> 43:         output.reportDiagnosticSummary();
> >
> > Do this after the other checks, else on error you will get the report
> twice.
>
> Just to clarify something in relation to a  comment from @tstuefe that I
> now can't find. It can be useful to show the information even if the test
> passes, so that, for example, we can go and look at test results and see
> the kind of data that malloc_info is showing us. I often find myself adding
> this to tests because they swallow the interesting output even though the
> test passes (sometimes for the wrong reason!).
>

Oh, certainly. But its even more useful the other way around, if the test
fails. My concern was (and weirdly enough I cannot find my own comment now)
that if you place reportDiagnosticSummary() after the shouldContain, you
won't see anything but the "should match" error. I always place the
reportDiagnosticSummary right at the beginning for that reason.


>
> -------------
>
> PR: https://git.openjdk.org/jdk/pull/12455
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-runtime-dev/attachments/20230210/68a8bd52/attachment.htm>


More information about the hotspot-runtime-dev mailing list