Commit 59ddd606 authored by Adithya Srinivasan's avatar Adithya Srinivasan Committed by Commit Bot

Change Accessor counters

Counters for some of the getters are renamed to remove the
AccessorNameGetterCallback_ prefix. The prefix causes these getters to
be categorized under Blink C++ (and they shouldn't be). Counters are
also added for some setters which are currently being counted under
GenericNamedPropertySetterCallback and AccessorNameSetterCallback which
are both categorized as Blink C++.

Bug: 
Change-Id: Ifc2c08d3eca0460ea6b5572c7a96b3625dd7d7ea
Reviewed-on: https://chromium-review.googlesource.com/587593Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46979}
parent 13532c08
......@@ -154,8 +154,7 @@ void Accessors::ArrayLengthGetter(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(
isolate, &RuntimeCallStats::AccessorNameGetterCallback_ArrayLength);
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::ArrayLengthGetter);
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
JSArray* holder = JSArray::cast(*Utils::OpenHandle(*info.Holder()));
......@@ -167,6 +166,7 @@ void Accessors::ArrayLengthSetter(
v8::Local<v8::Name> name, v8::Local<v8::Value> val,
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::ArrayLengthSetter);
HandleScope scope(isolate);
DCHECK(Utils::OpenHandle(*name)->SameValue(isolate->heap()->length_string()));
......@@ -284,8 +284,7 @@ void Accessors::StringLengthGetter(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(
isolate, &RuntimeCallStats::AccessorNameGetterCallback_StringLength);
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::StringLengthGetter);
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
......@@ -683,8 +682,8 @@ void Accessors::FunctionPrototypeGetter(
v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(
isolate, &RuntimeCallStats::AccessorNameGetterCallback_FunctionPrototype);
RuntimeCallTimerScope timer(isolate,
&RuntimeCallStats::FunctionPrototypeGetter);
HandleScope scope(isolate);
Handle<JSFunction> function =
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
......@@ -696,6 +695,8 @@ void Accessors::FunctionPrototypeSetter(
v8::Local<v8::Name> name, v8::Local<v8::Value> val,
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(isolate,
&RuntimeCallStats::FunctionPrototypeSetter);
HandleScope scope(isolate);
Handle<Object> value = Utils::OpenHandle(*val);
Handle<JSFunction> object =
......@@ -1053,9 +1054,8 @@ Handle<AccessorInfo> Accessors::FunctionCallerInfo(
void Accessors::BoundFunctionLengthGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(
isolate,
&RuntimeCallStats::AccessorNameGetterCallback_BoundFunctionLength);
RuntimeCallTimerScope timer(isolate,
&RuntimeCallStats::BoundFunctionLengthGetter);
HandleScope scope(isolate);
Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
......@@ -1090,8 +1090,8 @@ Handle<AccessorInfo> Accessors::BoundFunctionLengthInfo(
void Accessors::BoundFunctionNameGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(
isolate, &RuntimeCallStats::AccessorNameGetterCallback_BoundFunctionName);
RuntimeCallTimerScope timer(isolate,
&RuntimeCallStats::BoundFunctionNameGetter);
HandleScope scope(isolate);
Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
......
......@@ -751,12 +751,11 @@ class RuntimeCallTimer final {
#define FOR_EACH_MANUAL_COUNTER(V) \
V(AccessorGetterCallback) \
V(AccessorNameGetterCallback) \
V(AccessorNameGetterCallback_ArrayLength) \
V(AccessorNameGetterCallback_BoundFunctionLength) \
V(AccessorNameGetterCallback_BoundFunctionName) \
V(AccessorNameGetterCallback_FunctionPrototype) \
V(AccessorNameGetterCallback_StringLength) \
V(AccessorNameSetterCallback) \
V(ArrayLengthGetter) \
V(ArrayLengthSetter) \
V(BoundFunctionNameGetter) \
V(BoundFunctionLengthGetter) \
V(CompileCodeLazy) \
V(CompileDeserialize) \
V(CompileEval) \
......@@ -777,6 +776,8 @@ class RuntimeCallTimer final {
V(CompileWaitForDispatcher) \
V(DeoptimizeCode) \
V(FunctionCallback) \
V(FunctionPrototypeGetter) \
V(FunctionPrototypeSetter) \
V(GC) \
V(GC_AllAvailableGarbage) \
V(GC_IncrementalMarkingJob) \
......@@ -824,6 +825,7 @@ class RuntimeCallTimer final {
V(RecompileConcurrent) \
V(RecompileSynchronous) \
V(ReconfigureToDataProperty) \
V(StringLengthGetter) \
V(TestCounter1) \
V(TestCounter2) \
V(TestCounter3) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment