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

Unified Diff: src/heap-profiler.cc

Issue 12217106: Don't use TLS for space iterators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed feedback. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-profiler.h ('k') | src/liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index 45a93f9e14fbf71a912f447ac558c26a44aad7c2..ca8eda19ac74f0d2e9eb51b21cda1a2f46ed589f 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -33,8 +33,8 @@
namespace v8 {
namespace internal {
-HeapProfiler::HeapProfiler()
- : snapshots_(new HeapSnapshotsCollection()),
+HeapProfiler::HeapProfiler(Heap* heap)
+ : snapshots_(new HeapSnapshotsCollection(heap)),
next_snapshot_uid_(1) {
}
@@ -45,15 +45,16 @@ HeapProfiler::~HeapProfiler() {
void HeapProfiler::ResetSnapshots() {
+ Heap* the_heap = heap();
delete snapshots_;
- snapshots_ = new HeapSnapshotsCollection();
+ snapshots_ = new HeapSnapshotsCollection(the_heap);
}
void HeapProfiler::SetUp() {
Isolate* isolate = Isolate::Current();
if (isolate->heap_profiler() == NULL) {
- isolate->set_heap_profiler(new HeapProfiler());
+ isolate->set_heap_profiler(new HeapProfiler(isolate->heap()));
}
}
@@ -139,7 +140,7 @@ HeapSnapshot* HeapProfiler::TakeSnapshotImpl(
bool generation_completed = true;
switch (s_type) {
case HeapSnapshot::kFull: {
- HeapSnapshotGenerator generator(result, control, resolver);
+ HeapSnapshotGenerator generator(result, control, resolver, heap());
generation_completed = generator.GenerateSnapshot();
break;
}
« no previous file with comments | « src/heap-profiler.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698