--- old/src/share/vm/logging/logTag.hpp 2015-09-15 11:20:10.778623606 +0200 +++ new/src/share/vm/logging/logTag.hpp 2015-09-15 11:20:10.694623604 +0200 @@ -23,17 +23,15 @@ */ #ifndef SHARE_VM_LOGGING_LOGTAG_HPP #define SHARE_VM_LOGGING_LOGTAG_HPP + +#include "memory/allocation.hpp" #include "utilities/globalDefinitions.hpp" // List of available logging tags. New tags should be added here. // (The tags 'all', 'disable' and 'help' are special tags that can // not be used in log calls, and should not be listed below.) #define LOG_TAG_LIST \ - LOG_TAG(gc) \ - LOG_TAG(rt) \ - LOG_TAG(svc) \ - LOG_TAG(logging) \ - LOG_TAG(comp) + LOG_TAG(logging) #define PREFIX_LOG_TAG(T) (LogTag::T) @@ -46,8 +44,16 @@ #define EXPAND_VARARGS(x) x #define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(__VA_ARGS__, __NO_TAG, __NO_TAG, __NO_TAG, __NO_TAG, __NO_TAG, __NO_TAG)) -class LogTag { +// Log tags are used to classify log messages. +// Each log message can be assigned between 1 to LogTag::MaxTags number of tags. +// Specifying multiple tags for a log message means that only outputs configured +// for those exact tags, or a subset of the tags with a wildcard, will see the logging. +// Multiple tags should be comma separated, e.g. log_error(tag1, tag2)("msg"). +class LogTag : public AllStatic { public: + // The maximum number of tags that a single log message can have. + // E.g. there might be hundreds of different tags available, + // but a specific log message can only be tagged with up to MaxTags of those. static const size_t MaxTags = 5; enum type { @@ -70,4 +76,4 @@ typedef LogTag::type LogTagType; -#endif +#endif // SHARE_VM_LOGGING_LOGTAG_HPP