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

Side by Side Diff: src/api.cc

Issue 790413004: Implement AggregatableHistogramTimer and use it to measure how much time (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make windows compiler happy. Created 5 years, 11 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1473
1474 Local<Value> Script::Run() { 1474 Local<Value> Script::Run() {
1475 i::Handle<i::Object> obj = Utils::OpenHandle(this, true); 1475 i::Handle<i::Object> obj = Utils::OpenHandle(this, true);
1476 // If execution is terminating, Compile(..)->Run() requires this 1476 // If execution is terminating, Compile(..)->Run() requires this
1477 // check. 1477 // check.
1478 if (obj.is_null()) return Local<Value>(); 1478 if (obj.is_null()) return Local<Value>();
1479 i::Isolate* isolate = i::Handle<i::HeapObject>::cast(obj)->GetIsolate(); 1479 i::Isolate* isolate = i::Handle<i::HeapObject>::cast(obj)->GetIsolate();
1480 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>()); 1480 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>());
1481 LOG_API(isolate, "Script::Run"); 1481 LOG_API(isolate, "Script::Run");
1482 ENTER_V8(isolate); 1482 ENTER_V8(isolate);
1483 i::AggregatingHistogramTimerScope timer(isolate->counters()->compile_lazy());
1483 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate); 1484 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
1484 i::HandleScope scope(isolate); 1485 i::HandleScope scope(isolate);
1485 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(obj); 1486 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(obj);
1486 EXCEPTION_PREAMBLE(isolate); 1487 EXCEPTION_PREAMBLE(isolate);
1487 i::Handle<i::Object> receiver(isolate->global_proxy(), isolate); 1488 i::Handle<i::Object> receiver(isolate->global_proxy(), isolate);
1488 i::Handle<i::Object> result; 1489 i::Handle<i::Object> result;
1489 has_pending_exception = !i::Execution::Call( 1490 has_pending_exception = !i::Execution::Call(
1490 isolate, fun, receiver, 0, NULL).ToHandle(&result); 1491 isolate, fun, receiver, 0, NULL).ToHandle(&result);
1491 EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>()); 1492 EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>());
1492 return Utils::ToLocal(scope.CloseAndEscape(result)); 1493 return Utils::ToLocal(scope.CloseAndEscape(result));
(...skipping 6101 matching lines...) Expand 10 before | Expand all | Expand 10 after
7594 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7595 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7595 Address callback_address = 7596 Address callback_address =
7596 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7597 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7597 VMState<EXTERNAL> state(isolate); 7598 VMState<EXTERNAL> state(isolate);
7598 ExternalCallbackScope call_scope(isolate, callback_address); 7599 ExternalCallbackScope call_scope(isolate, callback_address);
7599 callback(info); 7600 callback(info);
7600 } 7601 }
7601 7602
7602 7603
7603 } } // namespace v8::internal 7604 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698