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

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

Issue 2063853002: Reland: Add a trace-event for each runtime-stats timer (CL 2052523002) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: The reland fix: Use an atomic variable Created 4 years, 6 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.cc ('k') | src/api-arguments-inl.h » ('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 #include "src/tracing/trace-event.h" 7 #include "src/tracing/trace-event.h"
8 #include "src/vm-state-inl.h" 8 #include "src/vm-state-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) { 13 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
14 Isolate* isolate = this->isolate(); 14 Isolate* isolate = this->isolate();
15 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback); 15 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback);
16 TRACE_RUNTIME_CALL("FunctionCallback");
16 VMState<EXTERNAL> state(isolate); 17 VMState<EXTERNAL> state(isolate);
17 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 18 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
18 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_); 19 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_);
19 f(info); 20 f(info);
20 return GetReturnValue<Object>(isolate); 21 return GetReturnValue<Object>(isolate);
21 } 22 }
22 23
23 Handle<JSObject> PropertyCallbackArguments::Call( 24 Handle<JSObject> PropertyCallbackArguments::Call(
24 IndexedPropertyEnumeratorCallback f) { 25 IndexedPropertyEnumeratorCallback f) {
25 Isolate* isolate = this->isolate(); 26 Isolate* isolate = this->isolate();
26 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback); 27 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback);
28 TRACE_RUNTIME_CALL("PropertyCallback");
27 VMState<EXTERNAL> state(isolate); 29 VMState<EXTERNAL> state(isolate);
28 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 30 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
29 PropertyCallbackInfo<v8::Array> info(begin()); 31 PropertyCallbackInfo<v8::Array> info(begin());
30 f(info); 32 f(info);
31 return GetReturnValue<JSObject>(isolate); 33 return GetReturnValue<JSObject>(isolate);
32 } 34 }
33 35
34 } // namespace internal 36 } // namespace internal
35 } // namespace v8 37 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/api-arguments-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698