OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/profiler/profile-generator.h" | 5 #include "src/profiler/profile-generator.h" |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/global-handles.h" | 10 #include "src/global-handles.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 top_down_.pending_nodes_count() >= kNodesFlushCount) { | 417 top_down_.pending_nodes_count() >= kNodesFlushCount) { |
418 StreamPendingTraceEvents(); | 418 StreamPendingTraceEvents(); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 namespace { | 422 namespace { |
423 | 423 |
424 void BuildNodeValue(const ProfileNode* node, TracedValue* value) { | 424 void BuildNodeValue(const ProfileNode* node, TracedValue* value) { |
425 const CodeEntry* entry = node->entry(); | 425 const CodeEntry* entry = node->entry(); |
426 value->BeginDictionary("callFrame"); | 426 value->BeginDictionary("callFrame"); |
| 427 // TODO(alph): Extra check to help catch crbug.com/665398 |
| 428 // Remove before 5.8 branch |
| 429 #if V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION == 7 |
| 430 CHECK(entry->name()); |
| 431 #endif |
427 value->SetString("functionName", entry->name()); | 432 value->SetString("functionName", entry->name()); |
428 if (*entry->resource_name()) { | 433 if (*entry->resource_name()) { |
429 value->SetString("url", entry->resource_name()); | 434 value->SetString("url", entry->resource_name()); |
430 } | 435 } |
431 value->SetInteger("scriptId", entry->script_id()); | 436 value->SetInteger("scriptId", entry->script_id()); |
432 if (entry->line_number()) { | 437 if (entry->line_number()) { |
433 value->SetInteger("lineNumber", entry->line_number() - 1); | 438 value->SetInteger("lineNumber", entry->line_number() - 1); |
434 } | 439 } |
435 if (entry->column_number()) { | 440 if (entry->column_number()) { |
436 value->SetInteger("columnNumber", entry->column_number() - 1); | 441 value->SetInteger("columnNumber", entry->column_number() - 1); |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 case EXTERNAL: | 772 case EXTERNAL: |
768 return CodeEntry::program_entry(); | 773 return CodeEntry::program_entry(); |
769 case IDLE: | 774 case IDLE: |
770 return CodeEntry::idle_entry(); | 775 return CodeEntry::idle_entry(); |
771 default: return NULL; | 776 default: return NULL; |
772 } | 777 } |
773 } | 778 } |
774 | 779 |
775 } // namespace internal | 780 } // namespace internal |
776 } // namespace v8 | 781 } // namespace v8 |
OLD | NEW |