| Index: src/compiler/graph-visualizer.cc
|
| diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
|
| index bf3d8edea418d654344baf9c85d479eb78badb37..527469686796cc6cfa5da5b17784a440d231154c 100644
|
| --- a/src/compiler/graph-visualizer.cc
|
| +++ b/src/compiler/graph-visualizer.cc
|
| @@ -18,6 +18,7 @@
|
| #include "src/compiler/register-allocator.h"
|
| #include "src/compiler/schedule.h"
|
| #include "src/compiler/scheduler.h"
|
| +#include "src/interpreter/bytecodes.h"
|
| #include "src/ostreams.h"
|
|
|
| namespace v8 {
|
| @@ -28,14 +29,11 @@ namespace compiler {
|
| FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
|
| const char* suffix, const char* mode) {
|
| EmbeddedVector<char, 256> filename(0);
|
| - base::SmartArrayPointer<char> function_name;
|
| - if (info->has_shared_info()) {
|
| - function_name = info->shared_info()->DebugName()->ToCString();
|
| - if (strlen(function_name.get()) > 0) {
|
| - SNPrintF(filename, "turbo-%s", function_name.get());
|
| - } else {
|
| - SNPrintF(filename, "turbo-%p", static_cast<void*>(info));
|
| - }
|
| + base::SmartArrayPointer<char> debug_name = info->GetDebugName();
|
| + if (strlen(debug_name.get()) > 0) {
|
| + SNPrintF(filename, "turbo-%s", debug_name.get());
|
| + } else if (info->has_shared_info()) {
|
| + SNPrintF(filename, "turbo-%p", static_cast<void*>(info));
|
| } else {
|
| SNPrintF(filename, "turbo-none-%s", phase);
|
| }
|
| @@ -491,15 +489,14 @@ void GraphC1Visualizer::PrintIntProperty(const char* name, int value) {
|
|
|
| void GraphC1Visualizer::PrintCompilation(const CompilationInfo* info) {
|
| Tag tag(this, "compilation");
|
| + base::SmartArrayPointer<char> name = info->GetDebugName();
|
| if (info->IsOptimizing()) {
|
| - Handle<String> name = info->literal()->debug_name();
|
| - PrintStringProperty("name", name->ToCString().get());
|
| + PrintStringProperty("name", name.get());
|
| PrintIndent();
|
| - os_ << "method \"" << name->ToCString().get() << ":"
|
| - << info->optimization_id() << "\"\n";
|
| + os_ << "method \"" << name.get() << ":" << info->optimization_id()
|
| + << "\"\n";
|
| } else {
|
| - CodeStub::Major major_key = info->code_stub()->MajorKey();
|
| - PrintStringProperty("name", CodeStub::MajorName(major_key, false));
|
| + PrintStringProperty("name", name.get());
|
| PrintStringProperty("method", "stub");
|
| }
|
| PrintLongProperty("date",
|
|
|