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

Unified Diff: src/accessors.cc

Issue 2448473002: Add runtime callstats scopes to some internal accessors (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index b88ebc3d7910cdd41038e5725f53bd04f67f087c..adec80c204f0b02d055dcd249120cc2aceb8c22c 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -151,6 +151,8 @@ 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);
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
JSArray* holder = JSArray::cast(*Utils::OpenHandle(*info.Holder()));
@@ -255,6 +257,8 @@ 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);
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
@@ -735,6 +739,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);
HandleScope scope(isolate);
Handle<JSFunction> function =
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
@@ -1108,6 +1114,9 @@ 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);
HandleScope scope(isolate);
Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
@@ -1142,6 +1151,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);
HandleScope scope(isolate);
Handle<JSBoundFunction> function =
Handle<JSBoundFunction>::cast(Utils::OpenHandle(*info.Holder()));
« no previous file with comments | « no previous file | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698