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( ...@@ -154,8 +154,7 @@ void Accessors::ArrayLengthGetter(
v8::Local<v8::Name> name, v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer( RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::ArrayLengthGetter);
isolate, &RuntimeCallStats::AccessorNameGetterCallback_ArrayLength);
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
HandleScope scope(isolate); HandleScope scope(isolate);
JSArray* holder = JSArray::cast(*Utils::OpenHandle(*info.Holder())); JSArray* holder = JSArray::cast(*Utils::OpenHandle(*info.Holder()));
...@@ -167,6 +166,7 @@ void Accessors::ArrayLengthSetter( ...@@ -167,6 +166,7 @@ void Accessors::ArrayLengthSetter(
v8::Local<v8::Name> name, v8::Local<v8::Value> val, v8::Local<v8::Name> name, v8::Local<v8::Value> val,
const v8::PropertyCallbackInfo<v8::Boolean>& info) { const v8::PropertyCallbackInfo<v8::Boolean>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::ArrayLengthSetter);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK(Utils::OpenHandle(*name)->SameValue(isolate->heap()->length_string())); DCHECK(Utils::OpenHandle(*name)->SameValue(isolate->heap()->length_string()));
...@@ -284,8 +284,7 @@ void Accessors::StringLengthGetter( ...@@ -284,8 +284,7 @@ void Accessors::StringLengthGetter(
v8::Local<v8::Name> name, v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer( RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::StringLengthGetter);
isolate, &RuntimeCallStats::AccessorNameGetterCallback_StringLength);
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
HandleScope scope(isolate); HandleScope scope(isolate);
...@@ -683,8 +682,8 @@ void Accessors::FunctionPrototypeGetter( ...@@ -683,8 +682,8 @@ void Accessors::FunctionPrototypeGetter(
v8::Local<v8::Name> name, v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer( RuntimeCallTimerScope timer(isolate,
isolate, &RuntimeCallStats::AccessorNameGetterCallback_FunctionPrototype); &RuntimeCallStats::FunctionPrototypeGetter);
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<JSFunction> function = Handle<JSFunction> function =
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder())); Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
...@@ -696,6 +695,8 @@ void Accessors::FunctionPrototypeSetter( ...@@ -696,6 +695,8 @@ void Accessors::FunctionPrototypeSetter(
v8::Local<v8::Name> name, v8::Local<v8::Value> val, v8::Local<v8::Name> name, v8::Local<v8::Value> val,
const v8::PropertyCallbackInfo<v8::Boolean>& info) { const v8::PropertyCallbackInfo<v8::Boolean>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer(isolate,
&RuntimeCallStats::FunctionPrototypeSetter);
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<Object> value = Utils::OpenHandle(*val); Handle<Object> value = Utils::OpenHandle(*val);
Handle<JSFunction> object = Handle<JSFunction> object =
...@@ -1053,9 +1054,8 @@ Handle<AccessorInfo> Accessors::FunctionCallerInfo( ...@@ -1053,9 +1054,8 @@ Handle<AccessorInfo> Accessors::FunctionCallerInfo(
void Accessors::BoundFunctionLengthGetter( void Accessors::BoundFunctionLengthGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer( RuntimeCallTimerScope timer(isolate,
isolate, &RuntimeCallStats::BoundFunctionLengthGetter);
&RuntimeCallStats::AccessorNameGetterCallback_BoundFunctionLength);
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<JSBoundFunction> function = Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder())); Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
...@@ -1090,8 +1090,8 @@ Handle<AccessorInfo> Accessors::BoundFunctionLengthInfo( ...@@ -1090,8 +1090,8 @@ Handle<AccessorInfo> Accessors::BoundFunctionLengthInfo(
void Accessors::BoundFunctionNameGetter( void Accessors::BoundFunctionNameGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
RuntimeCallTimerScope timer( RuntimeCallTimerScope timer(isolate,
isolate, &RuntimeCallStats::AccessorNameGetterCallback_BoundFunctionName); &RuntimeCallStats::BoundFunctionNameGetter);
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<JSBoundFunction> function = Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder())); Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
......
...@@ -751,12 +751,11 @@ class RuntimeCallTimer final { ...@@ -751,12 +751,11 @@ class RuntimeCallTimer final {
#define FOR_EACH_MANUAL_COUNTER(V) \ #define FOR_EACH_MANUAL_COUNTER(V) \
V(AccessorGetterCallback) \ V(AccessorGetterCallback) \
V(AccessorNameGetterCallback) \ V(AccessorNameGetterCallback) \
V(AccessorNameGetterCallback_ArrayLength) \
V(AccessorNameGetterCallback_BoundFunctionLength) \
V(AccessorNameGetterCallback_BoundFunctionName) \
V(AccessorNameGetterCallback_FunctionPrototype) \
V(AccessorNameGetterCallback_StringLength) \
V(AccessorNameSetterCallback) \ V(AccessorNameSetterCallback) \
V(ArrayLengthGetter) \
V(ArrayLengthSetter) \
V(BoundFunctionNameGetter) \
V(BoundFunctionLengthGetter) \
V(CompileCodeLazy) \ V(CompileCodeLazy) \
V(CompileDeserialize) \ V(CompileDeserialize) \
V(CompileEval) \ V(CompileEval) \
...@@ -777,6 +776,8 @@ class RuntimeCallTimer final { ...@@ -777,6 +776,8 @@ class RuntimeCallTimer final {
V(CompileWaitForDispatcher) \ V(CompileWaitForDispatcher) \
V(DeoptimizeCode) \ V(DeoptimizeCode) \
V(FunctionCallback) \ V(FunctionCallback) \
V(FunctionPrototypeGetter) \
V(FunctionPrototypeSetter) \
V(GC) \ V(GC) \
V(GC_AllAvailableGarbage) \ V(GC_AllAvailableGarbage) \
V(GC_IncrementalMarkingJob) \ V(GC_IncrementalMarkingJob) \
...@@ -824,6 +825,7 @@ class RuntimeCallTimer final { ...@@ -824,6 +825,7 @@ class RuntimeCallTimer final {
V(RecompileConcurrent) \ V(RecompileConcurrent) \
V(RecompileSynchronous) \ V(RecompileSynchronous) \
V(ReconfigureToDataProperty) \ V(ReconfigureToDataProperty) \
V(StringLengthGetter) \
V(TestCounter1) \ V(TestCounter1) \
V(TestCounter2) \ V(TestCounter2) \
V(TestCounter3) \ 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