< prev index next >

src/hotspot/share/logging/logTag.hpp

Print this page
rev 49619 : JEP 328 : Flight Recorder open source preview


 138   LOG_TAG(survivor) \
 139   LOG_TAG(sweep) \
 140   LOG_TAG(table) \
 141   LOG_TAG(task) \
 142   DEBUG_ONLY(LOG_TAG(test)) \
 143   LOG_TAG(thread) \
 144   LOG_TAG(tlab) \
 145   LOG_TAG(time) \
 146   LOG_TAG(timer) \
 147   LOG_TAG(tracking) \
 148   LOG_TAG(update) \
 149   LOG_TAG(unload) /* Trace unloading of classes */ \
 150   LOG_TAG(unshareable) \
 151   LOG_TAG(mirror) \
 152   LOG_TAG(verification) \
 153   LOG_TAG(verify) \
 154   LOG_TAG(vmoperation) \
 155   LOG_TAG(vmthread) \
 156   LOG_TAG(vtables) \
 157   LOG_TAG(workgang) \








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




 138   LOG_TAG(survivor) \
 139   LOG_TAG(sweep) \
 140   LOG_TAG(table) \
 141   LOG_TAG(task) \
 142   DEBUG_ONLY(LOG_TAG(test)) \
 143   LOG_TAG(thread) \
 144   LOG_TAG(tlab) \
 145   LOG_TAG(time) \
 146   LOG_TAG(timer) \
 147   LOG_TAG(tracking) \
 148   LOG_TAG(update) \
 149   LOG_TAG(unload) /* Trace unloading of classes */ \
 150   LOG_TAG(unshareable) \
 151   LOG_TAG(mirror) \
 152   LOG_TAG(verification) \
 153   LOG_TAG(verify) \
 154   LOG_TAG(vmoperation) \
 155   LOG_TAG(vmthread) \
 156   LOG_TAG(vtables) \
 157   LOG_TAG(workgang) \
 158   LOG_TAG(jfr) \
 159   LOG_TAG(system) \
 160   LOG_TAG(parser) \
 161   LOG_TAG(bytecode) \
 162   LOG_TAG(setting) \
 163   LOG_TAG(oldobject) \
 164   LOG_TAG(sampling) \
 165   LOG_TAG(event)
 166   LOG_TAG_LIST_EXT
 167 
 168 #define PREFIX_LOG_TAG(T) (LogTag::_##T)
 169 
 170 // Expand a set of log tags to their prefixed names.
 171 // For error detection purposes, the macro passes one more tag than what is supported.
 172 // If too many tags are given, a static assert in the log class will fail.
 173 #define LOG_TAGS_EXPANDED(T0, T1, T2, T3, T4, T5, ...)  PREFIX_LOG_TAG(T0), PREFIX_LOG_TAG(T1), PREFIX_LOG_TAG(T2), \
 174                                                         PREFIX_LOG_TAG(T3), PREFIX_LOG_TAG(T4), PREFIX_LOG_TAG(T5)
 175 // The EXPAND_VARARGS macro is required for MSVC, or it will resolve the LOG_TAGS_EXPANDED macro incorrectly.
 176 #define EXPAND_VARARGS(x) x
 177 #define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(__VA_ARGS__, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG))
 178 
 179 // Log tags are used to classify log messages.
 180 // Each log message can be assigned between 1 to LogTag::MaxTags number of tags.
 181 // Specifying multiple tags for a log message means that only outputs configured
 182 // for those exact tags, or a subset of the tags with a wildcard, will see the logging.
 183 // Multiple tags should be comma separated, e.g. log_error(tag1, tag2)("msg").
 184 class LogTag : public AllStatic {
 185  public:


< prev index next >