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

Side by Side Diff: src/api.cc

Issue 2121273002: Move compile and parse trace events to a separate category. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 5 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 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 DCHECK(source->cached_data); 1931 DCHECK(source->cached_data);
1932 // ScriptData takes care of pointer-aligning the data. 1932 // ScriptData takes care of pointer-aligning the data.
1933 script_data = new i::ScriptData(source->cached_data->data, 1933 script_data = new i::ScriptData(source->cached_data->data,
1934 source->cached_data->length); 1934 source->cached_data->length);
1935 } 1935 }
1936 1936
1937 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string)); 1937 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string));
1938 i::Handle<i::SharedFunctionInfo> result; 1938 i::Handle<i::SharedFunctionInfo> result;
1939 { 1939 {
1940 i::HistogramTimerScope total(isolate->counters()->compile_script(), true); 1940 i::HistogramTimerScope total(isolate->counters()->compile_script(), true);
1941 TRACE_EVENT0("v8", "V8.CompileScript"); 1941 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileScript");
1942 i::Handle<i::Object> name_obj; 1942 i::Handle<i::Object> name_obj;
1943 i::Handle<i::Object> source_map_url; 1943 i::Handle<i::Object> source_map_url;
1944 int line_offset = 0; 1944 int line_offset = 0;
1945 int column_offset = 0; 1945 int column_offset = 0;
1946 if (!source->resource_name.IsEmpty()) { 1946 if (!source->resource_name.IsEmpty()) {
1947 name_obj = Utils::OpenHandle(*(source->resource_name)); 1947 name_obj = Utils::OpenHandle(*(source->resource_name));
1948 } 1948 }
1949 if (!source->resource_line_offset.IsEmpty()) { 1949 if (!source->resource_line_offset.IsEmpty()) {
1950 line_offset = static_cast<int>(source->resource_line_offset->Value()); 1950 line_offset = static_cast<int>(source->resource_line_offset->Value());
1951 } 1951 }
(...skipping 6998 matching lines...) Expand 10 before | Expand all | Expand 10 after
8950 Address callback_address = 8950 Address callback_address =
8951 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8951 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8952 VMState<EXTERNAL> state(isolate); 8952 VMState<EXTERNAL> state(isolate);
8953 ExternalCallbackScope call_scope(isolate, callback_address); 8953 ExternalCallbackScope call_scope(isolate, callback_address);
8954 callback(info); 8954 callback(info);
8955 } 8955 }
8956 8956
8957 8957
8958 } // namespace internal 8958 } // namespace internal
8959 } // namespace v8 8959 } // namespace v8
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