src/hotspot/share/logging/logTag.hpp
author tschatzl
Mon, 26 Mar 2018 16:51:43 +0200
changeset 49607 acffe6ff3ae7
parent 49329 04ed29f9ef33
child 49716 450d709262c1
permissions -rw-r--r--
8180415: Rebuild remembered sets during the concurrent cycle Summary: In general maintain remembered sets of old regions only from the start of the concurrent cycle to the mixed gc they are used, at most until the end of the mixed phase. Reviewed-by: sjohanss, sangheki
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     1
/*
48787
7638bf98a312 8194312: Support parallel and concurrent JNI global handle processing
kbarrett
parents: 48105
diff changeset
     2
 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     4
 *
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     7
 * published by the Free Software Foundation.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     8
 *
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    13
 * accompanied this code).
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    14
 *
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    18
 *
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    21
 * questions.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    22
 *
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    23
 */
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    24
#ifndef SHARE_VM_LOGGING_LOGTAG_HPP
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    25
#define SHARE_VM_LOGGING_LOGTAG_HPP
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    26
37076
158a5a5f913a 8151265: Add a way to extend UL tags
rehn
parents: 37064
diff changeset
    27
#include "logging/logTag_ext.hpp"
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    28
#include "memory/allocation.hpp"
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    29
#include "utilities/globalDefinitions.hpp"
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    30
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    31
// List of available logging tags. New tags should be added here.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    32
// (The tags 'all', 'disable' and 'help' are special tags that can
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    33
// not be used in log calls, and should not be listed below.)
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
    34
#define LOG_TAG_LIST \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    35
  LOG_TAG(add) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    36
  LOG_TAG(age) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    37
  LOG_TAG(alloc) \
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 42634
diff changeset
    38
  LOG_TAG(aot) \
40625
6b45fb9188f9 8157236: attach on ARMv7 fails with com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file
dsamersoff
parents: 38259
diff changeset
    39
  LOG_TAG(annotation) \
37216
5555c1f804c4 8145235: Deprecate product flags that have been converted to Unified Logging
rprotacio
parents: 37205
diff changeset
    40
  LOG_TAG(arguments) \
40625
6b45fb9188f9 8157236: attach on ARMv7 fails with com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file
dsamersoff
parents: 38259
diff changeset
    41
  LOG_TAG(attach) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    42
  LOG_TAG(barrier) \
36186
06763de0d7ad 8149383: Convert TraceBiasedLocking to Unified Logging
rprotacio
parents: 36178
diff changeset
    43
  LOG_TAG(biasedlocking) \
41727
f1658e76a682 8164921: Memory leaked when instrumentation.retransformClasses() is called repeatedly
coleenp
parents: 41664
diff changeset
    44
  LOG_TAG(blocks) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    45
  LOG_TAG(bot) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    46
  LOG_TAG(breakpoint) \
46522
86b13b03a053 8176132: -XX:+PrintSharedSpaces should be converted to use Unified Logging.
rprotacio
parents: 46505
diff changeset
    47
  LOG_TAG(cds) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    48
  LOG_TAG(census) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    49
  LOG_TAG(class) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    50
  LOG_TAG(classhisto) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    51
  LOG_TAG(cleanup) \
46269
7e725659ea12 8172286: CodeCacheFlushing message should be shown in UL
ysuenaga
parents: 42650
diff changeset
    52
  LOG_TAG(codecache) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    53
  LOG_TAG(compaction) \
46270
2e7898927798 8172285: UL support for PrintCompilation
ysuenaga
parents: 46269
diff changeset
    54
  LOG_TAG(compilation) \
37202
4100f25e4b09 8149996: TraceLoaderConstraints has been converted to Unified Logging.
mockner
parents: 37201
diff changeset
    55
  LOG_TAG(constraints) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    56
  LOG_TAG(constantpool) \
47903
7f22774a5f42 8146115: Improve docker container detection and resource configuration usage
bobv
parents: 47881
diff changeset
    57
  LOG_TAG(container) \
37428
6e724f3d488b 8152896: Convert PrintCompressedOopsMode to Unified Logging
rprotacio
parents: 37261
diff changeset
    58
  LOG_TAG(coops) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    59
  LOG_TAG(cpu) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    60
  LOG_TAG(cset) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    61
  LOG_TAG(data) \
46405
17ab5460b2cb 8168122: Update logging in perfMemory to Unified Logging
rprotacio
parents: 46270
diff changeset
    62
  LOG_TAG(datacreation) \
48975
2c35fd3c5789 8193373: Cleanup ElfFile and family
zgu
parents: 48859
diff changeset
    63
  LOG_TAG(decoder) \
33736
1b3950243443 8139564: Convert TraceDefaultMethods to Unified Logging
rprotacio
parents: 33097
diff changeset
    64
  LOG_TAG(defaultmethods) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    65
  LOG_TAG(dump) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    66
  LOG_TAG(ergo) \
35216
71c463a17b3b 8141211: Convert TraceExceptions to Unified Logging
rprotacio
parents: 35171
diff changeset
    67
  LOG_TAG(exceptions) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    68
  LOG_TAG(exit) \
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 42634
diff changeset
    69
  LOG_TAG(fingerprint) \
48859
5a4d08efbad9 6909265: assert(_OnDeck != Self->_MutexEvent,"invariant") with -XX:+PrintMallocFree
coleenp
parents: 48787
diff changeset
    70
  LOG_TAG(free) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    71
  LOG_TAG(freelist) \
34150
ec723a529700 8144016: Add the gc tag to the logging framework
brutisso
parents: 33763
diff changeset
    72
  LOG_TAG(gc) \
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
    73
  LOG_TAG(handshake) \
42073
89e056fd82cc 8166145: runtime/threads/ThreadInterruptTest3 fails with ExitCode 0
gziemski
parents: 41727
diff changeset
    74
  LOG_TAG(hashtables) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    75
  LOG_TAG(heap) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    76
  LOG_TAG(humongous) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    77
  LOG_TAG(ihop) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    78
  LOG_TAG(iklass) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    79
  LOG_TAG(init) \
46270
2e7898927798 8172285: UL support for PrintCompilation
ysuenaga
parents: 46269
diff changeset
    80
  LOG_TAG(inlining) \
46996
9cbcd7082efe 8186042: Optimize OopMapCache lookup
coleenp
parents: 46732
diff changeset
    81
  LOG_TAG(interpreter) \
35463
b32e362563bb 8141564: Convert TraceItables and PrintVtables to Unified Logging
rprotacio
parents: 35219
diff changeset
    82
  LOG_TAG(itables) \
46270
2e7898927798 8172285: UL support for PrintCompilation
ysuenaga
parents: 46269
diff changeset
    83
  LOG_TAG(jit) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    84
  LOG_TAG(jni) \
37992
c7ec6a3275f7 8154041: JVMTI trace to Unified Logging
rehn
parents: 37462
diff changeset
    85
  LOG_TAG(jvmti) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    86
  LOG_TAG(liveness) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    87
  LOG_TAG(load) /* Trace all classes loaded */ \
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
    88
  LOG_TAG(loader) \
33763
cec2333f839c 8140348: Convert TraceSafepoint to Unified Logging
rprotacio
parents: 33736
diff changeset
    89
  LOG_TAG(logging) \
48859
5a4d08efbad9 6909265: assert(_OnDeck != Self->_MutexEvent,"invariant") with -XX:+PrintMallocFree
coleenp
parents: 48787
diff changeset
    90
  LOG_TAG(malloc) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    91
  LOG_TAG(mark) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    92
  LOG_TAG(marking) \
46505
fd4bc78630b1 8174749: Use hash table/oops for MemberName table
coleenp
parents: 46458
diff changeset
    93
  LOG_TAG(membername) \
46405
17ab5460b2cb 8168122: Update logging in perfMemory to Unified Logging
rprotacio
parents: 46270
diff changeset
    94
  LOG_TAG(memops) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    95
  LOG_TAG(methodcomparator) \
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
    96
  LOG_TAG(metadata) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
    97
  LOG_TAG(metaspace) \
38128
22391eb0c22d 8155245: Add logging when MMU target is violated
sjohanss
parents: 37993
diff changeset
    98
  LOG_TAG(mmu) \
44993
f61bcd80ec1f 8178380: Module system implementation refresh (5/2017)
alanb
parents: 42650
diff changeset
    99
  LOG_TAG(module) \
35171
cf7d5a1d0662 8145153: Convert TraceMonitorInflation to Unified Logging
rprotacio
parents: 35061
diff changeset
   100
  LOG_TAG(monitorinflation) \
37203
90eabed33a6c 8150084: Convert TraceMonitorMismatch to Unified Logging.
mockner
parents: 37179
diff changeset
   101
  LOG_TAG(monitormismatch) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   102
  LOG_TAG(nmethod) \
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   103
  LOG_TAG(normalize) \
37993
e446184da25e 8154059: JVMTI ObjectTagging to UL
rehn
parents: 37992
diff changeset
   104
  LOG_TAG(objecttagging) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   105
  LOG_TAG(obsolete) \
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   106
  LOG_TAG(oopmap) \
48787
7638bf98a312 8194312: Support parallel and concurrent JNI global handle processing
kbarrett
parents: 48105
diff changeset
   107
  LOG_TAG(oopstorage) \
35884
ec439aaca107 6515172: Runtime.availableProcessors() ignores Linux taskset command
dholmes
parents: 35463
diff changeset
   108
  LOG_TAG(os) \
37462
58bb9394a98b 8152491: Convert TracePageSizes to use UL
stefank
parents: 37428
diff changeset
   109
  LOG_TAG(pagesize) \
42634
7459867ebf98 8168850: Mark module entries that have been specified by --patch-module
rprotacio
parents: 42073
diff changeset
   110
  LOG_TAG(patch) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
   111
  LOG_TAG(path) \
46405
17ab5460b2cb 8168122: Update logging in perfMemory to Unified Logging
rprotacio
parents: 46270
diff changeset
   112
  LOG_TAG(perf) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   113
  LOG_TAG(phases) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   114
  LOG_TAG(plab) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   115
  LOG_TAG(promotion) \
37094
c12f414936a1 8149995: TraceClassLoadingPreorder has been converted to Unified Logging.
mockner
parents: 37076
diff changeset
   116
  LOG_TAG(preorder) /* Trace all classes loaded in order referenced (not loaded) */ \
36381
b9ed6bef9364 8149064: TraceProtectionDomainVerification has been converted to Unified Logging.
mockner
parents: 36364
diff changeset
   117
  LOG_TAG(protectiondomain) /* "Trace protection domain verification" */ \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   118
  LOG_TAG(ref) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   119
  LOG_TAG(redefine) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   120
  LOG_TAG(refine) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   121
  LOG_TAG(region) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   122
  LOG_TAG(remset) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   123
  LOG_TAG(purge) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
   124
  LOG_TAG(resolve) \
34262
43560e879d6d 8143157: Convert TraceVMOperation to Unified Logging
rprotacio
parents: 33763
diff changeset
   125
  LOG_TAG(safepoint) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   126
  LOG_TAG(scavenge) \
48105
8d15b1369c7a 8167108: inconsistent handling of SR_lock can lead to crashes
dcubed
parents: 47903
diff changeset
   127
  LOG_TAG(smr) \
37064
5c82fa70d313 8150778: Reduce Throwable.getStackTrace() calls to the JVM
coleenp
parents: 37044
diff changeset
   128
  LOG_TAG(stacktrace) \
41664
07e88a4b405f 8160064: StackWalker implementation added logging option without using UL
rprotacio
parents: 40625
diff changeset
   129
  LOG_TAG(stackwalk) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   130
  LOG_TAG(start) \
36178
9739f8c767da 8148630: Convert TraceStartupTime to Unified Logging
rprotacio
parents: 35925
diff changeset
   131
  LOG_TAG(startuptime) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   132
  LOG_TAG(state) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   133
  LOG_TAG(stats) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   134
  LOG_TAG(stringdedup) \
37147
3560f05bd7c7 8152104: G1 StringTable cleaning incorrectly logs with the stringdedup tag
stefank
parents: 37094
diff changeset
   135
  LOG_TAG(stringtable) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   136
  LOG_TAG(stackmap) \
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   137
  LOG_TAG(subclass) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   138
  LOG_TAG(survivor) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   139
  LOG_TAG(sweep) \
46505
fd4bc78630b1 8174749: Use hash table/oops for MemberName table
coleenp
parents: 46458
diff changeset
   140
  LOG_TAG(table) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   141
  LOG_TAG(task) \
37201
928cf689af1a 8151993: Remove inclusion of inline.hpp in log.hpp
mlarsson
parents: 37179
diff changeset
   142
  DEBUG_ONLY(LOG_TAG(test)) \
36355
dd339cbafd31 8149036: Add tracing for thread related events at os level
stuefe
parents: 36186
diff changeset
   143
  LOG_TAG(thread) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   144
  LOG_TAG(tlab) \
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   145
  LOG_TAG(time) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   146
  LOG_TAG(timer) \
49607
acffe6ff3ae7 8180415: Rebuild remembered sets during the concurrent cycle
tschatzl
parents: 49329
diff changeset
   147
  LOG_TAG(tracking) \
38259
b495d1cfe673 8153535: Convert TraceRedefineClasses to Unified Logging
rehn
parents: 38151
diff changeset
   148
  LOG_TAG(update) \
38151
fffedc5e5cf8 8154110: Update class* and safepoint* logging subsystems
mockner
parents: 38128
diff changeset
   149
  LOG_TAG(unload) /* Trace unloading of classes */ \
47103
a993ec29ec75 8186842: Use Java class loaders for creating the CDS archive
ccheung
parents: 46996
diff changeset
   150
  LOG_TAG(unshareable) \
49329
04ed29f9ef33 8194759: Support caching class mirror objects.
jiangli
parents: 49163
diff changeset
   151
  LOG_TAG(mirror) \
37261
659ed5b20b48 8153026: Change logging tag 'verboseverification' to 'verification'
rprotacio
parents: 37225
diff changeset
   152
  LOG_TAG(verification) \
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34656
diff changeset
   153
  LOG_TAG(verify) \
35463
b32e362563bb 8141564: Convert TraceItables and PrintVtables to Unified Logging
rprotacio
parents: 35219
diff changeset
   154
  LOG_TAG(vmoperation) \
46732
05423d4b10d2 8185273: Test8004741.java crashes with SIGSEGV in JDK10-hs nightly
dcubed
parents: 46522
diff changeset
   155
  LOG_TAG(vmthread) \
37076
158a5a5f913a 8151265: Add a way to extend UL tags
rehn
parents: 37064
diff changeset
   156
  LOG_TAG(vtables) \
37225
ac6c704f9a8c 8153187: Convert TraceWorkGang to use unified logging
brutisso
parents: 37216
diff changeset
   157
  LOG_TAG(workgang) \
37076
158a5a5f913a 8151265: Add a way to extend UL tags
rehn
parents: 37064
diff changeset
   158
  LOG_TAG_LIST_EXT
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   159
34656
501b8f1784c4 8144146: Unified Logging tags cannot be reserved keywords
mlarsson
parents: 34629
diff changeset
   160
#define PREFIX_LOG_TAG(T) (LogTag::_##T)
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   161
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   162
// Expand a set of log tags to their prefixed names.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   163
// For error detection purposes, the macro passes one more tag than what is supported.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   164
// If too many tags are given, a static assert in the log class will fail.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   165
#define LOG_TAGS_EXPANDED(T0, T1, T2, T3, T4, T5, ...)  PREFIX_LOG_TAG(T0), PREFIX_LOG_TAG(T1), PREFIX_LOG_TAG(T2), \
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   166
                                                        PREFIX_LOG_TAG(T3), PREFIX_LOG_TAG(T4), PREFIX_LOG_TAG(T5)
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   167
// The EXPAND_VARARGS macro is required for MSVC, or it will resolve the LOG_TAGS_EXPANDED macro incorrectly.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   168
#define EXPAND_VARARGS(x) x
34656
501b8f1784c4 8144146: Unified Logging tags cannot be reserved keywords
mlarsson
parents: 34629
diff changeset
   169
#define LOG_TAGS(...) EXPAND_VARARGS(LOG_TAGS_EXPANDED(__VA_ARGS__, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG, _NO_TAG))
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   170
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   171
// Log tags are used to classify log messages.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   172
// Each log message can be assigned between 1 to LogTag::MaxTags number of tags.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   173
// Specifying multiple tags for a log message means that only outputs configured
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   174
// for those exact tags, or a subset of the tags with a wildcard, will see the logging.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   175
// Multiple tags should be comma separated, e.g. log_error(tag1, tag2)("msg").
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   176
class LogTag : public AllStatic {
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   177
 public:
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   178
  // The maximum number of tags that a single log message can have.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   179
  // E.g. there might be hundreds of different tags available,
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   180
  // but a specific log message can only be tagged with up to MaxTags of those.
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   181
  static const size_t MaxTags = 5;
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   182
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   183
  enum type {
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   184
    __NO_TAG,
34656
501b8f1784c4 8144146: Unified Logging tags cannot be reserved keywords
mlarsson
parents: 34629
diff changeset
   185
#define LOG_TAG(name) _##name,
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   186
    LOG_TAG_LIST
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   187
#undef LOG_TAG
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   188
    Count
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   189
  };
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   190
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   191
  static const char* name(LogTag::type tag) {
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   192
    return _name[tag];
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   193
  }
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   194
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   195
  static LogTag::type from_string(const char *str);
49163
580bb0b85f63 8198554: Add fuzzy matching for log levels and tags when parsing -Xlog
mlarsson
parents: 49015
diff changeset
   196
  static LogTag::type fuzzy_match(const char *tag);
49015
a12c9536d8a6 8176298: Log tags in -Xlog:help not sorted
mlarsson
parents: 48975
diff changeset
   197
  static void list_tags(outputStream* out);
33097
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   198
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   199
 private:
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   200
  static const char* _name[];
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   201
};
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   202
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   203
typedef LogTag::type LogTagType;
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   204
96e348cb0442 8046148: JEP 158: Unified JVM Logging
mlarsson
parents:
diff changeset
   205
#endif // SHARE_VM_LOGGING_LOGTAG_HPP