From ff771a6686708b588825139e7cb76678eda674eb Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Mon, 4 Apr 2016 09:15:01 +0200 Subject: [PATCH] 8152538: UL doesn't inline the LogTagSet::is_level check Reviewed-by: mlarsson, brutisso --- hotspot/src/share/vm/logging/logTagSet.cpp | 4 ---- hotspot/src/share/vm/logging/logTagSet.hpp | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hotspot/src/share/vm/logging/logTagSet.cpp b/hotspot/src/share/vm/logging/logTagSet.cpp index 7d22c480e32..8bd5a6be53e 100644 --- a/hotspot/src/share/vm/logging/logTagSet.cpp +++ b/hotspot/src/share/vm/logging/logTagSet.cpp @@ -49,10 +49,6 @@ LogTagSet::LogTagSet(LogTagType t0, LogTagType t1, LogTagType t2, LogTagType t3, _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++) { diff --git a/hotspot/src/share/vm/logging/logTagSet.hpp b/hotspot/src/share/vm/logging/logTagSet.hpp index c4105d1774d..92402ac428c 100644 --- a/hotspot/src/share/vm/logging/logTagSet.hpp +++ b/hotspot/src/share/vm/logging/logTagSet.hpp @@ -95,7 +95,12 @@ class LogTagSet VALUE_OBJ_CLASS_SPEC { 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); };