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

Unified Diff: src/objects.cc

Issue 467183002: When marking dependent code for deoptimization print the group that is being deoptimized. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ddc53ccad5cf1adb9239efa3b45d76281f6703a0..307bcbf13cdc539eaf041e835fa97910e0caa34c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11786,7 +11786,7 @@ bool DependentCode::MarkCodeForDeoptimization(
if (is_code_at(i)) {
Code* code = code_at(i);
if (!code->marked_for_deoptimization()) {
- code->set_marked_for_deoptimization(true);
+ SetMarkedForDeoptimization(code, group);
marked = true;
}
} else {
@@ -11837,6 +11837,51 @@ void DependentCode::AddToDependentICList(Handle<Code> stub) {
}
+void DependentCode::SetMarkedForDeoptimization(Code* code,
+ DependencyGroup group) {
+ code->set_marked_for_deoptimization(true);
+ if (FLAG_trace_deopt &&
+ (code->deoptimization_data() != code->GetHeap()->empty_fixed_array())) {
+ DeoptimizationInputData* deopt_data =
+ DeoptimizationInputData::cast(code->deoptimization_data());
+ CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer());
+ PrintF(scope.file(), "[marking dependent code 0x%08" V8PRIxPTR
+ " (opt #%d) for deoptimization, reason: %s]\n",
+ reinterpret_cast<intptr_t>(code),
+ deopt_data->OptimizationId()->value(), DependencyGroupName(group));
+ }
+}
+
+
+const char* DependentCode::DependencyGroupName(DependencyGroup group) {
+ switch (group) {
+ case kWeakICGroup:
+ return "weak-ic";
+ case kWeakCodeGroup:
+ return "weak-code";
+ case kTransitionGroup:
+ return "transition";
+ case kPrototypeCheckGroup:
+ return "prototype-check";
+ case kElementsCantBeAddedGroup:
+ return "elements-cant-be-added";
+ case kPropertyCellChangedGroup:
+ return "property-cell-changed";
+ case kFieldTypeGroup:
+ return "field-type";
+ case kInitialMapChangedGroup:
+ return "initial-map-changed";
+ case kAllocationSiteTenuringChangedGroup:
+ return "allocation-site-tenuring-changed";
+ case kAllocationSiteTransitionChangedGroup:
+ return "allocation-site-transition-changed";
+ default:
Toon Verwaest 2014/08/19 11:08:04 Any reason why you added a default case? That kind
Vyacheslav Egorov (Google) 2014/08/19 11:14:41 Well, main reason is that enumeration has parasiti
+ UNREACHABLE();
+ return "?";
+ }
+}
+
+
Handle<Map> Map::TransitionToPrototype(Handle<Map> map,
Handle<Object> prototype) {
Handle<Map> new_map = GetPrototypeTransition(map, prototype);
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698