RFR: 8322475: Extend printing for System.map [v5]

Thomas Stuefe stuefe at openjdk.org
Thu Jun 20 08:42:15 UTC 2024


On Wed, 19 Jun 2024 17:06:59 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:
>> 
>>  - copyrights
>>  - Merge branch 'master' into System.maps-more-info
>>  - fix merge issue
>>  - Merge branch 'master' into System.maps-more-info
>>  - fix whitespace issue
>>  - wip
>>  - exhuming
>>  - Merge branch 'master' into System.maps-more-info
>>  - Merge
>>  - remove codecache name printing
>>  - ... and 10 more: https://git.openjdk.org/jdk/compare/91bd85d6...231a8a91
>
> src/hotspot/os/linux/memMapPrinter_linux.cpp line 161:
> 
>> 159: 
>> 160: void MemMapPrinter::pd_print_all_mappings(const MappingPrintSession& session) {
>> 161:   constexpr char filename[] = "/proc/self/smaps";
> 
> Is this non-constexpr if it's a `const char *` instead of `char[]`?

not sure, tbh. sizeof is different: sizeof (constexpr char[]) will give you the string size incl 0, sizeof(constexpr char*) gives you pointer size. But the pointer points to runtime addresses, even if those are in the constant segment, so how could it be constexpr?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17158#discussion_r1647203127


More information about the hotspot-dev mailing list