RFR: 8337031: Improvements to CompilationMemoryStatistic
    Thomas Stuefe 
    stuefe at openjdk.org
       
    Sat Jul 27 05:46:34 UTC 2024
    
    
  
On Fri, 26 Jul 2024 18:21:05 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> src/hotspot/share/compiler/compilationMemoryStatistic.cpp line 242:
>> 
>>> 240:     for (int tag = 0; tag < Arena::tag_count(); tag++) {
>>> 241:       st->print_cr("  " LEGEND_KEY_FMT ": %s", Arena::tag_name[tag], Arena::tag_desc[tag]);
>>> 242:     }
>> 
>> use x macro?
>
> What do you mean by x macro? Do you have an example that shows the use of x macro?
You use them already in your patch.
E.g. 
#define XX(name, whatever, desc) st->print_cr("  " LEGEND_KEY_FMT ": " #name #desc
DO_ARENA_TAG(XX)
#undef XX
Admittedly, it is not a lot less code than the for loop. Up to you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20304#discussion_r1693851006
    
    
More information about the serviceability-dev
mailing list