changeset 10776:d63aab8f7cb6

Merge
author stefank
date Mon, 04 Apr 2016 11:32:04 +0200
parents 14c47dfcbfe8 4a0121d1e772
children eb591308c2a2 4c596ac49e42
files src/share/vm/gc/cms/compactibleFreeListSpace.cpp src/share/vm/gc/g1/heapRegion.cpp src/share/vm/logging/log.cpp
diffstat 51 files changed, 144 insertions(+), 143 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/classFileParser.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -5700,7 +5700,7 @@
   if (!is_internal()) {
     if (log_is_enabled(Debug, classload, preorder)){
       ResourceMark rm(THREAD);
-      outputStream* log = LogHandle(classload, preorder)::debug_stream();
+      outputStream* log = Log(classload, preorder)::debug_stream();
       log->print("%s", _class_name->as_klass_external_name());
       if (stream->source() != NULL) {
         log->print(" source: %s", stream->source());
--- a/src/share/vm/classfile/classLoader.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/classLoader.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -535,7 +535,7 @@
 void ClassLoader::trace_class_path(const char* msg, const char* name) {
   if (log_is_enabled(Info, classpath)) {
     ResourceMark rm;
-    outputStream* out = LogHandle(classpath)::info_stream();
+    outputStream* out = Log(classpath)::info_stream();
     if (msg) {
       out->print("%s", msg);
     }
--- a/src/share/vm/classfile/classLoaderData.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/classLoaderData.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -357,7 +357,7 @@
 
   if (log_is_enabled(Debug, classloaderdata)) {
     ResourceMark rm;
-    outputStream* log = LogHandle(classloaderdata)::debug_stream();
+    outputStream* log = Log(classloaderdata)::debug_stream();
     log->print(": unload loader data " INTPTR_FORMAT, p2i(this));
     log->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)class_loader()),
                loader_name());
@@ -717,7 +717,7 @@
   }
 
   ResourceMark rm;
-  outputStream* log = LogHandle(classloaderdata)::debug_stream();
+  outputStream* log = Log(classloaderdata)::debug_stream();
   log->print("create class loader data " INTPTR_FORMAT, p2i(cld));
   log->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)cld->class_loader()),
              cld->loader_name());
@@ -859,7 +859,7 @@
       array->push(curr);
 
       if (log_is_enabled(Debug, classloaderdata)) {
-        outputStream* log = LogHandle(classloaderdata)::debug_stream();
+        outputStream* log = Log(classloaderdata)::debug_stream();
         log->print("found new CLD: ");
         curr->print_value_on(log);
         log->cr();
--- a/src/share/vm/classfile/defaultMethods.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/defaultMethods.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -437,7 +437,7 @@
       _exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
       if (log_is_enabled(Debug, defaultmethods)) {
         ResourceMark rm;
-        outputStream* logstream = LogHandle(defaultmethods)::debug_stream();
+        outputStream* logstream = Log(defaultmethods)::debug_stream();
         _exception_message->print_value_on(logstream);
         logstream->cr();
       }
@@ -663,7 +663,7 @@
   if (log_is_enabled(Debug, defaultmethods)) {
     log_debug(defaultmethods)("Slots that need filling:");
     ResourceMark rm;
-    outputStream* logstream = LogHandle(defaultmethods)::debug_stream();
+    outputStream* logstream = Log(defaultmethods)::debug_stream();
     streamIndentor si(logstream);
     for (int i = 0; i < slots->length(); ++i) {
       logstream->indent();
@@ -799,7 +799,7 @@
     log_debug(defaultmethods)("%s %s requires default method processing",
                               klass->is_interface() ? "Interface" : "Class",
                               klass->name()->as_klass_external_name());
-    PrintHierarchy printer(LogHandle(defaultmethods)::debug_stream());
+    PrintHierarchy printer(Log(defaultmethods)::debug_stream());
     printer.run(klass);
   }
 
@@ -809,7 +809,7 @@
   for (int i = 0; i < empty_slots->length(); ++i) {
     EmptyVtableSlot* slot = empty_slots->at(i);
     if (log_is_enabled(Debug, defaultmethods)) {
-      outputStream* logstream = LogHandle(defaultmethods)::debug_stream();
+      outputStream* logstream = Log(defaultmethods)::debug_stream();
       streamIndentor si(logstream, 2);
       logstream->indent().print("Looking for default methods for slot ");
       slot->print_on(logstream);
@@ -917,7 +917,7 @@
 
       if (log_is_enabled(Debug, defaultmethods)) {
         ResourceMark rm;
-        outputStream* logstream = LogHandle(defaultmethods)::debug_stream();
+        outputStream* logstream = Log(defaultmethods)::debug_stream();
         logstream->print("for slot: ");
         slot->print_on(logstream);
         logstream->cr();
--- a/src/share/vm/classfile/dictionary.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/dictionary.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -137,7 +137,7 @@
   }
   if (log_is_enabled(Trace, protectiondomain)) {
     ResourceMark rm;
-    outputStream* log = LogHandle(protectiondomain)::trace_stream();
+    outputStream* log = Log(protectiondomain)::trace_stream();
     print_count(log);
   }
 }
--- a/src/share/vm/classfile/loaderConstraints.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/loaderConstraints.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -113,7 +113,7 @@
         probe->set_klass(NULL);
         if (log_is_enabled(Info, constraints)) {
           ResourceMark rm;
-          outputStream* out = LogHandle(classload, constraints)::info_stream();
+          outputStream* out = Log(classload, constraints)::info_stream();
           out->print_cr("purging class object from constraint for name %s,"
                      " loader list:",
                      probe->name()->as_C_string());
@@ -129,7 +129,7 @@
         if (probe->loader_data(n)->is_unloading()) {
             if (log_is_enabled(Info, classload, constraints)) {
               ResourceMark rm;
-              outputStream* out = LogHandle(classload, constraints)::info_stream();
+              outputStream* out = Log(classload, constraints)::info_stream();
               out->print_cr("purging loader %s from constraint for name %s",
                             probe->loader_data(n)->loader_name(),
                             probe->name()->as_C_string()
@@ -144,7 +144,7 @@
 
             if (log_is_enabled(Info, classload, constraints)) {
               ResourceMark rm;
-              outputStream* out = LogHandle(classload, constraints)::info_stream();
+              outputStream* out = Log(classload, constraints)::info_stream();
               out->print_cr("new loader list:");
               for (int i = 0; i < probe->num_loaders(); i++) {
                 out->print_cr("    [%d]: %s", i,
@@ -161,7 +161,7 @@
       if (probe->num_loaders() < 2) {
             if (log_is_enabled(Info, classload, constraints)) {
               ResourceMark rm;
-              outputStream* out = LogHandle(classload, constraints)::info_stream();
+              outputStream* out = Log(classload, constraints)::info_stream();
               out->print_cr("purging complete constraint for name %s",
                          probe->name()->as_C_string());
             }
@@ -233,7 +233,7 @@
         set_entry(index, p);
         if (log_is_enabled(Info, classload, constraints)) {
           ResourceMark rm;
-          outputStream* out = LogHandle(classload, constraints)::info_stream();
+          outputStream* out = Log(classload, constraints)::info_stream();
           out->print_cr("adding new constraint for name: %s, loader[0]: %s,"
                      " loader[1]: %s",
                      class_name->as_C_string(),
@@ -247,7 +247,7 @@
           (*pp1)->set_klass(klass);
           if (log_is_enabled(Info, classload, constraints)) {
             ResourceMark rm;
-            outputStream* out = LogHandle(classload, constraints)::info_stream();
+            outputStream* out = Log(classload, constraints)::info_stream();
             out->print_cr("setting class object in existing constraint for"
                        " name: %s and loader %s",
                        class_name->as_C_string(),
@@ -269,7 +269,7 @@
 
   if (failure_code != 0 && log_is_enabled(Info, classload, constraints)) {
     ResourceMark rm;
-    outputStream* out = LogHandle(classload, constraints)::info_stream();
+    outputStream* out = Log(classload, constraints)::info_stream();
     const char* reason = "";
     switch(failure_code) {
     case 1: reason = "the class objects presented by loader[0] and loader[1]"
@@ -302,7 +302,7 @@
   if (p && p->klass() != NULL && p->klass() != k()) {
     if (log_is_enabled(Info, classload, constraints)) {
       ResourceMark rm;
-      outputStream* out = LogHandle(classload, constraints)::info_stream();
+      outputStream* out = Log(classload, constraints)::info_stream();
       out->print_cr("constraint check failed for name %s, loader %s: "
                  "the presented class object differs from that stored",
                  name->as_C_string(),
@@ -314,7 +314,7 @@
       p->set_klass(k());
       if (log_is_enabled(Info, classload, constraints)) {
         ResourceMark rm;
-        outputStream* out = LogHandle(classload, constraints)::info_stream();
+        outputStream* out = Log(classload, constraints)::info_stream();
         out->print_cr("updating constraint for name %s, loader %s, "
                    "by setting class object",
                    name->as_C_string(),
@@ -364,7 +364,7 @@
   p->set_num_loaders(num + 1);
   if (log_is_enabled(Info, classload, constraints)) {
     ResourceMark rm;
-    outputStream* out = LogHandle(classload, constraints)::info_stream();
+    outputStream* out = Log(classload, constraints)::info_stream();
     out->print_cr("extending constraint for name %s by adding loader[%d]: %s %s",
                p->name()->as_C_string(),
                num,
@@ -404,7 +404,7 @@
 
   if (log_is_enabled(Info, classload, constraints)) {
     ResourceMark rm;
-    outputStream* out = LogHandle(classload, constraints)::info_stream();
+    outputStream* out = Log(classload, constraints)::info_stream();
     out->print_cr("merged constraints for name %s, new loader list:",
                   p1->name()->as_C_string()
                   );
--- a/src/share/vm/classfile/modules.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/modules.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -480,7 +480,7 @@
   }
 
   if (log_is_enabled(Debug, modules)) {
-    outputStream* logst = LogHandle(modules)::debug_stream();
+    outputStream* logst = Log(modules)::debug_stream();
     logst->print("define_module(): creation of module: %s, version: %s, location: %s, ",
                  module_name, module_version != NULL ? module_version : "NULL",
                  module_location != NULL ? module_location : "NULL");
@@ -789,7 +789,7 @@
 
   if (log_is_enabled(Debug, modules)) {
     ResourceMark rm(THREAD);
-    outputStream* logst = LogHandle(modules)::debug_stream();
+    outputStream* logst = Log(modules)::debug_stream();
     Klass* klass = java_lang_Class::as_Klass(mirror);
     oop module_name = java_lang_reflect_Module::name(module);
     if (module_name != NULL) {
--- a/src/share/vm/classfile/sharedPathsMiscInfo.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/sharedPathsMiscInfo.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -74,7 +74,7 @@
 
 void SharedPathsMiscInfo::print_path(int type, const char* path) {
   ResourceMark rm;
-  outputStream* out = LogHandle(classpath)::info_stream();
+  outputStream* out = Log(classpath)::info_stream();
   switch (type) {
   case BOOT:
     out->print("Expecting BOOT path=%s", path);
--- a/src/share/vm/classfile/systemDictionary.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/systemDictionary.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -436,7 +436,7 @@
   if (log_is_enabled(Debug, protectiondomain)) {
     ResourceMark rm;
     // Print out trace information
-    outputStream* log = LogHandle(protectiondomain)::debug_stream();
+    outputStream* log = Log(protectiondomain)::debug_stream();
     log->print_cr("Checking package access");
     log->print("class loader: "); class_loader()->print_value_on(log);
     log->print(" protection domain: "); protection_domain()->print_value_on(log);
--- a/src/share/vm/classfile/verifier.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/classfile/verifier.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -191,10 +191,10 @@
   }
 
   if (log_is_enabled(Info, classinit)){
-    log_end_verification(LogHandle(classinit)::info_stream(), klassName, exception_name, THREAD);
+    log_end_verification(Log(classinit)::info_stream(), klassName, exception_name, THREAD);
   }
   if (log_is_enabled(Info, verboseverification)){
-    log_end_verification(LogHandle(verboseverification)::info_stream(), klassName, exception_name, THREAD);
+    log_end_verification(Log(verboseverification)::info_stream(), klassName, exception_name, THREAD);
   }
 
   if (HAS_PENDING_EXCEPTION) {
@@ -658,7 +658,7 @@
 
   if (log_is_enabled(Info, verboseverification)) {
     ResourceMark rm(THREAD);
-    stackmap_table.print_on(LogHandle(verboseverification)::info_stream());
+    stackmap_table.print_on(Log(verboseverification)::info_stream());
   }
 
   RawBytecodeStream bcs(m);
@@ -700,7 +700,7 @@
 
       if (log_is_enabled(Info, verboseverification)) {
         ResourceMark rm(THREAD);
-        current_frame.print_on(LogHandle(verboseverification)::info_stream());
+        current_frame.print_on(Log(verboseverification)::info_stream());
         log_info(verboseverification)("offset = %d,  opcode = %s", bci, Bytecodes::name(opcode));
       }
 
--- a/src/share/vm/code/nmethod.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/code/nmethod.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1322,7 +1322,7 @@
 
   // Break cycle between nmethod & method
   if (log_is_enabled(Trace, classunload)) {
-    outputStream* log = LogHandle(classunload)::trace_stream();
+    outputStream* log = Log(classunload)::trace_stream();
     log->print_cr("making nmethod " INTPTR_FORMAT
                   " unloadable, Method*(" INTPTR_FORMAT
                   "), cause(" INTPTR_FORMAT ")",
--- a/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -500,7 +500,7 @@
 
 void CompactibleFreeListSpace::reportFreeListStatistics(const char* title) const {
   assert_lock_strong(&_freelistLock);
-  LogHandle(gc, freelist, stats) log;
+  Log(gc, freelist, stats) log;
   if (!log.is_debug()) {
     return;
   }
@@ -2199,7 +2199,7 @@
       }
     }
     if (res == 0) {
-      LogHandle(gc, verify) log;
+      Log(gc, verify) log;
       log.error("Livelock: no rank reduction!");
       log.error(" Current:  addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n"
                 " Previous: addr = " PTR_FORMAT ", size = " SIZE_FORMAT ", obj = %s, live = %s \n",
@@ -2373,7 +2373,7 @@
 
 void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const {
   assert_lock_strong(&_freelistLock);
-  LogHandle(gc, freelist, census) log;
+  Log(gc, freelist, census) log;
   if (!log.is_debug()) {
     return;
   }
--- a/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -693,7 +693,7 @@
 // At a promotion failure dump information on block layout in heap
 // (cms old generation).
 void ConcurrentMarkSweepGeneration::promotion_failure_occurred() {
-  LogHandle(gc, promotion) log;
+  Log(gc, promotion) log;
   if (log.is_trace()) {
     ResourceMark rm;
     cmsSpace()->dump_at_safepoint_with_locks(collector(), log.trace_stream());
@@ -752,7 +752,7 @@
     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
     assert(desired_capacity >= capacity(), "invalid expansion size");
     size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-    LogHandle(gc) log;
+    Log(gc) log;
     if (log.is_trace()) {
       size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
       log.trace("From compute_new_size: ");
@@ -1117,7 +1117,7 @@
   // ------------------------------------------------------------------
   // Print out lots of information which affects the initiation of
   // a collection.
-  LogHandle(gc) log;
+  Log(gc) log;
   if (log.is_trace() && stats().valid()) {
     log.trace("CMSCollector shouldConcurrentCollect: ");
     ResourceMark rm;
@@ -1605,7 +1605,7 @@
 }
 
 void CMSCollector::print_eden_and_survivor_chunk_arrays() {
-  LogHandle(gc, heap) log;
+  Log(gc, heap) log;
   if (!log.is_trace()) {
     return;
   }
@@ -2221,7 +2221,7 @@
   bool do_bit(size_t offset) {
     HeapWord* addr = _marks->offsetToHeapWord(offset);
     if (!_marks->isMarked(addr)) {
-      LogHandle(gc, verify) log;
+      Log(gc, verify) log;
       ResourceMark rm;
       oop(addr)->print_on(log.error_stream());
       log.error(" (" INTPTR_FORMAT " should have been marked)", p2i(addr));
@@ -2347,7 +2347,7 @@
   VerifyMarkedClosure vcl(markBitMap());
   verification_mark_bm()->iterate(&vcl);
   if (vcl.failed()) {
-    LogHandle(gc, verify) log;
+    Log(gc, verify) log;
     log.error("Failed marking verification after remark");
     ResourceMark rm;
     gch->print_on(log.error_stream());
@@ -5874,7 +5874,7 @@
   if (_span.contains(addr)) {
     _verification_bm->mark(addr);
     if (!_cms_bm->isMarked(addr)) {
-      LogHandle(gc, verify) log;
+      Log(gc, verify) log;
       ResourceMark rm;
       oop(addr)->print_on(log.error_stream());
       log.error(" (" INTPTR_FORMAT " should have been marked)", p2i(addr));
@@ -6655,7 +6655,7 @@
     // Oop lies in _span and isn't yet grey or black
     _verification_bm->mark(addr);            // now grey
     if (!_cms_bm->isMarked(addr)) {
-      LogHandle(gc, verify) log;
+      Log(gc, verify) log;
       ResourceMark rm;
       oop(addr)->print_on(log.error_stream());
       log.error(" (" INTPTR_FORMAT " should have been marked)", p2i(addr));
@@ -7062,7 +7062,7 @@
   assert(_limit >= _sp->bottom() && _limit <= _sp->end(),
          "sweep _limit out of bounds");
   if (inFreeRange()) {
-    LogHandle(gc, sweep) log;
+    Log(gc, sweep) log;
     log.error("inFreeRange() should have been reset; dumping state of SweepClosure");
     ResourceMark rm;
     print_on(log.error_stream());
--- a/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -398,7 +398,7 @@
 }
 
 void ParScanThreadStateSet::print_termination_stats() {
-  LogHandle(gc, task, stats) log;
+  Log(gc, task, stats) log;
   if (!log.is_debug()) {
     return;
   }
@@ -430,7 +430,7 @@
   if (!log_develop_is_enabled(Trace, gc, task, stats)) {
     return;
   }
-  LogHandle(gc, task, stats) log;
+  Log(gc, task, stats) log;
   ResourceMark rm;
   outputStream* st = log.trace_stream();
   print_taskqueue_stats_hdr(st);
--- a/src/share/vm/gc/cms/parOopClosures.inline.hpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/cms/parOopClosures.inline.hpp	Mon Apr 04 11:32:04 2016 +0200
@@ -82,7 +82,7 @@
     if ((HeapWord*)obj < _boundary) {
 #ifndef PRODUCT
       if (_g->to()->is_in_reserved(obj)) {
-        LogHandle(gc) log;
+        Log(gc) log;
         log.error("Scanning field (" PTR_FORMAT ") twice?", p2i(p));
         GenCollectedHeap* gch = GenCollectedHeap::heap();
         Space* sp = gch->space_containing(p);
--- a/src/share/vm/gc/g1/g1AllocRegion.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1AllocRegion.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -201,7 +201,7 @@
   // and the result are considered part of detailed tracing and are
   // skipped during other tracing.
 
-  LogHandle(gc, alloc, region) log;
+  Log(gc, alloc, region) log;
 
   if (!log.is_debug()) {
     return;
--- a/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -2676,7 +2676,7 @@
 }
 
 void G1CollectedHeap::print_heap_regions() const {
-  LogHandle(gc, heap, region) log;
+  Log(gc, heap, region) log;
   if (log.is_trace()) {
     ResourceMark rm;
     print_regions_on(log.trace_stream());
@@ -3112,7 +3112,7 @@
   if (!log_is_enabled(Trace, gc, task, stats)) {
     return;
   }
-  LogHandle(gc, task, stats) log;
+  Log(gc, task, stats) log;
   ResourceMark rm;
   outputStream* st = log.trace_stream();
 
--- a/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -2620,7 +2620,7 @@
 }
 
 void G1ConcurrentMark::print_summary_info() {
-  LogHandle(gc, marking) log;
+  Log(gc, marking) log;
   if (!log.is_trace()) {
     return;
   }
--- a/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -181,7 +181,7 @@
 
 template <class T>
 void G1GCPhaseTimes::details(T* phase, const char* indent) {
-  LogHandle(gc, phases, task) log;
+  Log(gc, phases, task) log;
   if (log.is_level(LogLevel::Trace)) {
     outputStream* trace_out = log.trace_stream();
     trace_out->print("%s", indent);
@@ -203,7 +203,7 @@
 }
 
 void G1GCPhaseTimes::debug_phase(WorkerDataArray<double>* phase) {
-  LogHandle(gc, phases) log;
+  Log(gc, phases) log;
   if (log.is_level(LogLevel::Debug)) {
     ResourceMark rm;
     log_phase(phase, 2, log.debug_stream(), true);
@@ -211,7 +211,7 @@
 }
 
 void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>* phase, bool print_sum) {
-  LogHandle(gc, phases) log;
+  Log(gc, phases) log;
   if (log.is_level(LogLevel::Trace)) {
     ResourceMark rm;
     log_phase(phase, 3, log.trace_stream(), print_sum);
--- a/src/share/vm/gc/g1/g1HeapVerifier.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1HeapVerifier.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -60,7 +60,7 @@
     if (!oopDesc::is_null(heap_oop)) {
       oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
       if (_g1h->is_obj_dead_cond(obj, _vo)) {
-        LogHandle(gc, verify) log;
+        Log(gc, verify) log;
         log.info("Root location " PTR_FORMAT " points to dead obj " PTR_FORMAT, p2i(p), p2i(obj));
         if (_vo == VerifyOption_G1UseMarkWord) {
           log.error("  Mark word: " PTR_FORMAT, p2i(obj->mark()));
@@ -406,7 +406,7 @@
     // It helps to have the per-region information in the output to
     // help us track down what went wrong. This is why we call
     // print_extended_on() instead of print_on().
-    LogHandle(gc, verify) log;
+    Log(gc, verify) log;
     ResourceMark rm;
     _g1h->print_extended_on(log.error_stream());
   }
--- a/src/share/vm/gc/g1/g1RemSet.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1RemSet.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -536,7 +536,7 @@
     current.initialize(this);
     _prev_period_summary.subtract_from(&current);
 
-    LogHandle(gc, remset) log;
+    Log(gc, remset) log;
     log.trace("%s", header);
     ResourceMark rm;
     _prev_period_summary.print_on(log.trace_stream());
@@ -546,7 +546,7 @@
 }
 
 void G1RemSet::print_summary_info() {
-  LogHandle(gc, remset, exit) log;
+  Log(gc, remset, exit) log;
   if (log.is_trace()) {
     log.trace(" Cumulative RS summary");
     G1RemSetSummary current;
--- a/src/share/vm/gc/g1/g1StringDedupTable.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/g1StringDedupTable.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -570,7 +570,7 @@
 }
 
 void G1StringDedupTable::print_statistics() {
-  LogHandle(gc, stringdedup) log;
+  Log(gc, stringdedup) log;
   log.debug("   [Table]");
   log.debug("      [Memory Usage: " G1_STRDEDUP_BYTES_FORMAT_NS "]",
             G1_STRDEDUP_BYTES_PARAM(_table->_size * sizeof(G1StringDedupEntry*) + (_table->_entries + _entry_cache->size()) * sizeof(G1StringDedupEntry)));
--- a/src/share/vm/gc/g1/heapRegion.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/g1/heapRegion.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -694,7 +694,7 @@
   template <class T>
   void verify_liveness(T* p) {
     T heap_oop = oopDesc::load_heap_oop(p);
-    LogHandle(gc, verify) log;
+    Log(gc, verify) log;
     if (!oopDesc::is_null(heap_oop)) {
       oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
       bool failed = false;
@@ -748,7 +748,7 @@
   template <class T>
   void verify_remembered_set(T* p) {
     T heap_oop = oopDesc::load_heap_oop(p);
-    LogHandle(gc, verify) log;
+    Log(gc, verify) log;
     if (!oopDesc::is_null(heap_oop)) {
       oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
       bool failed = false;
--- a/src/share/vm/gc/parallel/adjoiningGenerations.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/parallel/adjoiningGenerations.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -120,7 +120,7 @@
 }
 
 void log_before_expansion(bool old, size_t expand_in_bytes, size_t change_in_bytes, size_t max_size) {
-  LogHandle(heap, ergo) log;
+  Log(heap, ergo) log;
   if (!log.is_debug()) {
    return;
   }
@@ -133,7 +133,7 @@
 }
 
 void log_after_expansion(bool old, size_t max_size) {
-  LogHandle(heap, ergo) log;
+  Log(heap, ergo) log;
   if (!log.is_debug()) {
    return;
   }
--- a/src/share/vm/gc/parallel/asPSOldGen.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/parallel/asPSOldGen.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -126,7 +126,7 @@
   // Also adjust for inter-generational alignment
   size_t result_aligned = align_size_down(result, gen_alignment);
 
-  LogHandle(gc, ergo) log;
+  Log(gc, ergo) log;
   if (log.is_trace()) {
     size_t working_promoted = (size_t) policy->avg_promoted()->padded_average();
     size_t promo_increment = policy->promo_increment(max_contraction);
--- a/src/share/vm/gc/parallel/gcTaskManager.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/parallel/gcTaskManager.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -405,7 +405,7 @@
     for (uint t = 0; t < workers(); t += 1) {
       set_thread(t, GCTaskThread::create(this, t, processor_assignment[t]));
     }
-    LogHandle(gc, task, thread) log;
+    Log(gc, task, thread) log;
     if (log.is_trace()) {
       ResourceMark rm;
       outputStream* out = log.trace_stream();
--- a/src/share/vm/gc/parallel/psParallelCompact.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/parallel/psParallelCompact.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -198,7 +198,7 @@
   if (!log_develop_is_enabled(Trace, gc, compaction)) {
     return;
   }
-  LogHandle(gc, compaction) log;
+  Log(gc, compaction) log;
   ResourceMark rm;
   Universe::print_on(log.trace_stream());
   log.trace("space  bottom     top        end        new_top");
@@ -2175,7 +2175,7 @@
 // Helper class to print 8 region numbers per line and then print the total at the end.
 class FillableRegionLogger : public StackObj {
 private:
-  LogHandle(gc, compaction) log;
+  Log(gc, compaction) log;
   static const int LineLength = 8;
   size_t _regions[LineLength];
   int _next_index;
@@ -2377,7 +2377,7 @@
     return;
   }
 
-  LogHandle(gc, compaction) log;
+  Log(gc, compaction) log;
   ResourceMark rm;
   outputStream* out = log.trace_stream();
 
--- a/src/share/vm/gc/parallel/psPromotionManager.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/parallel/psPromotionManager.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -151,7 +151,7 @@
   if (!log_develop_is_enabled(Trace, gc, task, stats)) {
     return;
   }
-  LogHandle(gc, task, stats) log;
+  Log(gc, task, stats) log;
   ResourceMark rm;
   outputStream* out = log.trace_stream();
   out->print_cr("== GC Tasks Stats, GC %3d",
--- a/src/share/vm/gc/shared/collectedHeap.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/shared/collectedHeap.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -580,7 +580,7 @@
     HeapDumper::dump_heap();
   }
 
-  LogHandle(gc, classhisto) log;
+  Log(gc, classhisto) log;
   if (log.is_trace()) {
     GCTraceTime(Trace, gc, classhisto) tm(before ? "Class Histogram (before full gc)" : "Class Histogram (after full gc)", timer);
     ResourceMark rm;
--- a/src/share/vm/gc/shared/gcLocker.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/shared/gcLocker.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -75,7 +75,7 @@
 #endif
 
 void GCLocker::log_debug_jni(const char* msg) {
-  LogHandle(gc, jni) log;
+  Log(gc, jni) log;
   if (log.is_debug()) {
     ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
     log.debug("%s Thread \"%s\" %d locked.", msg, Thread::current()->name(), _jni_lock_count);
--- a/src/share/vm/gc/shared/gcTraceTime.inline.hpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/shared/gcTraceTime.inline.hpp	Mon Apr 04 11:32:04 2016 +0200
@@ -45,11 +45,11 @@
   // Get log with start tag appended (replace first occurrence of NO_TAG)
   const LogTagType start_tag = PREFIX_LOG_TAG(start);
   const LogTagType no_tag = PREFIX_LOG_TAG(_NO_TAG);
-  Log<T0,
-      T1 == no_tag ? start_tag : T1,
-      T1 != no_tag && T2 == no_tag ? start_tag : T2,
-      T2 != no_tag && T3 == no_tag ? start_tag : T3,
-      T3 != no_tag && T4 == no_tag ? start_tag : T4
+  LogImpl<T0,
+          T1 == no_tag ? start_tag : T1,
+          T1 != no_tag && T2 == no_tag ? start_tag : T2,
+          T2 != no_tag && T3 == no_tag ? start_tag : T3,
+          T3 != no_tag && T4 == no_tag ? start_tag : T4
     > log;
 
   if (log.is_level(Level)) {
@@ -73,14 +73,14 @@
     stop_msg.append(" (%s)", GCCause::to_string(_gc_cause));
   }
   if (_heap_usage_before == SIZE_MAX) {
-    Log<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_TIME_FORMAT,
+    LogImpl<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_TIME_FORMAT,
         stop_msg.buffer(), start_time_in_secs, stop_time_in_secs, duration_in_ms);
   } else {
     CollectedHeap* heap = Universe::heap();
     size_t used_before_m = _heap_usage_before / M;
     size_t used_m = heap->used() / M;
     size_t capacity_m = heap->capacity() / M;
-    Log<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_HEAP_FORMAT " " LOG_STOP_TIME_FORMAT,
+    LogImpl<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_HEAP_FORMAT " " LOG_STOP_TIME_FORMAT,
         stop_msg.buffer(), used_before_m, used_m, capacity_m, start_time_in_secs, stop_time_in_secs, duration_in_ms);
   }
 }
@@ -94,7 +94,7 @@
 
 template <LogLevelType Level, LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag >
 GCTraceTimeImpl<Level, T0, T1, T2, T3, T4, GuardTag>::GCTraceTimeImpl(const char* title, GCTimer* timer, GCCause::Cause gc_cause, bool log_heap_usage) :
-  _enabled(Log<T0, T1, T2, T3, T4, GuardTag>::is_level(Level)),
+  _enabled(LogImpl<T0, T1, T2, T3, T4, GuardTag>::is_level(Level)),
   _start_ticks(),
   _heap_usage_before(SIZE_MAX),
   _title(title),
@@ -127,9 +127,9 @@
 
 template <LogLevelType Level, LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag >
 GCTraceConcTimeImpl<Level, T0, T1, T2, T3, T4, GuardTag>::GCTraceConcTimeImpl(const char* title) :
-  _enabled(Log<T0, T1, T2, T3, T4, GuardTag>::is_level(Level)), _start_time(os::elapsed_counter()), _title(title) {
+  _enabled(LogImpl<T0, T1, T2, T3, T4, GuardTag>::is_level(Level)), _start_time(os::elapsed_counter()), _title(title) {
   if (_enabled) {
-    Log<T0, T1, T2, T3, T4>::template write<Level>("%s (%.3fs)", _title, TimeHelper::counter_to_seconds(_start_time));
+    LogImpl<T0, T1, T2, T3, T4>::template write<Level>("%s (%.3fs)", _title, TimeHelper::counter_to_seconds(_start_time));
   }
 }
 
@@ -137,7 +137,7 @@
 GCTraceConcTimeImpl<Level, T0, T1, T2, T3, T4, GuardTag>::~GCTraceConcTimeImpl() {
   if (_enabled) {
     jlong stop_time = os::elapsed_counter();
-    Log<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_TIME_FORMAT,
+    LogImpl<T0, T1, T2, T3, T4>::template write<Level>("%s " LOG_STOP_TIME_FORMAT,
                                                    _title,
                                                    TimeHelper::counter_to_seconds(_start_time),
                                                    TimeHelper::counter_to_seconds(stop_time),
--- a/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/gc/shared/threadLocalAllocBuffer.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -242,7 +242,7 @@
 }
 
 void ThreadLocalAllocBuffer::print_stats(const char* tag) {
-  LogHandle(gc, tlab) log;
+  Log(gc, tlab) log;
   if (!log.is_trace()) {
     return;
   }
@@ -385,7 +385,7 @@
 }
 
 void GlobalTLABStats::print() {
-  LogHandle(gc, tlab) log;
+  Log(gc, tlab) log;
   if (!log.is_debug()) {
     return;
   }
--- a/src/share/vm/interpreter/linkResolver.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/interpreter/linkResolver.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -749,9 +749,9 @@
   ResourceMark rm;
   outputStream* st;
   if (logitables) {
-    st = LogHandle(itables)::trace_stream();
+    st = Log(itables)::trace_stream();
   } else {
-    st = LogHandle(vtables)::trace_stream();
+    st = Log(vtables)::trace_stream();
   }
   st->print("%s%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
             prefix,
--- a/src/share/vm/logging/log.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/logging/log.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -90,7 +90,7 @@
  private:
   char* _saved_config;
   char* _new_output;
-  LogHandle(logging) _log;
+  Log(logging) _log;
  public:
   TestLogSavedConfig(const char* apply_output = NULL, const char* apply_setting = NULL) : _new_output(0) {
     _saved_config = os::strdup_check_oom(LogOutput::Stdout->config_string());
@@ -152,7 +152,7 @@
 
 void Test_logconfiguration_subscribe() {
   ResourceMark rm;
-  LogHandle(logging) log;
+  Log(logging) log;
 
   TestLogSavedConfig log_cfg("stdout", "logging+test=trace");
 
--- a/src/share/vm/logging/log.hpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/logging/log.hpp	Mon Apr 04 11:32:04 2016 +0200
@@ -43,19 +43,19 @@
 //
 // Note that these macros will not evaluate the arguments unless the logging is enabled.
 //
-#define log_error(...)   (!log_is_enabled(Error, __VA_ARGS__))   ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Error>
-#define log_warning(...) (!log_is_enabled(Warning, __VA_ARGS__)) ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Warning>
-#define log_info(...)    (!log_is_enabled(Info, __VA_ARGS__))    ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Info>
-#define log_debug(...)   (!log_is_enabled(Debug, __VA_ARGS__))   ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Debug>
-#define log_trace(...)   (!log_is_enabled(Trace, __VA_ARGS__))   ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Trace>
+#define log_error(...)   (!log_is_enabled(Error, __VA_ARGS__))   ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Error>
+#define log_warning(...) (!log_is_enabled(Warning, __VA_ARGS__)) ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Warning>
+#define log_info(...)    (!log_is_enabled(Info, __VA_ARGS__))    ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Info>
+#define log_debug(...)   (!log_is_enabled(Debug, __VA_ARGS__))   ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Debug>
+#define log_trace(...)   (!log_is_enabled(Trace, __VA_ARGS__))   ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Trace>
 
 // Macros for logging that should be excluded in product builds.
 // Available for levels Info, Debug and Trace. Includes test macro that
 // evaluates to false in product builds.
 #ifndef PRODUCT
-#define log_develop_info(...)  (!log_is_enabled(Info, __VA_ARGS__))   ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Info>
-#define log_develop_debug(...) (!log_is_enabled(Debug, __VA_ARGS__)) ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Debug>
-#define log_develop_trace(...) (!log_is_enabled(Trace, __VA_ARGS__))  ? (void)0 : Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Trace>
+#define log_develop_info(...)  (!log_is_enabled(Info, __VA_ARGS__))   ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Info>
+#define log_develop_debug(...) (!log_is_enabled(Debug, __VA_ARGS__)) ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Debug>
+#define log_develop_trace(...) (!log_is_enabled(Trace, __VA_ARGS__))  ? (void)0 : LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::Trace>
 #define log_develop_is_enabled(level, ...)  log_is_enabled(level, __VA_ARGS__)
 #else
 #define DUMMY_ARGUMENT_CONSUMER(...)
@@ -66,7 +66,7 @@
 #endif
 
 // Convenience macro to test if the logging is enabled on the specified level for given tags.
-#define log_is_enabled(level, ...) (Log<LOG_TAGS(__VA_ARGS__)>::is_level(LogLevel::level))
+#define log_is_enabled(level, ...) (LogImpl<LOG_TAGS(__VA_ARGS__)>::is_level(LogLevel::level))
 
 //
 // Log class for more advanced logging scenarios.
@@ -77,24 +77,24 @@
 // calls to <level>_stream() functions (trace_stream(), debug_stream(), etc).
 //
 // Example usage:
-//   LogHandle(logging) log;
+//   Log(logging) log;
 //   if (log.is_debug()) {
 //     ...
 //     log.debug("result = %d", result).trace(" tracing info");
 //     obj->print_on(log.debug_stream());
 //   }
 //
-#define LogHandle(...)  Log<LOG_TAGS(__VA_ARGS__)>
+#define Log(...)  LogImpl<LOG_TAGS(__VA_ARGS__)>
 
 template <LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag>
-class Log;
+class LogImpl;
 
 // Non-template helper class for implementing write-slowpath in cpp
 class LogWriteHelper : AllStatic {
  private:
 
   template <LogTagType T0, LogTagType T1, LogTagType T2, LogTagType T3, LogTagType T4, LogTagType GuardTag>
-  friend class Log;
+  friend class LogImpl;
 
   ATTRIBUTE_PRINTF(6, 0)
   static void write_large(LogTagSet& lts,
@@ -108,7 +108,7 @@
 
 template <LogTagType T0, LogTagType T1 = LogTag::__NO_TAG, LogTagType T2 = LogTag::__NO_TAG, LogTagType T3 = LogTag::__NO_TAG,
           LogTagType T4 = LogTag::__NO_TAG, LogTagType GuardTag = LogTag::__NO_TAG>
-class Log VALUE_OBJ_CLASS_SPEC {
+class LogImpl VALUE_OBJ_CLASS_SPEC {
  private:
   static const size_t LogBufferSize = 512;
  public:
@@ -119,7 +119,7 @@
 
   // Empty constructor to avoid warnings on MSVC about unused variables
   // when the log instance is only used for static functions.
-  Log() {
+  LogImpl() {
   }
 
   static bool is_level(LogLevelType level) {
@@ -163,11 +163,11 @@
   }
 
 #define LOG_LEVEL(level, name) ATTRIBUTE_PRINTF(2, 0) \
-  Log& v##name(const char* fmt, va_list args) { \
+  LogImpl& v##name(const char* fmt, va_list args) { \
     vwrite(LogLevel::level, fmt, args); \
     return *this; \
   } \
-  Log& name(const char* fmt, ...) ATTRIBUTE_PRINTF(2, 3) { \
+  LogImpl& name(const char* fmt, ...) ATTRIBUTE_PRINTF(2, 3) { \
     va_list args; \
     va_start(args, fmt); \
     vwrite(LogLevel::level, fmt, args); \
--- a/src/share/vm/logging/logConfiguration.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/logging/logConfiguration.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -74,7 +74,7 @@
 
 void LogConfiguration::post_initialize() {
   LogDiagnosticCommand::registerCommand();
-  LogHandle(logging) log;
+  Log(logging) log;
   log.info("Log configuration fully initialized.");
   log_develop_info(logging)("Develop logging is available.");
   if (log.is_trace()) {
--- a/src/share/vm/logging/logTagSet.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/logging/logTagSet.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -49,10 +49,6 @@
   _output_list.set_output_level(LogOutput::Stderr, LogLevel::Default);
 }
 
-bool LogTagSet::is_level(LogLevelType level) const {
-  return _output_list.is_level(level);
-}
-
 void LogTagSet::update_decorators(const LogDecorators& decorator) {
   LogDecorators new_decorators = decorator;
   for (LogOutputList::Iterator it = _output_list.iterator(); it != _output_list.end(); it++) {
--- a/src/share/vm/logging/logTagSet.hpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/logging/logTagSet.hpp	Mon Apr 04 11:32:04 2016 +0200
@@ -95,7 +95,12 @@
 
   int label(char *buf, size_t len, const char* separator = ",") const;
   bool has_output(const LogOutput* output);
-  bool is_level(LogLevelType level) const;
+
+  // The implementation of this function is put here to ensure
+  // that it is inline:able by the log_is_enabled(level, ...) macro.
+  bool is_level(LogLevelType level) const {
+    return _output_list.is_level(level);
+  }
   void log(LogLevelType level, const char* msg);
 };
 
--- a/src/share/vm/memory/binaryTreeDictionary.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/memory/binaryTreeDictionary.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1190,7 +1190,7 @@
   // Does walking the tree 3 times hurt?
   set_tree_surplus(splitSurplusPercent);
   set_tree_hints();
-  LogHandle(gc, freelist, stats) log;
+  Log(gc, freelist, stats) log;
   if (log.is_trace()) {
     ResourceMark rm;
     report_statistics(log.trace_stream());
@@ -1232,7 +1232,7 @@
   FreeList_t* total() { return &_total; }
   size_t total_free() { return _total_free; }
   void do_list(FreeList<Chunk_t>* fl) {
-    LogHandle(gc, freelist, census) log;
+    Log(gc, freelist, census) log;
     outputStream* out = log.debug_stream();
     if (++_print_line >= 40) {
       ResourceMark rm;
@@ -1246,7 +1246,7 @@
 
 #if INCLUDE_ALL_GCS
   void do_list(AdaptiveFreeList<Chunk_t>* fl) {
-    LogHandle(gc, freelist, census) log;
+    Log(gc, freelist, census) log;
     outputStream* out = log.debug_stream();
     if (++_print_line >= 40) {
       FreeList_t::print_labels_on(out, "size");
--- a/src/share/vm/memory/metaspace.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/memory/metaspace.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -810,7 +810,7 @@
 BlockFreelist::BlockFreelist() : _dictionary(new BlockTreeDictionary()) {}
 
 BlockFreelist::~BlockFreelist() {
-  LogHandle(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist) log;
   if (log.is_trace()) {
     ResourceMark rm;
     dictionary()->print_free_lists(log.trace_stream());
@@ -893,7 +893,7 @@
       "The committed memory doesn't match the expanded memory.");
 
   if (!is_available(chunk_word_size)) {
-    LogHandle(gc, metaspace, freelist) log;
+    Log(gc, metaspace, freelist) log;
     log.debug("VirtualSpaceNode::take_from_committed() not available " SIZE_FORMAT " words ", chunk_word_size);
     // Dump some information about the virtual space that is nearly full
     ResourceMark rm;
@@ -1234,7 +1234,7 @@
   new_entry->mangle();
 #endif
   if (log_is_enabled(Trace, gc, metaspace)) {
-    LogHandle(gc, metaspace) log;
+    Log(gc, metaspace) log;
     VirtualSpaceNode* vsl = current_virtual_space();
     ResourceMark rm;
     vsl->print_on(log.trace_stream());
@@ -1796,7 +1796,7 @@
   assert((word_size <= chunk->word_size()) ||
          list_index(chunk->word_size() == HumongousIndex),
          "Non-humongous variable sized chunk");
-  LogHandle(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist) log;
   if (log.is_debug()) {
     size_t list_count;
     if (list_index(word_size) < HumongousIndex) {
@@ -1995,7 +1995,7 @@
          "Size calculation is wrong, word_size " SIZE_FORMAT
          " chunk_word_size " SIZE_FORMAT,
          word_size, chunk_word_size);
-  LogHandle(gc, metaspace, alloc) log;
+  Log(gc, metaspace, alloc) log;
   if (log.is_debug() && SpaceManager::is_humongous(word_size)) {
     log.debug("Metadata humongous allocation:");
     log.debug("  word_size " PTR_FORMAT, word_size);
@@ -2163,7 +2163,7 @@
 
   dec_total_from_size_metrics();
 
-  LogHandle(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist) log;
   if (log.is_trace()) {
     log.trace("~SpaceManager(): " PTR_FORMAT, p2i(this));
     ResourceMark rm;
@@ -2306,7 +2306,7 @@
   inc_size_metrics(new_chunk->word_size());
 
   assert(new_chunk->is_empty(), "Not ready for reuse");
-  LogHandle(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist) log;
   if (log.is_trace()) {
     log.trace("SpaceManager::add_chunk: " SIZE_FORMAT ") ", sum_count_in_chunks_in_use());
     ResourceMark rm;
@@ -2337,7 +2337,7 @@
                                     medium_chunk_bunch());
   }
 
-  LogHandle(gc, metaspace, alloc) log;
+  Log(gc, metaspace, alloc) log;
   if (log.is_debug() && next != NULL &&
       SpaceManager::is_humongous(next->word_size())) {
     log.debug("  new humongous chunk word size " PTR_FORMAT, next->word_size());
@@ -3037,7 +3037,7 @@
   initialize_class_space(metaspace_rs);
 
   if (log_is_enabled(Trace, gc, metaspace)) {
-    LogHandle(gc, metaspace) log;
+    Log(gc, metaspace) log;
     ResourceMark rm;
     print_compressed_class_space(log.trace_stream(), requested_addr);
   }
@@ -3512,7 +3512,7 @@
   tracer()->report_metadata_oom(loader_data, word_size, type, mdtype);
 
   // If result is still null, we are out of memory.
-  LogHandle(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist) log;
   if (log.is_trace()) {
     log.trace("Metaspace allocation failed for size " SIZE_FORMAT, word_size);
     ResourceMark rm;
--- a/src/share/vm/memory/universe.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/memory/universe.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1082,7 +1082,7 @@
 }
 
 void Universe::print_heap_before_gc() {
-  LogHandle(gc, heap) log;
+  Log(gc, heap) log;
   if (log.is_debug()) {
     log.debug("Heap before GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
     ResourceMark rm;
@@ -1091,7 +1091,7 @@
 }
 
 void Universe::print_heap_after_gc() {
-  LogHandle(gc, heap) log;
+  Log(gc, heap) log;
   if (log.is_debug()) {
     log.debug("Heap after GC invocations=%u (full %u):", heap()->total_collections(), heap()->total_full_collections());
     ResourceMark rm;
--- a/src/share/vm/oops/generateOopMap.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/oops/generateOopMap.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1258,7 +1258,7 @@
 
 void GenerateOopMap::report_monitor_mismatch(const char *msg) {
   ResourceMark rm;
-  outputStream* out = LogHandle(monitormismatch)::info_stream();
+  outputStream* out = Log(monitormismatch)::info_stream();
   out->print("Monitor mismatch in method ");
   method()->print_short_name(out);
   out->print_cr(": %s", msg);
--- a/src/share/vm/oops/instanceKlass.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/oops/instanceKlass.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1089,7 +1089,7 @@
   assert(!this_k->is_initialized(), "we cannot initialize twice");
   if (log_is_enabled(Info, classinit)) {
     ResourceMark rm;
-    outputStream* log = LogHandle(classinit)::info_stream();
+    outputStream* log = Log(classinit)::info_stream();
     log->print("%d Initializing ", call_class_initializer_impl_counter++);
     this_k->name()->print_value_on(log);
     log->print_cr("%s (" INTPTR_FORMAT ")", h_method() == NULL ? "(no method)" : "", p2i(this_k()));
@@ -3010,11 +3010,11 @@
   assert(type == LogLevel::Info || type == LogLevel::Debug, "sanity");
 
   if (type == LogLevel::Info) {
-    log = LogHandle(classload)::info_stream();
+    log = Log(classload)::info_stream();
   } else {
     assert(type == LogLevel::Debug,
            "print_loading_log supports only Debug and Info levels");
-    log = LogHandle(classload)::debug_stream();
+    log = Log(classload)::debug_stream();
   }
 
   // Name and class hierarchy info
--- a/src/share/vm/oops/klassVtable.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/oops/klassVtable.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -274,7 +274,7 @@
       if (supersuperklass->is_override(super_method, target_loader, target_classname, THREAD)) {
         if (log_develop_is_enabled(Trace, vtables)) {
           ResourceMark rm(THREAD);
-          outputStream* logst = LogHandle(vtables)::trace_stream();
+          outputStream* logst = Log(vtables)::trace_stream();
           char* sig = target_method()->name_and_sig_as_C_string();
           logst->print("transitive overriding superclass %s with %s::%s index %d, original flags: ",
                        supersuperklass->internal_name(),
@@ -305,7 +305,7 @@
 #ifndef PRODUCT
   if (log_develop_is_enabled(Trace, vtables)) {
     ResourceMark rm(thread);
-    outputStream* logst = LogHandle(vtables)::trace_stream();
+    outputStream* logst = Log(vtables)::trace_stream();
     char* sig = target_method()->name_and_sig_as_C_string();
     if (overrides) {
       logst->print("overriding with %s::%s index %d, original flags: ",
@@ -493,7 +493,7 @@
 void klassVtable::put_method_at(Method* m, int index) {
   if (log_develop_is_enabled(Trace, vtables)) {
     ResourceMark rm;
-    outputStream* logst = LogHandle(vtables)::trace_stream();
+    outputStream* logst = Log(vtables)::trace_stream();
     const char* sig = (m != NULL) ? m->name_and_sig_as_C_string() : "<NULL>";
     logst->print("adding %s at index %d, flags: ", sig, index);
     if (m != NULL) {
@@ -821,7 +821,7 @@
     if (log_develop_is_enabled(Trace, vtables)) {
       Method* meth = mirandas.at(i);
       ResourceMark rm(Thread::current());
-      outputStream* logst = LogHandle(vtables)::trace_stream();
+      outputStream* logst = Log(vtables)::trace_stream();
       if (meth != NULL) {
         char* sig = meth->name_and_sig_as_C_string();
         logst->print("fill in mirandas with %s index %d, flags: ",
@@ -1045,7 +1045,7 @@
       // If m is already assigned a vtable index, do not disturb it.
       if (log_develop_is_enabled(Trace, itables)) {
         ResourceMark rm;
-        outputStream* logst = LogHandle(itables)::trace_stream();
+        outputStream* logst = Log(itables)::trace_stream();
         assert(m != NULL, "methods can never be null");
         const char* sig = m->name_and_sig_as_C_string();
         if (m->has_vtable_index()) {
@@ -1161,7 +1161,7 @@
       if (log_develop_is_enabled(Trace, itables)) {
         ResourceMark rm(THREAD);
         if (target() != NULL) {
-          outputStream* logst = LogHandle(itables)::trace_stream();
+          outputStream* logst = Log(itables)::trace_stream();
           char* sig = target()->name_and_sig_as_C_string();
           logst->print("interface: %s, ime_num: %d, target: %s, method_holder: %s ",
                        interf_h()->internal_name(), ime_num, sig,
--- a/src/share/vm/opto/runtime.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/opto/runtime.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -1288,7 +1288,7 @@
 
   if (log_is_enabled(Info, exceptions)) {
     ResourceMark rm;
-    trace_exception(LogHandle(exceptions)::info_stream(), exception(), pc, "");
+    trace_exception(Log(exceptions)::info_stream(), exception(), pc, "");
   }
 
   // for AbortVMOnException flag
--- a/src/share/vm/runtime/java.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/runtime/java.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -465,7 +465,7 @@
   Universe::heap()->stop();
 
   // Print GC/heap related information.
-  LogHandle(gc, heap, exit) log;
+  Log(gc, heap, exit) log;
   if (log.is_info()) {
     ResourceMark rm;
     Universe::print_on(log.info_stream());
--- a/src/share/vm/runtime/safepoint.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/runtime/safepoint.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -228,7 +228,7 @@
           }
           if (log_is_enabled(Trace, safepoint)) {
             ResourceMark rm;
-            cur_state->print_on(LogHandle(safepoint)::trace_stream());
+            cur_state->print_on(Log(safepoint)::trace_stream());
           }
         }
       }
--- a/src/share/vm/runtime/thread.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/runtime/thread.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -2093,7 +2093,7 @@
 
       if (log_is_enabled(Info, exceptions)) {
         ResourceMark rm;
-        outputStream* logstream = LogHandle(exceptions)::info_stream();
+        outputStream* logstream = Log(exceptions)::info_stream();
         logstream->print("Async. exception installed at runtime exit (" INTPTR_FORMAT ")", p2i(this));
           if (has_last_Java_frame()) {
             frame f = last_frame();
--- a/src/share/vm/runtime/timerTrace.hpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/runtime/timerTrace.hpp	Mon Apr 04 11:32:04 2016 +0200
@@ -38,10 +38,10 @@
 
 typedef void (*TraceTimerLogPrintFunc)(const char*, ...);
 
-// We need to explicit take address of Log<>write<> and static cast
+// We need to explicit take address of LogImpl<>write<> and static cast
 // due to MSVC is not compliant with templates two-phase lookup
 #define TRACETIME_LOG(TT_LEVEL, ...) \
-    log_is_enabled(TT_LEVEL, __VA_ARGS__) ? static_cast<TraceTimerLogPrintFunc>(&Log<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::TT_LEVEL>) : (TraceTimerLogPrintFunc)NULL
+    log_is_enabled(TT_LEVEL, __VA_ARGS__) ? static_cast<TraceTimerLogPrintFunc>(&LogImpl<LOG_TAGS(__VA_ARGS__)>::write<LogLevel::TT_LEVEL>) : (TraceTimerLogPrintFunc)NULL
 
 class TraceTime: public StackObj {
  private:
--- a/src/share/vm/runtime/vm_operations.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/runtime/vm_operations.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -59,7 +59,7 @@
   outputStream* debugstream;
   bool enabled = log_is_enabled(Debug, vmoperation);
   if (enabled) {
-    debugstream = LogHandle(vmoperation)::debug_stream();
+    debugstream = Log(vmoperation)::debug_stream();
     debugstream->print("begin ");
     print_on_error(debugstream);
     debugstream->cr();
--- a/src/share/vm/utilities/exceptions.cpp	Mon Apr 04 09:59:57 2016 +0200
+++ b/src/share/vm/utilities/exceptions.cpp	Mon Apr 04 11:32:04 2016 +0200
@@ -54,7 +54,7 @@
 void ThreadShadow::clear_pending_exception() {
   if (_pending_exception != NULL && log_is_enabled(Debug, exceptions)) {
     ResourceMark rm;
-    outputStream* logst = LogHandle(exceptions)::debug_stream();
+    outputStream* logst = Log(exceptions)::debug_stream();
     logst->print("Thread::clear_pending_exception: cleared exception:");
     _pending_exception->print_on(logst);
   }