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

Side by Side Diff: src/isolate.cc

Issue 19383002: Make deoptimization stress count global. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 code_stub_interface_descriptors_(NULL), 1779 code_stub_interface_descriptors_(NULL),
1780 context_exit_happened_(false), 1780 context_exit_happened_(false),
1781 initialized_from_snapshot_(false), 1781 initialized_from_snapshot_(false),
1782 cpu_profiler_(NULL), 1782 cpu_profiler_(NULL),
1783 heap_profiler_(NULL), 1783 heap_profiler_(NULL),
1784 function_entry_hook_(NULL), 1784 function_entry_hook_(NULL),
1785 deferred_handles_head_(NULL), 1785 deferred_handles_head_(NULL),
1786 optimizing_compiler_thread_(this), 1786 optimizing_compiler_thread_(this),
1787 marking_thread_(NULL), 1787 marking_thread_(NULL),
1788 sweeper_thread_(NULL), 1788 sweeper_thread_(NULL),
1789 callback_table_(NULL) { 1789 callback_table_(NULL),
1790 stress_deopt_count_(0) {
1790 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); 1791 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
1791 TRACE_ISOLATE(constructor); 1792 TRACE_ISOLATE(constructor);
1792 1793
1793 memset(isolate_addresses_, 0, 1794 memset(isolate_addresses_, 0,
1794 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1795 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1795 1796
1796 heap_.isolate_ = this; 1797 heap_.isolate_ = this;
1797 stack_guard_.isolate_ = this; 1798 stack_guard_.isolate_ = this;
1798 1799
1799 // ThreadManager is initialized early to support locking an isolate 1800 // ThreadManager is initialized early to support locking an isolate
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 if (FLAG_marking_threads > 0) { 1892 if (FLAG_marking_threads > 0) {
1892 for (int i = 0; i < FLAG_marking_threads; i++) { 1893 for (int i = 0; i < FLAG_marking_threads; i++) {
1893 marking_thread_[i]->Stop(); 1894 marking_thread_[i]->Stop();
1894 delete marking_thread_[i]; 1895 delete marking_thread_[i];
1895 } 1896 }
1896 delete[] marking_thread_; 1897 delete[] marking_thread_;
1897 } 1898 }
1898 1899
1899 if (FLAG_hydrogen_stats) GetHStatistics()->Print(); 1900 if (FLAG_hydrogen_stats) GetHStatistics()->Print();
1900 1901
1902 if (FLAG_print_deopt_stress) {
1903 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
1904 }
1905
1901 // We must stop the logger before we tear down other components. 1906 // We must stop the logger before we tear down other components.
1902 Sampler* sampler = logger_->sampler(); 1907 Sampler* sampler = logger_->sampler();
1903 if (sampler && sampler->IsActive()) sampler->Stop(); 1908 if (sampler && sampler->IsActive()) sampler->Stop();
1904 1909
1905 delete deoptimizer_data_; 1910 delete deoptimizer_data_;
1906 deoptimizer_data_ = NULL; 1911 deoptimizer_data_ = NULL;
1907 if (FLAG_preemption) { 1912 if (FLAG_preemption) {
1908 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); 1913 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this));
1909 v8::Locker::StopPreemption(); 1914 v8::Locker::StopPreemption();
1910 } 1915 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 Release_Store(&debugger_initialized_, true); 2130 Release_Store(&debugger_initialized_, true);
2126 #endif 2131 #endif
2127 } 2132 }
2128 2133
2129 2134
2130 bool Isolate::Init(Deserializer* des) { 2135 bool Isolate::Init(Deserializer* des) {
2131 ASSERT(state_ != INITIALIZED); 2136 ASSERT(state_ != INITIALIZED);
2132 ASSERT(Isolate::Current() == this); 2137 ASSERT(Isolate::Current() == this);
2133 TRACE_ISOLATE(init); 2138 TRACE_ISOLATE(init);
2134 2139
2140 stress_deopt_count_ = FLAG_deopt_every_n_times;
2141
2135 if (function_entry_hook() != NULL) { 2142 if (function_entry_hook() != NULL) {
2136 // When function entry hooking is in effect, we have to create the code 2143 // When function entry hooking is in effect, we have to create the code
2137 // stubs from scratch to get entry hooks, rather than loading the previously 2144 // stubs from scratch to get entry hooks, rather than loading the previously
2138 // generated stubs from disk. 2145 // generated stubs from disk.
2139 // If this assert fires, the initialization path has regressed. 2146 // If this assert fires, the initialization path has regressed.
2140 ASSERT(des == NULL); 2147 ASSERT(des == NULL);
2141 } 2148 }
2142 2149
2143 // The initialization process does not handle memory exhaustion. 2150 // The initialization process does not handle memory exhaustion.
2144 DisallowAllocationFailure disallow_allocation_failure; 2151 DisallowAllocationFailure disallow_allocation_failure;
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 2512
2506 #ifdef DEBUG 2513 #ifdef DEBUG
2507 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2514 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2508 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2515 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2509 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2516 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2510 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2517 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2511 #undef ISOLATE_FIELD_OFFSET 2518 #undef ISOLATE_FIELD_OFFSET
2512 #endif 2519 #endif
2513 2520
2514 } } // namespace v8::internal 2521 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698