RFR: 8333994: NMT: call stacks should show source information [v3]

Thomas Stuefe stuefe at openjdk.org
Sat Jun 22 05:49:15 UTC 2024


On Fri, 21 Jun 2024 20:45:03 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> 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 eight additional commits since the last revision:
>> 
>>  - fix windows build
>>  - Merge branch 'master' into JDK-8333994-NMT-call-stacks-should-show-source-information
>>  - caching
>>  - Merge branch 'master' into JDK-8333994-NMT-call-stacks-should-show-source-information
>>  - exclude macos from testing source info
>>  - copyrights
>>  - test
>>  - JDK-8333994-NMT-call-stacks-should-show-source-information
>
> src/hotspot/share/nmt/memReporter.hpp line 157:
> 
>> 155:   MemDetailReporter(MemBaseline& baseline, outputStream* output, size_t scale = default_scale) :
>> 156:     MemSummaryReporter(baseline, output, scale),
>> 157:      _baseline(baseline), _stackprinter(output) { }
> 
> `NativeCallStackPrinter` is 293* 1024 == 293KB
> 
> Isn't there a way to create/destroy it on the fly? NMT is already memory hungry, we just keep increasing the price of admission ...

MemDetailReporter is only created for a detail report and does not live beyond reporting. The printer cache is needed for the duration of the report. Simplest way to do this is an inline member in the reporter class.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19655#discussion_r1649570291


More information about the hotspot-dev mailing list