From ff3fe27a3077591762c2caf789cbf476045d073b Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Tue, 5 Jan 2021 16:57:49 +0000 Subject: [PATCH] [runtime] Add RCS counter for UpdateProtector Bug: v8:11256 Change-Id: Iec03fc77daeed9aeaacde13f5be2304d2a7e2c26 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2610969 Reviewed-by: Camillo Bruni Commit-Queue: Sathya Gunasekaran Cr-Commit-Position: refs/heads/master@{#71958} --- src/logging/counters.h | 1 + src/objects/lookup-inl.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/logging/counters.h b/src/logging/counters.h index e6cdf265a7..f1a7595a34 100644 --- a/src/logging/counters.h +++ b/src/logging/counters.h @@ -1040,6 +1040,7 @@ class RuntimeCallTimer final { V(PrototypeMap_TransitionToDataProperty) \ V(PrototypeObject_DeleteProperty) \ V(ReconfigureToDataProperty) \ + V(UpdateProtector) \ V(StringLengthGetter) \ V(TestCounter1) \ V(TestCounter2) \ diff --git a/src/objects/lookup-inl.h b/src/objects/lookup-inl.h index 2339606a45..d38be27fca 100644 --- a/src/objects/lookup-inl.h +++ b/src/objects/lookup-inl.h @@ -9,6 +9,7 @@ #include "src/handles/handles-inl.h" #include "src/heap/factory-inl.h" +#include "src/logging/counters.h" #include "src/objects/api-callbacks.h" #include "src/objects/internal-index.h" #include "src/objects/map-inl.h" @@ -205,6 +206,8 @@ bool LookupIterator::IsCacheableTransition() { // static void LookupIterator::UpdateProtector(Isolate* isolate, Handle receiver, Handle name) { + RuntimeCallTimerScope scope(isolate, RuntimeCallCounterId::kUpdateProtector); + // This list must be kept in sync with // CodeStubAssembler::CheckForAssociatedProtector! ReadOnlyRoots roots(isolate);