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

Unified Diff: src/lookup.cc

Issue 1973473002: [runtime] Record runtime call stats for Map::TransitionTo*Property, JSObject::OptimizeAsPrototype t… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@handler-counters2
Patch Set: Addressing comments and rebasing Created 4 years, 7 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/counters-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 6c73244843908b6396f58afd3175d9c1b8763a13..f455a2903b19fd9447c86ee9991bb229af5d9bf6 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -352,9 +352,14 @@ void LookupIterator::Delete() {
ElementsAccessor* accessor = object->GetElementsAccessor();
accessor->Delete(object, number_);
} else {
- PropertyNormalizationMode mode = holder->map()->is_prototype_map()
- ? KEEP_INOBJECT_PROPERTIES
- : CLEAR_INOBJECT_PROPERTIES;
+ bool is_prototype_map = holder->map()->is_prototype_map();
+ RuntimeCallTimerScope stats_scope(
+ isolate_, is_prototype_map
+ ? &RuntimeCallStats::PrototypeObject_DeleteProperty
+ : &RuntimeCallStats::Object_DeleteProperty);
Camillo Bruni 2016/05/11 13:01:46 I hope this case doesn't happen too much, I've see
+
+ PropertyNormalizationMode mode =
+ is_prototype_map ? KEEP_INOBJECT_PROPERTIES : CLEAR_INOBJECT_PROPERTIES;
if (holder->HasFastProperties()) {
JSObject::NormalizeProperties(Handle<JSObject>::cast(holder), mode, 0,
« no previous file with comments | « src/counters-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698