Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: src/objects-printer.cc

Issue 1507903004: Type Feedback Vector: Calculate profiler counts on the fly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment response. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 591
592 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT 592 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT
593 HeapObject::PrintHeader(os, "TypeFeedbackVector"); 593 HeapObject::PrintHeader(os, "TypeFeedbackVector");
594 os << " - length: " << length(); 594 os << " - length: " << length();
595 if (length() == 0) { 595 if (length() == 0) {
596 os << " (empty)\n"; 596 os << " (empty)\n";
597 return; 597 return;
598 } 598 }
599 599
600 os << "\n - ics with type info: " << ic_with_type_info_count();
601 os << "\n - generic ics: " << ic_generic_count();
602
603 TypeFeedbackMetadataIterator iter(metadata()); 600 TypeFeedbackMetadataIterator iter(metadata());
604 while (iter.HasNext()) { 601 while (iter.HasNext()) {
605 FeedbackVectorSlot slot = iter.Next(); 602 FeedbackVectorSlot slot = iter.Next();
606 FeedbackVectorSlotKind kind = iter.kind(); 603 FeedbackVectorSlotKind kind = iter.kind();
607 604
608 os << "\n Slot " << slot << " " << kind << " "; 605 os << "\n Slot " << slot << " " << kind << " ";
609 switch (kind) { 606 switch (kind) {
610 case FeedbackVectorSlotKind::LOAD_IC: { 607 case FeedbackVectorSlotKind::LOAD_IC: {
611 LoadICNexus nexus(this, slot); 608 LoadICNexus nexus(this, slot);
612 os << Code::ICState2String(nexus.StateFromFeedback()); 609 os << Code::ICState2String(nexus.StateFromFeedback());
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1310 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1314 Object* transitions = map()->raw_transitions(); 1311 Object* transitions = map()->raw_transitions();
1315 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 1312 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
1316 if (num_transitions == 0) return; 1313 if (num_transitions == 0) return;
1317 os << "\n - transitions"; 1314 os << "\n - transitions";
1318 TransitionArray::PrintTransitions(os, transitions, false); 1315 TransitionArray::PrintTransitions(os, transitions, false);
1319 } 1316 }
1320 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1317 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1321 } // namespace internal 1318 } // namespace internal
1322 } // namespace v8 1319 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698