< prev index next >

src/share/vm/logging/logTag.hpp

Print this page




 124   LOG_TAG(stats) \
 125   LOG_TAG(stringdedup) \
 126   LOG_TAG(stringtable) \
 127   LOG_TAG(stackmap) \
 128   LOG_TAG(subclass) \
 129   LOG_TAG(survivor) \
 130   LOG_TAG(sweep) \
 131   LOG_TAG(task) \
 132   DEBUG_ONLY(LOG_TAG(test)) \
 133   LOG_TAG(thread) \
 134   LOG_TAG(tlab) \
 135   LOG_TAG(time) \
 136   LOG_TAG(timer) \
 137   LOG_TAG(update) \
 138   LOG_TAG(unload) /* Trace unloading of classes */ \
 139   LOG_TAG(verification) \
 140   LOG_TAG(verify) \
 141   LOG_TAG(vmoperation) \
 142   LOG_TAG(vtables) \
 143   LOG_TAG(workgang) \

 144   LOG_TAG_LIST_EXT
 145 
 146 #define PREFIX_LOG_TAG(T) (LogTag::_##T)
 147 
 148 // Expand a set of log tags to their prefixed names.
 149 // For error detection purposes, the macro passes one more tag than what is supported.
 150 // If too many tags are given, a static assert in the log class will fail.
 151 #define LOG_TAGS_EXPANDED(T0, T1, T2, T3, T4, T5, ...)  PREFIX_LOG_TAG(T0), PREFIX_LOG_TAG(T1), PREFIX_LOG_TAG(T2), \
 152                                                         PREFIX_LOG_TAG(T3), PREFIX_LOG_TAG(T4), PREFIX_LOG_TAG(T5)
 153 // The EXPAND_VARARGS macro is required for MSVC, or it will resolve the LOG_TAGS_EXPANDED macro incorrectly.
 154 #define EXPAND_VARARGS(x) x
 155 #define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(__VA_ARGS__, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG))
 156 
 157 // Log tags are used to classify log messages.
 158 // Each log message can be assigned between 1 to LogTag::MaxTags number of tags.
 159 // Specifying multiple tags for a log message means that only outputs configured
 160 // for those exact tags, or a subset of the tags with a wildcard, will see the logging.
 161 // Multiple tags should be comma separated, e.g. log_error(tag1, tag2)("msg").
 162 class LogTag : public AllStatic {
 163  public:




 124   LOG_TAG(stats) \
 125   LOG_TAG(stringdedup) \
 126   LOG_TAG(stringtable) \
 127   LOG_TAG(stackmap) \
 128   LOG_TAG(subclass) \
 129   LOG_TAG(survivor) \
 130   LOG_TAG(sweep) \
 131   LOG_TAG(task) \
 132   DEBUG_ONLY(LOG_TAG(test)) \
 133   LOG_TAG(thread) \
 134   LOG_TAG(tlab) \
 135   LOG_TAG(time) \
 136   LOG_TAG(timer) \
 137   LOG_TAG(update) \
 138   LOG_TAG(unload) /* Trace unloading of classes */ \
 139   LOG_TAG(verification) \
 140   LOG_TAG(verify) \
 141   LOG_TAG(vmoperation) \
 142   LOG_TAG(vtables) \
 143   LOG_TAG(workgang) \
 144   LOG_TAG(valuetypes) \
 145   LOG_TAG_LIST_EXT
 146 
 147 #define PREFIX_LOG_TAG(T) (LogTag::_##T)
 148 
 149 // Expand a set of log tags to their prefixed names.
 150 // For error detection purposes, the macro passes one more tag than what is supported.
 151 // If too many tags are given, a static assert in the log class will fail.
 152 #define LOG_TAGS_EXPANDED(T0, T1, T2, T3, T4, T5, ...)  PREFIX_LOG_TAG(T0), PREFIX_LOG_TAG(T1), PREFIX_LOG_TAG(T2), \
 153                                                         PREFIX_LOG_TAG(T3), PREFIX_LOG_TAG(T4), PREFIX_LOG_TAG(T5)
 154 // The EXPAND_VARARGS macro is required for MSVC, or it will resolve the LOG_TAGS_EXPANDED macro incorrectly.
 155 #define EXPAND_VARARGS(x) x
 156 #define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(__VA_ARGS__, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG))
 157 
 158 // Log tags are used to classify log messages.
 159 // Each log message can be assigned between 1 to LogTag::MaxTags number of tags.
 160 // Specifying multiple tags for a log message means that only outputs configured
 161 // for those exact tags, or a subset of the tags with a wildcard, will see the logging.
 162 // Multiple tags should be comma separated, e.g. log_error(tag1, tag2)("msg").
 163 class LogTag : public AllStatic {
 164  public:


< prev index next >