Commit 9eba5616 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Use StdoutStream instead of std::cout in broker/serializer.

Bug: v8:7790
Change-Id: I25e41548c526e93c5b0a532ca2d270b62193a557
Reviewed-on: https://chromium-review.googlesource.com/c/1448315
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59336}
parent 46cc15b1
......@@ -1580,9 +1580,9 @@ JSHeapBroker::JSHeapBroker(Isolate* isolate, Zone* broker_zone)
TRACE(this, "Constructing heap broker.");
}
std::ostream& JSHeapBroker::Trace() const {
std::cout << "[" << this << "] " << std::string(trace_indentation_ * 2, ' ');
return std::cout;
std::ostream& JSHeapBroker::Trace() {
return trace_out_ << "[" << this << "] "
<< std::string(trace_indentation_ * 2, ' ');
}
void JSHeapBroker::StartSerializing() {
......
......@@ -14,6 +14,7 @@
#include "src/objects.h"
#include "src/objects/builtin-function-id.h"
#include "src/objects/instance-type.h"
#include "src/ostreams.h"
#include "src/zone/zone-containers.h"
namespace v8 {
......@@ -642,7 +643,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker : public NON_EXPORTED_BASE(ZoneObject) {
// %ObjectPrototype%.
bool IsArrayOrObjectPrototype(const JSObjectRef& object) const;
std::ostream& Trace() const;
std::ostream& Trace();
void IncrementTracingIndentation();
void DecrementTracingIndentation();
......@@ -663,8 +664,8 @@ class V8_EXPORT_PRIVATE JSHeapBroker : public NON_EXPORTED_BASE(ZoneObject) {
ZoneUnorderedSet<Handle<JSObject>, Handle<JSObject>::hash,
Handle<JSObject>::equal_to>
array_and_object_prototypes_;
BrokerMode mode_ = kDisabled;
StdoutStream trace_out_;
unsigned trace_indentation_ = 0;
PerIsolateCompilerCache* compiler_cache_;
......
......@@ -5069,7 +5069,8 @@ Handle<Object> SharedFunctionInfo::GetSourceCodeHarmony(
namespace {
void TraceInlining(SharedFunctionInfo shared, const char* msg) {
if (FLAG_trace_turbo_inlining) {
std::cout << Brief(shared) << ": IsInlineable? " << msg << "\n";
StdoutStream os;
os << Brief(shared) << ": IsInlineable? " << msg << "\n";
}
}
} // namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment