8152538: UL doesn't inline the LogTagSet::is_level check
authorstefank
Mon, 04 Apr 2016 09:15:01 +0200
changeset 37241 b9961c99c356
parent 37237 7e5787f48bae
child 37242 91e5f98fff6f
8152538: UL doesn't inline the LogTagSet::is_level check Reviewed-by: mlarsson, brutisso
hotspot/src/share/vm/logging/logTagSet.cpp
hotspot/src/share/vm/logging/logTagSet.hpp
--- a/hotspot/src/share/vm/logging/logTagSet.cpp	Sat Apr 02 05:39:25 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTagSet.cpp	Mon Apr 04 09:15:01 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/hotspot/src/share/vm/logging/logTagSet.hpp	Sat Apr 02 05:39:25 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTagSet.hpp	Mon Apr 04 09:15:01 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);
 };