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

Side by Side Diff: src/api-arguments.cc

Issue 1923893002: [counters] Annotate v8 with more runtime call counters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging master Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/api-arguments.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api-arguments.h" 5 #include "src/api-arguments.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) { 10 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
11 Isolate* isolate = this->isolate(); 11 Isolate* isolate = this->isolate();
12 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback);
12 VMState<EXTERNAL> state(isolate); 13 VMState<EXTERNAL> state(isolate);
13 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 14 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
14 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_); 15 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_);
15 f(info); 16 f(info);
16 return GetReturnValue<Object>(isolate); 17 return GetReturnValue<Object>(isolate);
17 } 18 }
18 19
19 Handle<JSObject> PropertyCallbackArguments::Call( 20 Handle<JSObject> PropertyCallbackArguments::Call(
20 IndexedPropertyEnumeratorCallback f) { 21 IndexedPropertyEnumeratorCallback f) {
21 Isolate* isolate = this->isolate(); 22 Isolate* isolate = this->isolate();
23 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback);
22 VMState<EXTERNAL> state(isolate); 24 VMState<EXTERNAL> state(isolate);
23 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 25 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
24 PropertyCallbackInfo<v8::Array> info(begin()); 26 PropertyCallbackInfo<v8::Array> info(begin());
25 f(info); 27 f(info);
26 return GetReturnValue<JSObject>(isolate); 28 return GetReturnValue<JSObject>(isolate);
27 } 29 }
28 30
29 } // namespace internal 31 } // namespace internal
30 } // namespace v8 32 } // namespace v8
OLDNEW
« no previous file with comments | « src/api-arguments.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698