# HG changeset patch # User stefank # Date 1460357513 -7200 # Node ID bda48699fd1151b974286d143015872738a9237c # Parent ff4f09f858b2372b8a9663b81d70f48cc94185ce 8153658: Redundant memory copy in LogStreamNoResourceMark Reviewed-by: kbarrett, jmasa diff -r ff4f09f858b2 -r bda48699fd11 hotspot/src/share/vm/logging/logStream.inline.hpp --- a/hotspot/src/share/vm/logging/logStream.inline.hpp Mon Apr 11 08:51:53 2016 +0200 +++ b/hotspot/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);