| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/graph-visualizer.h" | 5 #include "src/compiler/graph-visualizer.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 485 |
| 486 void GraphC1Visualizer::PrintIntProperty(const char* name, int value) { | 486 void GraphC1Visualizer::PrintIntProperty(const char* name, int value) { |
| 487 PrintIndent(); | 487 PrintIndent(); |
| 488 os_ << name << " " << value << "\n"; | 488 os_ << name << " " << value << "\n"; |
| 489 } | 489 } |
| 490 | 490 |
| 491 | 491 |
| 492 void GraphC1Visualizer::PrintCompilation(const CompilationInfo* info) { | 492 void GraphC1Visualizer::PrintCompilation(const CompilationInfo* info) { |
| 493 Tag tag(this, "compilation"); | 493 Tag tag(this, "compilation"); |
| 494 if (info->IsOptimizing()) { | 494 if (info->IsOptimizing()) { |
| 495 Handle<String> name = info->function()->debug_name(); | 495 Handle<String> name = info->literal()->debug_name(); |
| 496 PrintStringProperty("name", name->ToCString().get()); | 496 PrintStringProperty("name", name->ToCString().get()); |
| 497 PrintIndent(); | 497 PrintIndent(); |
| 498 os_ << "method \"" << name->ToCString().get() << ":" | 498 os_ << "method \"" << name->ToCString().get() << ":" |
| 499 << info->optimization_id() << "\"\n"; | 499 << info->optimization_id() << "\"\n"; |
| 500 } else { | 500 } else { |
| 501 CodeStub::Major major_key = info->code_stub()->MajorKey(); | 501 CodeStub::Major major_key = info->code_stub()->MajorKey(); |
| 502 PrintStringProperty("name", CodeStub::MajorName(major_key, false)); | 502 PrintStringProperty("name", CodeStub::MajorName(major_key, false)); |
| 503 PrintStringProperty("method", "stub"); | 503 PrintStringProperty("method", "stub"); |
| 504 } | 504 } |
| 505 PrintLongProperty("date", | 505 PrintLongProperty("date", |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 822 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
| 823 } | 823 } |
| 824 os << ")" << std::endl; | 824 os << ")" << std::endl; |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 return os; | 827 return os; |
| 828 } | 828 } |
| 829 } // namespace compiler | 829 } // namespace compiler |
| 830 } // namespace internal | 830 } // namespace internal |
| 831 } // namespace v8 | 831 } // namespace v8 |
| OLD | NEW |