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

Side by Side Diff: src/d8.cc

Issue 2460973003: [Tracing] Use TracingCategoryObserver in runtime statistics (Closed)
Patch Set: update Created 4 years, 1 month 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/crankshaft/hydrogen.cc ('k') | src/heap/gc-tracer.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 <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2824 std::unique_ptr<platform::tracing::TracingController> tracing_controller; 2824 std::unique_ptr<platform::tracing::TracingController> tracing_controller;
2825 if (options.trace_enabled) { 2825 if (options.trace_enabled) {
2826 trace_file.open("v8_trace.json"); 2826 trace_file.open("v8_trace.json");
2827 tracing_controller.reset(new platform::tracing::TracingController()); 2827 tracing_controller.reset(new platform::tracing::TracingController());
2828 platform::tracing::TraceBuffer* trace_buffer = 2828 platform::tracing::TraceBuffer* trace_buffer =
2829 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer( 2829 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer(
2830 platform::tracing::TraceBuffer::kRingBufferChunks, 2830 platform::tracing::TraceBuffer::kRingBufferChunks,
2831 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file)); 2831 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file));
2832 tracing_controller->Initialize(trace_buffer); 2832 tracing_controller->Initialize(trace_buffer);
2833 if (!i::FLAG_verify_predictable) { 2833 if (!i::FLAG_verify_predictable) {
2834 platform::SetTracingController(g_platform, tracing_controller.get()); 2834 platform::SetTracingController(g_platform, tracing_controller.release());
2835 tracing_controller.release();
2836 } 2835 }
2837 } 2836 }
2838 2837
2839 v8::V8::InitializePlatform(g_platform); 2838 v8::V8::InitializePlatform(g_platform);
2840 v8::V8::Initialize(); 2839 v8::V8::Initialize();
2841 if (options.natives_blob || options.snapshot_blob) { 2840 if (options.natives_blob || options.snapshot_blob) {
2842 v8::V8::InitializeExternalStartupData(options.natives_blob, 2841 v8::V8::InitializeExternalStartupData(options.natives_blob,
2843 options.snapshot_blob); 2842 options.snapshot_blob);
2844 } else { 2843 } else {
2845 v8::V8::InitializeExternalStartupData(argv[0]); 2844 v8::V8::InitializeExternalStartupData(argv[0]);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 } 2956 }
2958 2957
2959 } // namespace v8 2958 } // namespace v8
2960 2959
2961 2960
2962 #ifndef GOOGLE3 2961 #ifndef GOOGLE3
2963 int main(int argc, char* argv[]) { 2962 int main(int argc, char* argv[]) {
2964 return v8::Shell::Main(argc, argv); 2963 return v8::Shell::Main(argc, argv);
2965 } 2964 }
2966 #endif 2965 #endif
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698