RFR: 8285364: Use more precise name for ReferenceType::REF_OTHER
    Kim Barrett 
    kbarrett at openjdk.java.net
       
    Thu Apr 21 11:18:55 UTC 2022
    
    
  
On Thu, 21 Apr 2022 10:48:06 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple rename and some comments update.
> 
> Test: build
Changes requested by kbarrett (Reviewer).
src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp line 214:
> 212: }
> 213: 
> 214: static const char* reference_type_to_string(ReferenceType rt) {
This function seems misplaced here.  Seems like it belongs with the ReferenceType type.  (This could be a followup RFE.)
src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp line 217:
> 215:   switch (rt) {
> 216:     case REF_NONE: return "None reference";
> 217:     case REF_REFERENCE: return "j.l.r.Reference";
I think either "Reference" or "java.lang.ref.Reference" would be better than the abbreviation.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/ReferenceType.java line 31:
> 29: public enum ReferenceType {
> 30:   REF_NONE ("None reference"),       // Regular class
> 31:   REF_REFERENCE ("j.l.r.Reference"), // java/lang/ref/Reference, super class of the following
Again here, don't abbreviate the package path.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8332
    
    
More information about the serviceability-dev
mailing list