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

Side by Side Diff: src/isolate.cc

Issue 13457002: Isolatify CPU profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 global_handles_(NULL), 1686 global_handles_(NULL),
1687 context_switcher_(NULL), 1687 context_switcher_(NULL),
1688 thread_manager_(NULL), 1688 thread_manager_(NULL),
1689 fp_stubs_generated_(false), 1689 fp_stubs_generated_(false),
1690 has_installed_extensions_(false), 1690 has_installed_extensions_(false),
1691 string_tracker_(NULL), 1691 string_tracker_(NULL),
1692 regexp_stack_(NULL), 1692 regexp_stack_(NULL),
1693 date_cache_(NULL), 1693 date_cache_(NULL),
1694 code_stub_interface_descriptors_(NULL), 1694 code_stub_interface_descriptors_(NULL),
1695 context_exit_happened_(false), 1695 context_exit_happened_(false),
1696 cpu_profiler_(NULL),
1696 deferred_handles_head_(NULL), 1697 deferred_handles_head_(NULL),
1697 optimizing_compiler_thread_(this), 1698 optimizing_compiler_thread_(this),
1698 marking_thread_(NULL), 1699 marking_thread_(NULL),
1699 sweeper_thread_(NULL) { 1700 sweeper_thread_(NULL) {
1700 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); 1701 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
1701 TRACE_ISOLATE(constructor); 1702 TRACE_ISOLATE(constructor);
1702 1703
1703 memset(isolate_addresses_, 0, 1704 memset(isolate_addresses_, 0,
1704 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1705 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1705 1706
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 } 1819 }
1819 builtins_.TearDown(); 1820 builtins_.TearDown();
1820 bootstrapper_->TearDown(); 1821 bootstrapper_->TearDown();
1821 1822
1822 // Remove the external reference to the preallocated stack memory. 1823 // Remove the external reference to the preallocated stack memory.
1823 delete preallocated_message_space_; 1824 delete preallocated_message_space_;
1824 preallocated_message_space_ = NULL; 1825 preallocated_message_space_ = NULL;
1825 PreallocatedMemoryThreadStop(); 1826 PreallocatedMemoryThreadStop();
1826 1827
1827 HeapProfiler::TearDown(); 1828 HeapProfiler::TearDown();
1828 CpuProfiler::TearDown(); 1829 delete cpu_profiler_;
1830 cpu_profiler_ = NULL;
1831
1829 if (runtime_profiler_ != NULL) { 1832 if (runtime_profiler_ != NULL) {
1830 runtime_profiler_->TearDown(); 1833 runtime_profiler_->TearDown();
1831 delete runtime_profiler_; 1834 delete runtime_profiler_;
1832 runtime_profiler_ = NULL; 1835 runtime_profiler_ = NULL;
1833 } 1836 }
1834 heap_.TearDown(); 1837 heap_.TearDown();
1835 logger_->TearDown(); 1838 logger_->TearDown();
1836 1839
1837 // The default isolate is re-initializable due to legacy API. 1840 // The default isolate is re-initializable due to legacy API.
1838 state_ = UNINITIALIZED; 1841 state_ = UNINITIALIZED;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 stub_cache_ = new StubCache(this, runtime_zone()); 2050 stub_cache_ = new StubCache(this, runtime_zone());
2048 regexp_stack_ = new RegExpStack(); 2051 regexp_stack_ = new RegExpStack();
2049 regexp_stack_->isolate_ = this; 2052 regexp_stack_->isolate_ = this;
2050 date_cache_ = new DateCache(); 2053 date_cache_ = new DateCache();
2051 code_stub_interface_descriptors_ = 2054 code_stub_interface_descriptors_ =
2052 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; 2055 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
2053 2056
2054 // Enable logging before setting up the heap 2057 // Enable logging before setting up the heap
2055 logger_->SetUp(); 2058 logger_->SetUp();
2056 2059
2057 CpuProfiler::SetUp(); 2060 cpu_profiler_ = new CpuProfiler(this);
2058 HeapProfiler::SetUp(); 2061 HeapProfiler::SetUp();
2059 2062
2060 // Initialize other runtime facilities 2063 // Initialize other runtime facilities
2061 #if defined(USE_SIMULATOR) 2064 #if defined(USE_SIMULATOR)
2062 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) 2065 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
2063 Simulator::Initialize(this); 2066 Simulator::Initialize(this);
2064 #endif 2067 #endif
2065 #endif 2068 #endif
2066 2069
2067 { // NOLINT 2070 { // NOLINT
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 2383
2381 #ifdef DEBUG 2384 #ifdef DEBUG
2382 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2385 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2383 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2386 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2384 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2387 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2385 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2388 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2386 #undef ISOLATE_FIELD_OFFSET 2389 #undef ISOLATE_FIELD_OFFSET
2387 #endif 2390 #endif
2388 2391
2389 } } // namespace v8::internal 2392 } } // 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