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

Side by Side Diff: src/isolate.cc

Issue 12706020: Isolatify CPU profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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/log.cc » ('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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 global_handles_(NULL), 1671 global_handles_(NULL),
1672 context_switcher_(NULL), 1672 context_switcher_(NULL),
1673 thread_manager_(NULL), 1673 thread_manager_(NULL),
1674 fp_stubs_generated_(false), 1674 fp_stubs_generated_(false),
1675 has_installed_extensions_(false), 1675 has_installed_extensions_(false),
1676 string_tracker_(NULL), 1676 string_tracker_(NULL),
1677 regexp_stack_(NULL), 1677 regexp_stack_(NULL),
1678 date_cache_(NULL), 1678 date_cache_(NULL),
1679 code_stub_interface_descriptors_(NULL), 1679 code_stub_interface_descriptors_(NULL),
1680 context_exit_happened_(false), 1680 context_exit_happened_(false),
1681 cpu_profiler_(NULL),
1681 deferred_handles_head_(NULL), 1682 deferred_handles_head_(NULL),
1682 optimizing_compiler_thread_(this), 1683 optimizing_compiler_thread_(this),
1683 marking_thread_(NULL), 1684 marking_thread_(NULL),
1684 sweeper_thread_(NULL) { 1685 sweeper_thread_(NULL) {
1685 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); 1686 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
1686 TRACE_ISOLATE(constructor); 1687 TRACE_ISOLATE(constructor);
1687 1688
1688 memset(isolate_addresses_, 0, 1689 memset(isolate_addresses_, 0,
1689 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1690 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1690 1691
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1804 }
1804 builtins_.TearDown(); 1805 builtins_.TearDown();
1805 bootstrapper_->TearDown(); 1806 bootstrapper_->TearDown();
1806 1807
1807 // Remove the external reference to the preallocated stack memory. 1808 // Remove the external reference to the preallocated stack memory.
1808 delete preallocated_message_space_; 1809 delete preallocated_message_space_;
1809 preallocated_message_space_ = NULL; 1810 preallocated_message_space_ = NULL;
1810 PreallocatedMemoryThreadStop(); 1811 PreallocatedMemoryThreadStop();
1811 1812
1812 HeapProfiler::TearDown(); 1813 HeapProfiler::TearDown();
1813 CpuProfiler::TearDown(); 1814 delete cpu_profiler_;
1815 cpu_profiler_ = NULL;
1816
1814 if (runtime_profiler_ != NULL) { 1817 if (runtime_profiler_ != NULL) {
1815 runtime_profiler_->TearDown(); 1818 runtime_profiler_->TearDown();
1816 delete runtime_profiler_; 1819 delete runtime_profiler_;
1817 runtime_profiler_ = NULL; 1820 runtime_profiler_ = NULL;
1818 } 1821 }
1819 heap_.TearDown(); 1822 heap_.TearDown();
1820 logger_->TearDown(); 1823 logger_->TearDown();
1821 1824
1822 // The default isolate is re-initializable due to legacy API. 1825 // The default isolate is re-initializable due to legacy API.
1823 state_ = UNINITIALIZED; 1826 state_ = UNINITIALIZED;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 stub_cache_ = new StubCache(this, runtime_zone()); 2035 stub_cache_ = new StubCache(this, runtime_zone());
2033 regexp_stack_ = new RegExpStack(); 2036 regexp_stack_ = new RegExpStack();
2034 regexp_stack_->isolate_ = this; 2037 regexp_stack_->isolate_ = this;
2035 date_cache_ = new DateCache(); 2038 date_cache_ = new DateCache();
2036 code_stub_interface_descriptors_ = 2039 code_stub_interface_descriptors_ =
2037 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; 2040 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
2038 2041
2039 // Enable logging before setting up the heap 2042 // Enable logging before setting up the heap
2040 logger_->SetUp(); 2043 logger_->SetUp();
2041 2044
2042 CpuProfiler::SetUp(); 2045 cpu_profiler_ = new CpuProfiler(this);
2043 HeapProfiler::SetUp(); 2046 HeapProfiler::SetUp();
2044 2047
2045 // Initialize other runtime facilities 2048 // Initialize other runtime facilities
2046 #if defined(USE_SIMULATOR) 2049 #if defined(USE_SIMULATOR)
2047 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) 2050 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
2048 Simulator::Initialize(this); 2051 Simulator::Initialize(this);
2049 #endif 2052 #endif
2050 #endif 2053 #endif
2051 2054
2052 { // NOLINT 2055 { // NOLINT
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 2368
2366 #ifdef DEBUG 2369 #ifdef DEBUG
2367 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2370 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2368 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2371 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2369 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2372 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2370 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2373 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2371 #undef ISOLATE_FIELD_OFFSET 2374 #undef ISOLATE_FIELD_OFFSET
2372 #endif 2375 #endif
2373 2376
2374 } } // namespace v8::internal 2377 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698