Chromium Code Reviews

Side by Side Diff: src/api.cc

Issue 2313193002: [Tracing] Fix runtime call stats tracing for GC. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')
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 5932 matching lines...)
5943 5943
5944 return result; 5944 return result;
5945 } 5945 }
5946 5946
5947 Local<Context> NewContext(v8::Isolate* external_isolate, 5947 Local<Context> NewContext(v8::Isolate* external_isolate,
5948 v8::ExtensionConfiguration* extensions, 5948 v8::ExtensionConfiguration* extensions,
5949 v8::MaybeLocal<ObjectTemplate> global_template, 5949 v8::MaybeLocal<ObjectTemplate> global_template,
5950 v8::MaybeLocal<Value> global_object, 5950 v8::MaybeLocal<Value> global_object,
5951 size_t context_snapshot_index) { 5951 size_t context_snapshot_index) {
5952 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate); 5952 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
5953 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.NewContext");
5953 LOG_API(isolate, Context, New); 5954 LOG_API(isolate, Context, New);
5954 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.NewContext");
5955 i::HandleScope scope(isolate); 5955 i::HandleScope scope(isolate);
5956 ExtensionConfiguration no_extensions; 5956 ExtensionConfiguration no_extensions;
5957 if (extensions == NULL) extensions = &no_extensions; 5957 if (extensions == NULL) extensions = &no_extensions;
5958 i::Handle<i::Context> env = 5958 i::Handle<i::Context> env =
5959 CreateEnvironment<i::Context>(isolate, extensions, global_template, 5959 CreateEnvironment<i::Context>(isolate, extensions, global_template,
5960 global_object, context_snapshot_index); 5960 global_object, context_snapshot_index);
5961 if (env.is_null()) { 5961 if (env.is_null()) {
5962 if (isolate->has_pending_exception()) { 5962 if (isolate->has_pending_exception()) {
5963 isolate->OptionalRescheduleException(true); 5963 isolate->OptionalRescheduleException(true);
5964 } 5964 }
(...skipping 3257 matching lines...)
9222 Address callback_address = 9222 Address callback_address =
9223 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9223 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9224 VMState<EXTERNAL> state(isolate); 9224 VMState<EXTERNAL> state(isolate);
9225 ExternalCallbackScope call_scope(isolate, callback_address); 9225 ExternalCallbackScope call_scope(isolate, callback_address);
9226 callback(info); 9226 callback(info);
9227 } 9227 }
9228 9228
9229 9229
9230 } // namespace internal 9230 } // namespace internal
9231 } // namespace v8 9231 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')

Powered by Google App Engine