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