Chromium Code Reviews| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap-snapshot-generator-inl.h" | 7 #include "src/heap-snapshot-generator-inl.h" |
| 8 | 8 |
| 9 #include "src/allocation-tracker.h" | 9 #include "src/allocation-tracker.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1492 | 1492 |
| 1493 | 1493 |
| 1494 void V8HeapExplorer::TagBuiltinCodeObject(Code* code, const char* name) { | 1494 void V8HeapExplorer::TagBuiltinCodeObject(Code* code, const char* name) { |
| 1495 TagObject(code, names_->GetFormatted("(%s builtin)", name)); | 1495 TagObject(code, names_->GetFormatted("(%s builtin)", name)); |
| 1496 } | 1496 } |
| 1497 | 1497 |
| 1498 | 1498 |
| 1499 void V8HeapExplorer::TagCodeObject(Code* code) { | 1499 void V8HeapExplorer::TagCodeObject(Code* code) { |
| 1500 if (code->kind() == Code::STUB) { | 1500 if (code->kind() == Code::STUB) { |
| 1501 TagObject(code, names_->GetFormatted( | 1501 TagObject(code, names_->GetFormatted( |
| 1502 "(%s code)", CodeStub::MajorName( | 1502 "(%s code)", CodeStub::MajorName( |
|
Jakob Kummerow
2014/07/21 12:23:19
nit: consider pulling out a temp variable or two t
| |
| 1503 static_cast<CodeStub::Major>(code->major_key()), true))); | 1503 CodeStub::GetMajorKey(code), true))); |
| 1504 } | 1504 } |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 | 1507 |
| 1508 void V8HeapExplorer::ExtractCodeReferences(int entry, Code* code) { | 1508 void V8HeapExplorer::ExtractCodeReferences(int entry, Code* code) { |
| 1509 TagCodeObject(code); | 1509 TagCodeObject(code); |
| 1510 TagObject(code->relocation_info(), "(code relocation info)"); | 1510 TagObject(code->relocation_info(), "(code relocation info)"); |
| 1511 SetInternalReference(code, entry, | 1511 SetInternalReference(code, entry, |
| 1512 "relocation_info", code->relocation_info(), | 1512 "relocation_info", code->relocation_info(), |
| 1513 Code::kRelocationInfoOffset); | 1513 Code::kRelocationInfoOffset); |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3184 writer_->AddString("\"<dummy>\""); | 3184 writer_->AddString("\"<dummy>\""); |
| 3185 for (int i = 1; i < sorted_strings.length(); ++i) { | 3185 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3186 writer_->AddCharacter(','); | 3186 writer_->AddCharacter(','); |
| 3187 SerializeString(sorted_strings[i]); | 3187 SerializeString(sorted_strings[i]); |
| 3188 if (writer_->aborted()) return; | 3188 if (writer_->aborted()) return; |
| 3189 } | 3189 } |
| 3190 } | 3190 } |
| 3191 | 3191 |
| 3192 | 3192 |
| 3193 } } // namespace v8::internal | 3193 } } // namespace v8::internal |
| OLD | NEW |