diff --git a/src/assembler.cc b/src/assembler.cc index 0e05c2c7c7..eb88922d19 100644 --- a/src/assembler.cc +++ b/src/assembler.cc @@ -826,7 +826,7 @@ void RelocInfo::Print(Isolate* isolate, FILE* out) { PrintF(out, " (%s) (%p)", Code::Kind2String(code->kind()), target_address()); if (rmode_ == CODE_TARGET_WITH_ID) { - PrintF(" (id=%d)", static_cast(data_)); + PrintF(out, " (id=%d)", static_cast(data_)); } } else if (IsPosition(rmode_)) { PrintF(out, " (%" V8_PTR_PREFIX "d)", data()); diff --git a/src/builtins.cc b/src/builtins.cc index b614904c9f..758967ec08 100644 --- a/src/builtins.cc +++ b/src/builtins.cc @@ -1750,9 +1750,10 @@ void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { builtins_[i] = code; #ifdef ENABLE_DISASSEMBLER if (FLAG_print_builtin_code) { - PrintF("Builtin: %s\n", functions[i].s_name); - Code::cast(code)->Disassemble(functions[i].s_name); - PrintF("\n"); + CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); + PrintF(trace_scope.file(), "Builtin: %s\n", functions[i].s_name); + Code::cast(code)->Disassemble(functions[i].s_name, trace_scope.file()); + PrintF(trace_scope.file(), "\n"); } #endif } else { diff --git a/src/code-stubs.cc b/src/code-stubs.cc index e68a5dd0c8..afa3cd09e9 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -160,8 +160,9 @@ Handle CodeStub::GetCode(Isolate* isolate) { #ifdef ENABLE_DISASSEMBLER if (FLAG_print_code_stubs) { - new_object->Disassemble(*GetName()); - PrintF("\n"); + CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); + new_object->Disassemble(*GetName(), trace_scope.file()); + PrintF(trace_scope.file(), "\n"); } #endif diff --git a/src/codegen.cc b/src/codegen.cc index 573ddc6ce7..28f7d6c099 100644 --- a/src/codegen.cc +++ b/src/codegen.cc @@ -136,10 +136,12 @@ void CodeGenerator::PrintCode(Handle code, CompilationInfo* info) { FunctionLiteral* function = info->function(); bool print_source = code->kind() == Code::OPTIMIZED_FUNCTION || code->kind() == Code::FUNCTION; + + CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); if (print_source) { Handle