diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index ba3532fd92b9e..f67ac882b83b1 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -67,7 +67,7 @@ function _peek_report() iob = IOBuffer() ioc = IOContext(IOContext(iob, stderr), :displaysize=>displaysize(stderr)) print(ioc, groupby = [:thread, :task]) - Base.print(stderr, String(take!(iob))) + Base.print(stderr, read(seekstart(iob), AnnotatedString)) end # This is a ref so that it can be overridden by other profile info consumers. const peek_report = Ref{Function}(_peek_report)