< prev index next >

core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAttributes.java

Print this page




 684 
 685         public static final IAttribute<String> FLAG_NAME = attr("name", Messages.getString(Messages.ATTR_FLAG_NAME), //$NON-NLS-1$
 686                         PLAIN_TEXT);
 687         public static final IAttribute<String> FLAG_ORIGIN = attr("origin", Messages.getString(Messages.ATTR_FLAG_ORIGIN), //$NON-NLS-1$
 688                         PLAIN_TEXT);
 689         public static final IAttribute<IQuantity> FLAG_VALUE_NUMBER = attr("value", //$NON-NLS-1$
 690                         Messages.getString(Messages.ATTR_FLAG_VALUE_NUMBER), NUMBER);
 691         public static final IAttribute<Boolean> FLAG_VALUE_BOOLEAN = attr("value", //$NON-NLS-1$
 692                         Messages.getString(Messages.ATTR_FLAG_VALUE_BOOLEAN), FLAG);
 693         public static final IAttribute<String> FLAG_VALUE_TEXT = attr("value", //$NON-NLS-1$
 694                         Messages.getString(Messages.ATTR_FLAG_VALUE_TEXT), PLAIN_TEXT);
 695 
 696         public static final IAttribute<String> THREAD_DUMP_RESULT = attr("result", //$NON-NLS-1$
 697                         Messages.getString(Messages.ATTR_THREAD_DUMP_RESULT), PLAIN_TEXT);
 698         public static final IAttribute<String> DUMP_REASON = attr("reason", Messages.getString(Messages.ATTR_DUMP_REASON), //$NON-NLS-1$
 699                         Messages.getString(Messages.ATTR_DUMP_REASON_DESC), PLAIN_TEXT);
 700         public static final IAttribute<String> DUMP_REASON_RECORDING_ID = attr("recordingId", //$NON-NLS-1$
 701                         Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID),
 702                         Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID_DESC), PLAIN_TEXT);
 703         
 704         public static final IAttribute<String> SHUTDOWN_REASON = attr("reason", // $NON-NLS-1$
 705                         Messages.getString(Messages.ATTR_SHUTDOWN_REASON),
 706                         Messages.getString(Messages.ATTR_SHUTDOWN_REASON_DESC), PLAIN_TEXT);
 707 
 708         public static final IAttribute<IQuantity> CLASSLOADER_LOADED_COUNT = attr("loadedClassCount", //$NON-NLS-1$
 709                         Messages.getString(Messages.ATTR_CLASSLOADER_LOADED_COUNT),
 710                         Messages.getString(Messages.ATTR_CLASSLOADER_LOADED_COUNT_DESC), NUMBER);
 711         public static final IAttribute<IQuantity> CLASSLOADER_UNLOADED_COUNT = attr("unloadedClassCount", //$NON-NLS-1$
 712                         Messages.getString(Messages.ATTR_CLASSLOADER_UNLOADED_COUNT),
 713                         Messages.getString(Messages.ATTR_CLASSLOADER_UNLOADED_COUNT_DESC), NUMBER);
 714 
 715         private static final IAttribute<IMCType> CLASS_DEFINING_CLASSLOADER_V0 = attr("definingClassLoader", //$NON-NLS-1$
 716                         Messages.getString(Messages.ATTR_CLASS_DEFINING_CLASSLOADER), CLASS);
 717         private static final IAttribute<IMCType> CLASS_INITIATING_CLASSLOADER_V0 = attr("initiatingClassLoader", //$NON-NLS-1$
 718                         Messages.getString(Messages.ATTR_CLASS_INITIATING_CLASSLOADER), CLASS);
 719         private static final IAttribute<IMCType> PARENT_CLASSLOADER_V0 = attr("parentClassLoader", // $NON-NLS-1$
 720                         Messages.getString(Messages.ATTR_PARENT_CLASSLOADER), CLASS);
 721         private static final IAttribute<IMCType> CLASSLOADER_V0 = attr("classLoader", // $NON-NLS-1$
 722                         Messages.getString(Messages.ATTR_CLASSLOADER), CLASS);
 723 
 724         public static final IAttribute<IMCClassLoader> CLASS_DEFINING_CLASSLOADER = Attribute
 725                         .canonicalize(new Attribute<IMCClassLoader>("definingClassLoader", //$NON-NLS-1$
 726                                         Messages.getString(Messages.ATTR_CLASS_DEFINING_CLASSLOADER), null, CLASS_LOADER) {
 727                                 @Override
 728                                 public <U> IMemberAccessor<IMCClassLoader, U> customAccessor(IType<U> type) {
 729                                         // V1 is handled by the standard accessor
 730                                         final IMemberAccessor<IMCType, U> accessorV0 = CLASS_DEFINING_CLASSLOADER_V0.getAccessor(type);
 731                                         if (accessorV0 != null) {
 732                                                 return new IMemberAccessor<IMCClassLoader, U>() {
 733                                                         @Override
 734                                                         public IMCClassLoader getMember(U i) {
 735                                                                 IMCType type = accessorV0.getMember(i);
 736                                                                 return new MCClassLoader(type, null);
 737                                                         }
 738                                                 };
 739                                         }
 740                                         return null;
 741                                 }


 846         public static final IAttribute<String> CLASSLOADER_STRING = Attribute
 847                         .canonicalize(new Attribute<String>("classLoader.string", //$NON-NLS-1$
 848                                         Messages.getString(Messages.ATTR_CLASSLOADER), null, PLAIN_TEXT) {
 849                                 @Override
 850                                 public <U> IMemberAccessor<String, U> customAccessor(IType<U> type) {
 851                                         final IMemberAccessor<IMCClassLoader, U> accessor = CLASSLOADER.getAccessor(type);
 852                                         return accessor == null ? null : new IMemberAccessor<String, U>() {
 853                                                 @Override
 854                                                 public String getMember(U i) {
 855                                                         IMCClassLoader cl = accessor.getMember(i);
 856                                                         return cl == null ? null : FormatToolkit.getHumanReadable(cl);
 857                                                 }
 858                                         };
 859                                 }
 860                         });
 861 
 862         public static final IAttribute<IMCType> CLASS_LOADED = attr("loadedClass", //$NON-NLS-1$
 863                         Messages.getString(Messages.ATTR_CLASS_LOADED), CLASS);
 864         public static final IAttribute<IMCType> CLASS_UNLOADED = attr("unloadedClass", //$NON-NLS-1$
 865                         Messages.getString(Messages.ATTR_CLASS_UNLOADED), CLASS);
 866         public static final IAttribute<IMCType> CLASS_DEFINED = attr("definedClass", // $NON-NLS-1$
 867                         Messages.getString(Messages.ATTR_CLASS_DEFINED), CLASS);
 868         public static final IAttribute<IQuantity> ANONYMOUS_BLOCK_SIZE = attr("anonymousBlockSize", // $NON-NLS-1$
 869                         Messages.getString(Messages.ATTR_ANONYMOUS_BLOCK_SIZE), MEMORY);
 870         public static final IAttribute<IQuantity> ANONYMOUS_CHUNK_SIZE = attr("anonymousChunkSize", // $NON-NLS-1$ 
 871                         Messages.getString(Messages.ATTR_ANONYMOUS_CHUNK_SIZE), MEMORY);
 872         public static final IAttribute<IQuantity> ANONYMOUS_CLASS_COUNT = attr("anonymousClassCount", // $NON-NLS-1$
 873                         Messages.getString(Messages.ATTR_ANONYMOUS_CLASS_COUNT), NUMBER);
 874         public static final IAttribute<IQuantity> BLOCK_SIZE = attr("blockSize", // $NON-NLS-1$
 875                         Messages.getString(Messages.ATTR_BLOCK_SIZE), MEMORY);
 876         public static final IAttribute<IQuantity> CHUNK_SIZE = attr("chunkSize", // $NON-NLS-1$
 877                         Messages.getString(Messages.ATTR_CHUNK_SIZE), MEMORY);
 878         public static final IAttribute<IQuantity> CLASS_COUNT = attr("classCount", // $NON-NLS-1$
 879                         Messages.getString(Messages.ATTR_CLASS_COUNT), NUMBER);
 880         public static final IAttribute<IQuantity> CLASS_LOADER_DATA = attr("classLoaderData", // $NON-NLS-1$
 881                         Messages.getString(Messages.ATTR_CLASSLOADER_DATA), ADDRESS);   
 882 
 883         public static final IAttribute<IQuantity> COMPILER_COMPILATION_ID = attr("compileId", //$NON-NLS-1$
 884                         Messages.getString(Messages.ATTR_COMPILER_COMPILATION_ID), NUMBER);
 885         public static final IAttribute<IQuantity> COMPILER_CODE_SIZE = attr("codeSize", //$NON-NLS-1$
 886                         Messages.getString(Messages.ATTR_COMPILER_CODE_SIZE), MEMORY);
 887         public static final IAttribute<IQuantity> COMPILER_INLINED_SIZE = attr("inlinedBytes", //$NON-NLS-1$
 888                         Messages.getString(Messages.ATTR_COMPILER_INLINED_SIZE), MEMORY);
 889         public static final IAttribute<IMCMethod> COMPILER_METHOD = attr("method", //$NON-NLS-1$
 890                         Messages.getString(Messages.ATTR_COMPILER_METHOD), METHOD);
 891         public static final IAttribute<String> COMPILER_METHOD_STRING = Attribute.canonicalize(
 892                         new Attribute<String>("method.humanreadable", Messages.getString(Messages.ATTR_COMPILER_METHOD_HUMAN), //$NON-NLS-1$
 893                                         Messages.getString(Messages.ATTR_COMPILER_METHOD_HUMAN_DESC), PLAIN_TEXT) {
 894                                 @Override
 895                                 public <U> IMemberAccessor<String, U> customAccessor(IType<U> type) {
 896                                         final IMemberAccessor<IMCMethod, U> accessor = COMPILER_METHOD.getAccessor(type);
 897                                         return accessor == null ? null : new IMemberAccessor<String, U>() {
 898                                                 @Override
 899                                                 public String getMember(U i) {
 900                                                         IMCMethod method = accessor.getMember(i);




 684 
 685         public static final IAttribute<String> FLAG_NAME = attr("name", Messages.getString(Messages.ATTR_FLAG_NAME), //$NON-NLS-1$
 686                         PLAIN_TEXT);
 687         public static final IAttribute<String> FLAG_ORIGIN = attr("origin", Messages.getString(Messages.ATTR_FLAG_ORIGIN), //$NON-NLS-1$
 688                         PLAIN_TEXT);
 689         public static final IAttribute<IQuantity> FLAG_VALUE_NUMBER = attr("value", //$NON-NLS-1$
 690                         Messages.getString(Messages.ATTR_FLAG_VALUE_NUMBER), NUMBER);
 691         public static final IAttribute<Boolean> FLAG_VALUE_BOOLEAN = attr("value", //$NON-NLS-1$
 692                         Messages.getString(Messages.ATTR_FLAG_VALUE_BOOLEAN), FLAG);
 693         public static final IAttribute<String> FLAG_VALUE_TEXT = attr("value", //$NON-NLS-1$
 694                         Messages.getString(Messages.ATTR_FLAG_VALUE_TEXT), PLAIN_TEXT);
 695 
 696         public static final IAttribute<String> THREAD_DUMP_RESULT = attr("result", //$NON-NLS-1$
 697                         Messages.getString(Messages.ATTR_THREAD_DUMP_RESULT), PLAIN_TEXT);
 698         public static final IAttribute<String> DUMP_REASON = attr("reason", Messages.getString(Messages.ATTR_DUMP_REASON), //$NON-NLS-1$
 699                         Messages.getString(Messages.ATTR_DUMP_REASON_DESC), PLAIN_TEXT);
 700         public static final IAttribute<String> DUMP_REASON_RECORDING_ID = attr("recordingId", //$NON-NLS-1$
 701                         Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID),
 702                         Messages.getString(Messages.ATTR_DUMP_REASON_RECORDING_ID_DESC), PLAIN_TEXT);
 703         
 704         public static final IAttribute<String> SHUTDOWN_REASON = attr("reason", //$NON-NLS-1$
 705                         Messages.getString(Messages.ATTR_SHUTDOWN_REASON),
 706                         Messages.getString(Messages.ATTR_SHUTDOWN_REASON_DESC), PLAIN_TEXT);
 707 
 708         public static final IAttribute<IQuantity> CLASSLOADER_LOADED_COUNT = attr("loadedClassCount", //$NON-NLS-1$
 709                         Messages.getString(Messages.ATTR_CLASSLOADER_LOADED_COUNT),
 710                         Messages.getString(Messages.ATTR_CLASSLOADER_LOADED_COUNT_DESC), NUMBER);
 711         public static final IAttribute<IQuantity> CLASSLOADER_UNLOADED_COUNT = attr("unloadedClassCount", //$NON-NLS-1$
 712                         Messages.getString(Messages.ATTR_CLASSLOADER_UNLOADED_COUNT),
 713                         Messages.getString(Messages.ATTR_CLASSLOADER_UNLOADED_COUNT_DESC), NUMBER);
 714 
 715         private static final IAttribute<IMCType> CLASS_DEFINING_CLASSLOADER_V0 = attr("definingClassLoader", //$NON-NLS-1$
 716                         Messages.getString(Messages.ATTR_CLASS_DEFINING_CLASSLOADER), CLASS);
 717         private static final IAttribute<IMCType> CLASS_INITIATING_CLASSLOADER_V0 = attr("initiatingClassLoader", //$NON-NLS-1$
 718                         Messages.getString(Messages.ATTR_CLASS_INITIATING_CLASSLOADER), CLASS);
 719         private static final IAttribute<IMCType> PARENT_CLASSLOADER_V0 = attr("parentClassLoader", //$NON-NLS-1$
 720                         Messages.getString(Messages.ATTR_PARENT_CLASSLOADER), CLASS);
 721         private static final IAttribute<IMCType> CLASSLOADER_V0 = attr("classLoader", //$NON-NLS-1$
 722                         Messages.getString(Messages.ATTR_CLASSLOADER), CLASS);
 723 
 724         public static final IAttribute<IMCClassLoader> CLASS_DEFINING_CLASSLOADER = Attribute
 725                         .canonicalize(new Attribute<IMCClassLoader>("definingClassLoader", //$NON-NLS-1$
 726                                         Messages.getString(Messages.ATTR_CLASS_DEFINING_CLASSLOADER), null, CLASS_LOADER) {
 727                                 @Override
 728                                 public <U> IMemberAccessor<IMCClassLoader, U> customAccessor(IType<U> type) {
 729                                         // V1 is handled by the standard accessor
 730                                         final IMemberAccessor<IMCType, U> accessorV0 = CLASS_DEFINING_CLASSLOADER_V0.getAccessor(type);
 731                                         if (accessorV0 != null) {
 732                                                 return new IMemberAccessor<IMCClassLoader, U>() {
 733                                                         @Override
 734                                                         public IMCClassLoader getMember(U i) {
 735                                                                 IMCType type = accessorV0.getMember(i);
 736                                                                 return new MCClassLoader(type, null);
 737                                                         }
 738                                                 };
 739                                         }
 740                                         return null;
 741                                 }


 846         public static final IAttribute<String> CLASSLOADER_STRING = Attribute
 847                         .canonicalize(new Attribute<String>("classLoader.string", //$NON-NLS-1$
 848                                         Messages.getString(Messages.ATTR_CLASSLOADER), null, PLAIN_TEXT) {
 849                                 @Override
 850                                 public <U> IMemberAccessor<String, U> customAccessor(IType<U> type) {
 851                                         final IMemberAccessor<IMCClassLoader, U> accessor = CLASSLOADER.getAccessor(type);
 852                                         return accessor == null ? null : new IMemberAccessor<String, U>() {
 853                                                 @Override
 854                                                 public String getMember(U i) {
 855                                                         IMCClassLoader cl = accessor.getMember(i);
 856                                                         return cl == null ? null : FormatToolkit.getHumanReadable(cl);
 857                                                 }
 858                                         };
 859                                 }
 860                         });
 861 
 862         public static final IAttribute<IMCType> CLASS_LOADED = attr("loadedClass", //$NON-NLS-1$
 863                         Messages.getString(Messages.ATTR_CLASS_LOADED), CLASS);
 864         public static final IAttribute<IMCType> CLASS_UNLOADED = attr("unloadedClass", //$NON-NLS-1$
 865                         Messages.getString(Messages.ATTR_CLASS_UNLOADED), CLASS);
 866         public static final IAttribute<IMCType> CLASS_DEFINED = attr("definedClass", //$NON-NLS-1$
 867                         Messages.getString(Messages.ATTR_CLASS_DEFINED), CLASS);
 868         public static final IAttribute<IQuantity> ANONYMOUS_BLOCK_SIZE = attr("anonymousBlockSize", //$NON-NLS-1$
 869                         Messages.getString(Messages.ATTR_ANONYMOUS_BLOCK_SIZE), MEMORY);
 870         public static final IAttribute<IQuantity> ANONYMOUS_CHUNK_SIZE = attr("anonymousChunkSize", //$NON-NLS-1$ 
 871                         Messages.getString(Messages.ATTR_ANONYMOUS_CHUNK_SIZE), MEMORY);
 872         public static final IAttribute<IQuantity> ANONYMOUS_CLASS_COUNT = attr("anonymousClassCount", //$NON-NLS-1$
 873                         Messages.getString(Messages.ATTR_ANONYMOUS_CLASS_COUNT), NUMBER);
 874         public static final IAttribute<IQuantity> BLOCK_SIZE = attr("blockSize", //$NON-NLS-1$
 875                         Messages.getString(Messages.ATTR_BLOCK_SIZE), MEMORY);
 876         public static final IAttribute<IQuantity> CHUNK_SIZE = attr("chunkSize", //$NON-NLS-1$
 877                         Messages.getString(Messages.ATTR_CHUNK_SIZE), MEMORY);
 878         public static final IAttribute<IQuantity> CLASS_COUNT = attr("classCount", //$NON-NLS-1$
 879                         Messages.getString(Messages.ATTR_CLASS_COUNT), NUMBER);
 880         public static final IAttribute<IQuantity> CLASS_LOADER_DATA = attr("classLoaderData", //$NON-NLS-1$
 881                         Messages.getString(Messages.ATTR_CLASSLOADER_DATA), ADDRESS);   
 882 
 883         public static final IAttribute<IQuantity> COMPILER_COMPILATION_ID = attr("compileId", //$NON-NLS-1$
 884                         Messages.getString(Messages.ATTR_COMPILER_COMPILATION_ID), NUMBER);
 885         public static final IAttribute<IQuantity> COMPILER_CODE_SIZE = attr("codeSize", //$NON-NLS-1$
 886                         Messages.getString(Messages.ATTR_COMPILER_CODE_SIZE), MEMORY);
 887         public static final IAttribute<IQuantity> COMPILER_INLINED_SIZE = attr("inlinedBytes", //$NON-NLS-1$
 888                         Messages.getString(Messages.ATTR_COMPILER_INLINED_SIZE), MEMORY);
 889         public static final IAttribute<IMCMethod> COMPILER_METHOD = attr("method", //$NON-NLS-1$
 890                         Messages.getString(Messages.ATTR_COMPILER_METHOD), METHOD);
 891         public static final IAttribute<String> COMPILER_METHOD_STRING = Attribute.canonicalize(
 892                         new Attribute<String>("method.humanreadable", Messages.getString(Messages.ATTR_COMPILER_METHOD_HUMAN), //$NON-NLS-1$
 893                                         Messages.getString(Messages.ATTR_COMPILER_METHOD_HUMAN_DESC), PLAIN_TEXT) {
 894                                 @Override
 895                                 public <U> IMemberAccessor<String, U> customAccessor(IType<U> type) {
 896                                         final IMemberAccessor<IMCMethod, U> accessor = COMPILER_METHOD.getAccessor(type);
 897                                         return accessor == null ? null : new IMemberAccessor<String, U>() {
 898                                                 @Override
 899                                                 public String getMember(U i) {
 900                                                         IMCMethod method = accessor.getMember(i);


< prev index next >