changeset 10864:58a17e6418b8

8153658: Redundant memory copy in LogStreamNoResourceMark Reviewed-by: kbarrett, jmasa
author stefank
date Mon, 11 Apr 2016 08:51:53 +0200
parents 9b70653931c0
children e78ce3e32969
files src/share/vm/logging/logStream.inline.hpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/logging/logStream.inline.hpp	Mon Apr 11 08:51:53 2016 +0200
+++ b/src/share/vm/logging/logStream.inline.hpp	Mon Apr 11 08:51:53 2016 +0200
@@ -33,7 +33,8 @@
 inline void LogStreamNoResourceMark::write(const char* s, size_t len) {
   if (len > 0 && s[len - 1] == '\n') {
     _current_line.write(s, len - 1);
-    _tagset->write(_level, "%s", _current_line.as_string());
+    _current_line.write("\0", 1);
+    _tagset->write(_level, "%s", _current_line.base());
     _current_line.reset();
   } else {
     _current_line.write(s, len);