OLD | NEW |
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 Loading... |
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.release()); | 2834 platform::SetTracingController(g_platform, tracing_controller.get()); |
| 2835 tracing_controller.release(); |
2835 } | 2836 } |
2836 } | 2837 } |
2837 | 2838 |
2838 v8::V8::InitializePlatform(g_platform); | 2839 v8::V8::InitializePlatform(g_platform); |
2839 v8::V8::Initialize(); | 2840 v8::V8::Initialize(); |
2840 if (options.natives_blob || options.snapshot_blob) { | 2841 if (options.natives_blob || options.snapshot_blob) { |
2841 v8::V8::InitializeExternalStartupData(options.natives_blob, | 2842 v8::V8::InitializeExternalStartupData(options.natives_blob, |
2842 options.snapshot_blob); | 2843 options.snapshot_blob); |
2843 } else { | 2844 } else { |
2844 v8::V8::InitializeExternalStartupData(argv[0]); | 2845 v8::V8::InitializeExternalStartupData(argv[0]); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2956 } | 2957 } |
2957 | 2958 |
2958 } // namespace v8 | 2959 } // namespace v8 |
2959 | 2960 |
2960 | 2961 |
2961 #ifndef GOOGLE3 | 2962 #ifndef GOOGLE3 |
2962 int main(int argc, char* argv[]) { | 2963 int main(int argc, char* argv[]) { |
2963 return v8::Shell::Main(argc, argv); | 2964 return v8::Shell::Main(argc, argv); |
2964 } | 2965 } |
2965 #endif | 2966 #endif |
OLD | NEW |