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

Side by Side Diff: src/d8.cc

Issue 2854173002: Make in process stack dumping optional. (Closed)
Patch Set: Created 3 years, 7 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
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 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 2957 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
2958 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 2958 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
2959 _set_error_mode(_OUT_TO_STDERR); 2959 _set_error_mode(_OUT_TO_STDERR);
2960 #endif // defined(_MSC_VER) 2960 #endif // defined(_MSC_VER)
2961 #endif // defined(_WIN32) || defined(_WIN64) 2961 #endif // defined(_WIN32) || defined(_WIN64)
2962 if (!SetOptions(argc, argv)) return 1; 2962 if (!SetOptions(argc, argv)) return 1;
2963 v8::V8::InitializeICUDefaultLocation(argv[0], options.icu_data_file); 2963 v8::V8::InitializeICUDefaultLocation(argv[0], options.icu_data_file);
2964 g_platform = i::FLAG_verify_predictable 2964 g_platform = i::FLAG_verify_predictable
2965 ? new PredictablePlatform() 2965 ? new PredictablePlatform()
2966 : v8::platform::CreateDefaultPlatform( 2966 : v8::platform::CreateDefaultPlatform(
2967 0, v8::platform::IdleTaskSupport::kEnabled); 2967 0, v8::platform::IdleTaskSupport::kEnabled,
2968 !i::FLAG_disable_in_process_stack_traces);
2968 2969
2969 platform::tracing::TracingController* tracing_controller; 2970 platform::tracing::TracingController* tracing_controller;
2970 if (options.trace_enabled) { 2971 if (options.trace_enabled) {
2971 trace_file.open("v8_trace.json"); 2972 trace_file.open("v8_trace.json");
2972 tracing_controller = new platform::tracing::TracingController(); 2973 tracing_controller = new platform::tracing::TracingController();
2973 platform::tracing::TraceBuffer* trace_buffer = 2974 platform::tracing::TraceBuffer* trace_buffer =
2974 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer( 2975 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer(
2975 platform::tracing::TraceBuffer::kRingBufferChunks, 2976 platform::tracing::TraceBuffer::kRingBufferChunks,
2976 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file)); 2977 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file));
2977 tracing_controller->Initialize(trace_buffer); 2978 tracing_controller->Initialize(trace_buffer);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
3103 } 3104 }
3104 3105
3105 } // namespace v8 3106 } // namespace v8
3106 3107
3107 3108
3108 #ifndef GOOGLE3 3109 #ifndef GOOGLE3
3109 int main(int argc, char* argv[]) { 3110 int main(int argc, char* argv[]) {
3110 return v8::Shell::Main(argc, argv); 3111 return v8::Shell::Main(argc, argv);
3111 } 3112 }
3112 #endif 3113 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698