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

Side by Side Diff: src/d8.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Feedback from mseaborn Created 3 years, 11 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 16 matching lines...) Expand all
27 #include "src/base/debug/stack_trace.h" 27 #include "src/base/debug/stack_trace.h"
28 #include "src/base/logging.h" 28 #include "src/base/logging.h"
29 #include "src/base/platform/platform.h" 29 #include "src/base/platform/platform.h"
30 #include "src/base/platform/time.h" 30 #include "src/base/platform/time.h"
31 #include "src/base/sys-info.h" 31 #include "src/base/sys-info.h"
32 #include "src/basic-block-profiler.h" 32 #include "src/basic-block-profiler.h"
33 #include "src/interpreter/interpreter.h" 33 #include "src/interpreter/interpreter.h"
34 #include "src/msan.h" 34 #include "src/msan.h"
35 #include "src/objects-inl.h" 35 #include "src/objects-inl.h"
36 #include "src/snapshot/natives.h" 36 #include "src/snapshot/natives.h"
37 #include "src/trap-handler/trap-handler.h"
37 #include "src/utils.h" 38 #include "src/utils.h"
38 #include "src/v8.h" 39 #include "src/v8.h"
39 40
40 #ifdef V8_INSPECTOR_ENABLED 41 #ifdef V8_INSPECTOR_ENABLED
41 #include "include/v8-inspector.h" 42 #include "include/v8-inspector.h"
42 #endif // V8_INSPECTOR_ENABLED 43 #endif // V8_INSPECTOR_ENABLED
43 44
44 #if !defined(_WIN32) && !defined(_WIN64) 45 #if !defined(_WIN32) && !defined(_WIN64)
45 #include <unistd.h> // NOLINT 46 #include <unistd.h> // NOLINT
46 #else 47 #else
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 base::SysInfo::AmountOfPhysicalMemory(), 2988 base::SysInfo::AmountOfPhysicalMemory(),
2988 base::SysInfo::AmountOfVirtualMemory()); 2989 base::SysInfo::AmountOfVirtualMemory());
2989 2990
2990 Shell::counter_map_ = new CounterMap(); 2991 Shell::counter_map_ = new CounterMap();
2991 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { 2992 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) {
2992 create_params.counter_lookup_callback = LookupCounter; 2993 create_params.counter_lookup_callback = LookupCounter;
2993 create_params.create_histogram_callback = CreateHistogram; 2994 create_params.create_histogram_callback = CreateHistogram;
2994 create_params.add_histogram_sample_callback = AddHistogramSample; 2995 create_params.add_histogram_sample_callback = AddHistogramSample;
2995 } 2996 }
2996 2997
2998 if (i::FLAG_wasm_trap_handler) {
2999 v8::V8::RegisterDefaultSignalHandler();
3000 }
3001
2997 Isolate* isolate = Isolate::New(create_params); 3002 Isolate* isolate = Isolate::New(create_params);
2998 { 3003 {
2999 Isolate::Scope scope(isolate); 3004 Isolate::Scope scope(isolate);
3000 Initialize(isolate); 3005 Initialize(isolate);
3001 PerIsolateData data(isolate); 3006 PerIsolateData data(isolate);
3002 3007
3003 if (options.trace_enabled) { 3008 if (options.trace_enabled) {
3004 platform::tracing::TraceConfig* trace_config; 3009 platform::tracing::TraceConfig* trace_config;
3005 if (options.trace_config) { 3010 if (options.trace_config) {
3006 int size = 0; 3011 int size = 0;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
3083 } 3088 }
3084 3089
3085 } // namespace v8 3090 } // namespace v8
3086 3091
3087 3092
3088 #ifndef GOOGLE3 3093 #ifndef GOOGLE3
3089 int main(int argc, char* argv[]) { 3094 int main(int argc, char* argv[]) {
3090 return v8::Shell::Main(argc, argv); 3095 return v8::Shell::Main(argc, argv);
3091 } 3096 }
3092 #endif 3097 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698