diff --git a/src/hotspot/share/utilities/ostream.cpp b/src/hotspot/share/utilities/ostream.cpp index fcb5aa5731c..1dd413e63aa 100644 --- a/src/hotspot/share/utilities/ostream.cpp +++ b/src/hotspot/share/utilities/ostream.cpp @@ -186,18 +186,9 @@ void outputStream::put(char ch) { write(buf, 1); } -#define SP_USE_TABS false - void outputStream::sp(int count) { if (count < 0) return; - if (SP_USE_TABS && count >= 8) { - int target = position() + count; - while (count >= 8) { - this->write("\t", 1); - count -= 8; - } - count = target - position(); - } + while (count > 0) { int nw = (count > 8) ? 8 : count; this->write(" ", nw); @@ -257,7 +248,7 @@ void outputStream::date_stamp(bool guard, } outputStream& outputStream::indent() { - while (_position < _indentation) sp(); + sp(_indentation - _position); return *this; }