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

Side by Side Diff: src/d8.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Handler signal handler registration failure Created 3 years, 10 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 17 matching lines...) Expand all
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/list-inl.h" 34 #include "src/list-inl.h"
35 #include "src/msan.h" 35 #include "src/msan.h"
36 #include "src/objects-inl.h" 36 #include "src/objects-inl.h"
37 #include "src/snapshot/natives.h" 37 #include "src/snapshot/natives.h"
38 #include "src/trap-handler/trap-handler.h"
38 #include "src/utils.h" 39 #include "src/utils.h"
39 #include "src/v8.h" 40 #include "src/v8.h"
40 41
41 #ifdef V8_INSPECTOR_ENABLED 42 #ifdef V8_INSPECTOR_ENABLED
42 #include "include/v8-inspector.h" 43 #include "include/v8-inspector.h"
43 #endif // V8_INSPECTOR_ENABLED 44 #endif // V8_INSPECTOR_ENABLED
44 45
45 #if !defined(_WIN32) && !defined(_WIN64) 46 #if !defined(_WIN32) && !defined(_WIN64)
46 #include <unistd.h> // NOLINT 47 #include <unistd.h> // NOLINT
47 #else 48 #else
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 base::SysInfo::AmountOfPhysicalMemory(), 2854 base::SysInfo::AmountOfPhysicalMemory(),
2854 base::SysInfo::AmountOfVirtualMemory()); 2855 base::SysInfo::AmountOfVirtualMemory());
2855 2856
2856 Shell::counter_map_ = new CounterMap(); 2857 Shell::counter_map_ = new CounterMap();
2857 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { 2858 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) {
2858 create_params.counter_lookup_callback = LookupCounter; 2859 create_params.counter_lookup_callback = LookupCounter;
2859 create_params.create_histogram_callback = CreateHistogram; 2860 create_params.create_histogram_callback = CreateHistogram;
2860 create_params.add_histogram_sample_callback = AddHistogramSample; 2861 create_params.add_histogram_sample_callback = AddHistogramSample;
2861 } 2862 }
2862 2863
2864 if (i::FLAG_wasm_trap_handler) {
2865 if (!v8::V8::RegisterDefaultSignalHandler()) {
2866 fprintf(stderr, "Could not register signal handler");
2867 exit(1);
2868 }
2869 }
2870
2863 Isolate* isolate = Isolate::New(create_params); 2871 Isolate* isolate = Isolate::New(create_params);
2864 { 2872 {
2865 Isolate::Scope scope(isolate); 2873 Isolate::Scope scope(isolate);
2866 Initialize(isolate); 2874 Initialize(isolate);
2867 PerIsolateData data(isolate); 2875 PerIsolateData data(isolate);
2868 2876
2869 if (options.trace_enabled) { 2877 if (options.trace_enabled) {
2870 platform::tracing::TraceConfig* trace_config; 2878 platform::tracing::TraceConfig* trace_config;
2871 if (options.trace_config) { 2879 if (options.trace_config) {
2872 int size = 0; 2880 int size = 0;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 } 2957 }
2950 2958
2951 } // namespace v8 2959 } // namespace v8
2952 2960
2953 2961
2954 #ifndef GOOGLE3 2962 #ifndef GOOGLE3
2955 int main(int argc, char* argv[]) { 2963 int main(int argc, char* argv[]) {
2956 return v8::Shell::Main(argc, argv); 2964 return v8::Shell::Main(argc, argv);
2957 } 2965 }
2958 #endif 2966 #endif
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/factory.cc » ('j') | src/trap-handler/OWNERS » ('J')

Powered by Google App Engine
This is Rietveld 408576698