| 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 15 matching lines...) Expand all Loading... |
| 26 #include "src/base/cpu.h" | 26 #include "src/base/cpu.h" |
| 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/snapshot/natives.h" | 35 #include "src/snapshot/natives.h" |
| 36 #include "src/trap-handler/trap-handler.h" |
| 36 #include "src/utils.h" | 37 #include "src/utils.h" |
| 37 #include "src/v8.h" | 38 #include "src/v8.h" |
| 38 | 39 |
| 39 #ifdef V8_INSPECTOR_ENABLED | 40 #ifdef V8_INSPECTOR_ENABLED |
| 40 #include "include/v8-inspector.h" | 41 #include "include/v8-inspector.h" |
| 41 #endif // V8_INSPECTOR_ENABLED | 42 #endif // V8_INSPECTOR_ENABLED |
| 42 | 43 |
| 43 #if !defined(_WIN32) && !defined(_WIN64) | 44 #if !defined(_WIN32) && !defined(_WIN64) |
| 44 #include <unistd.h> // NOLINT | 45 #include <unistd.h> // NOLINT |
| 45 #else | 46 #else |
| (...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2984 base::SysInfo::AmountOfPhysicalMemory(), | 2985 base::SysInfo::AmountOfPhysicalMemory(), |
| 2985 base::SysInfo::AmountOfVirtualMemory()); | 2986 base::SysInfo::AmountOfVirtualMemory()); |
| 2986 | 2987 |
| 2987 Shell::counter_map_ = new CounterMap(); | 2988 Shell::counter_map_ = new CounterMap(); |
| 2988 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { | 2989 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { |
| 2989 create_params.counter_lookup_callback = LookupCounter; | 2990 create_params.counter_lookup_callback = LookupCounter; |
| 2990 create_params.create_histogram_callback = CreateHistogram; | 2991 create_params.create_histogram_callback = CreateHistogram; |
| 2991 create_params.add_histogram_sample_callback = AddHistogramSample; | 2992 create_params.add_histogram_sample_callback = AddHistogramSample; |
| 2992 } | 2993 } |
| 2993 | 2994 |
| 2995 if (i::trap_handler::EnableTrapHandler()) { |
| 2996 v8::V8::RegisterDefaultSignalHandler(); |
| 2997 } |
| 2998 |
| 2994 Isolate* isolate = Isolate::New(create_params); | 2999 Isolate* isolate = Isolate::New(create_params); |
| 2995 { | 3000 { |
| 2996 Isolate::Scope scope(isolate); | 3001 Isolate::Scope scope(isolate); |
| 2997 Initialize(isolate); | 3002 Initialize(isolate); |
| 2998 PerIsolateData data(isolate); | 3003 PerIsolateData data(isolate); |
| 2999 | 3004 |
| 3000 if (options.trace_enabled) { | 3005 if (options.trace_enabled) { |
| 3001 platform::tracing::TraceConfig* trace_config; | 3006 platform::tracing::TraceConfig* trace_config; |
| 3002 if (options.trace_config) { | 3007 if (options.trace_config) { |
| 3003 int size = 0; | 3008 int size = 0; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 } | 3085 } |
| 3081 | 3086 |
| 3082 } // namespace v8 | 3087 } // namespace v8 |
| 3083 | 3088 |
| 3084 | 3089 |
| 3085 #ifndef GOOGLE3 | 3090 #ifndef GOOGLE3 |
| 3086 int main(int argc, char* argv[]) { | 3091 int main(int argc, char* argv[]) { |
| 3087 return v8::Shell::Main(argc, argv); | 3092 return v8::Shell::Main(argc, argv); |
| 3088 } | 3093 } |
| 3089 #endif | 3094 #endif |
| OLD | NEW |