[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 <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71958}
This commit is contained in:
Sathya Gunasekaran 2021-01-05 16:57:49 +00:00 committed by Commit Bot
parent 53e1fcae87
commit ff3fe27a30
2 changed files with 4 additions and 0 deletions

View File

@ -1040,6 +1040,7 @@ class RuntimeCallTimer final {
V(PrototypeMap_TransitionToDataProperty) \
V(PrototypeObject_DeleteProperty) \
V(ReconfigureToDataProperty) \
V(UpdateProtector) \
V(StringLengthGetter) \
V(TestCounter1) \
V(TestCounter2) \

View File

@ -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<Object> receiver,
Handle<Name> name) {
RuntimeCallTimerScope scope(isolate, RuntimeCallCounterId::kUpdateProtector);
// This list must be kept in sync with
// CodeStubAssembler::CheckForAssociatedProtector!
ReadOnlyRoots roots(isolate);