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

Unified Diff: src/heap-profiler.cc

Issue 5862002: Version 3.0.2. (Closed)
Patch Set: Created 10 years 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
« ChangeLog ('K') | « src/heap-profiler.h ('k') | src/hydrogen.h » ('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 6700d38b250c426e4767dbe9674121dba12af12e..91ac9867a2855d83963fc6c35ee031b9485fdf8c 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -348,34 +348,27 @@ void HeapProfiler::TearDown() {
#ifdef ENABLE_LOGGING_AND_PROFILING
-HeapSnapshot* HeapProfiler::TakeSnapshot(const char* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshot(const char* name, int type) {
ASSERT(singleton_ != NULL);
- return singleton_->TakeSnapshotImpl(name, type, control);
+ return singleton_->TakeSnapshotImpl(name, type);
}
-HeapSnapshot* HeapProfiler::TakeSnapshot(String* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshot(String* name, int type) {
ASSERT(singleton_ != NULL);
- return singleton_->TakeSnapshotImpl(name, type, control);
+ return singleton_->TakeSnapshotImpl(name, type);
}
-HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name, int type) {
Heap::CollectAllGarbage(true);
HeapSnapshot::Type s_type = static_cast<HeapSnapshot::Type>(type);
HeapSnapshot* result =
snapshots_->NewSnapshot(s_type, name, next_snapshot_uid_++);
- bool generation_completed = true;
switch (s_type) {
case HeapSnapshot::kFull: {
- HeapSnapshotGenerator generator(result, control);
- generation_completed = generator.GenerateSnapshot();
+ HeapSnapshotGenerator generator(result);
+ generator.GenerateSnapshot();
break;
}
case HeapSnapshot::kAggregated: {
@@ -388,19 +381,13 @@ HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name,
default:
UNREACHABLE();
}
- if (!generation_completed) {
- delete result;
- result = NULL;
- }
- snapshots_->SnapshotGenerationFinished(result);
+ snapshots_->SnapshotGenerationFinished();
return result;
}
-HeapSnapshot* HeapProfiler::TakeSnapshotImpl(String* name,
- int type,
- v8::ActivityControl* control) {
- return TakeSnapshotImpl(snapshots_->GetName(name), type, control);
+HeapSnapshot* HeapProfiler::TakeSnapshotImpl(String* name, int type) {
+ return TakeSnapshotImpl(snapshots_->GetName(name), type);
}
« ChangeLog ('K') | « src/heap-profiler.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698