# HG changeset patch
# User phh
# Date 1575153185 28800
# Node ID 5b96c12f909d1b07fcf9d400b29869d02676df71
# Parent  289000934908ac337e5e3694dacddb50695f817e
8234541: C1 emits an empty message when it inlines successfully
Summary: Use "inline" as the message when successfull
Reviewed-by: thartmann, mdoerr
Contributed-by: navy.xliu@gmail.com

diff -r 289000934908 -r 5b96c12f909d src/hotspot/share/c1/c1_GraphBuilder.cpp
--- a/src/hotspot/share/c1/c1_GraphBuilder.cpp	Sat Nov 30 16:21:19 2019 +0000
+++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp	Sat Nov 30 14:33:05 2019 -0800
@@ -3793,7 +3793,7 @@
       INLINE_BAILOUT("total inlining greater than DesiredMethodLimit");
     }
     // printing
-    print_inlining(callee);
+    print_inlining(callee, "inline", /*success*/ true);
   }
 
   // NOTE: Bailouts from this point on, which occur at the
@@ -4315,16 +4315,11 @@
 void GraphBuilder::print_inlining(ciMethod* callee, const char* msg, bool success) {
   CompileLog* log = compilation()->log();
   if (log != NULL) {
+    assert(msg != NULL, "inlining msg should not be null!");
     if (success) {
-      if (msg != NULL)
-        log->inline_success(msg);
-      else
-        log->inline_success("receiver is statically known");
+      log->inline_success(msg);
     } else {
-      if (msg != NULL)
-        log->inline_fail(msg);
-      else
-        log->inline_fail("reason unknown");
+      log->inline_fail(msg);
     }
   }
   EventCompilerInlining event;
diff -r 289000934908 -r 5b96c12f909d src/hotspot/share/c1/c1_GraphBuilder.hpp
--- a/src/hotspot/share/c1/c1_GraphBuilder.hpp	Sat Nov 30 16:21:19 2019 +0000
+++ b/src/hotspot/share/c1/c1_GraphBuilder.hpp	Sat Nov 30 14:33:05 2019 -0800
@@ -381,7 +381,7 @@
   void append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
   void append_char_access(ciMethod* callee, bool is_store);
 
-  void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
+  void print_inlining(ciMethod* callee, const char* msg, bool success = true);
 
   void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder, Values* obj_args, bool inlined);
   void profile_return_type(Value ret, ciMethod* callee, ciMethod* m = NULL, int bci = -1);