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

Unified Diff: src/heap-profiler.cc

Issue 11415203: Introduce callback for resolving global object name while taking heap snapshot (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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
« no previous file with comments | « src/heap-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
===================================================================
--- src/heap-profiler.cc (revision 13098)
+++ src/heap-profiler.cc (working copy)
@@ -65,23 +65,29 @@
}
-HeapSnapshot* HeapProfiler::TakeSnapshot(const char* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshot(
+ const char* name,
+ int type,
+ v8::ActivityControl* control,
+ v8::HeapProfiler::ObjectNameResolver* resolver) {
ASSERT(Isolate::Current()->heap_profiler() != NULL);
return Isolate::Current()->heap_profiler()->TakeSnapshotImpl(name,
type,
- control);
+ control,
+ resolver);
}
-HeapSnapshot* HeapProfiler::TakeSnapshot(String* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshot(
+ String* name,
+ int type,
+ v8::ActivityControl* control,
+ v8::HeapProfiler::ObjectNameResolver* resolver) {
ASSERT(Isolate::Current()->heap_profiler() != NULL);
return Isolate::Current()->heap_profiler()->TakeSnapshotImpl(name,
type,
- control);
+ control,
+ resolver);
}
@@ -122,16 +128,18 @@
}
-HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name,
- int type,
- v8::ActivityControl* control) {
+HeapSnapshot* HeapProfiler::TakeSnapshotImpl(
+ const char* name,
+ int type,
+ v8::ActivityControl* control,
+ v8::HeapProfiler::ObjectNameResolver* resolver) {
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);
+ HeapSnapshotGenerator generator(result, control, resolver);
generation_completed = generator.GenerateSnapshot();
break;
}
@@ -147,10 +155,13 @@
}
-HeapSnapshot* HeapProfiler::TakeSnapshotImpl(String* name,
- int type,
- v8::ActivityControl* control) {
- return TakeSnapshotImpl(snapshots_->names()->GetName(name), type, control);
+HeapSnapshot* HeapProfiler::TakeSnapshotImpl(
+ String* name,
+ int type,
+ v8::ActivityControl* control,
+ v8::HeapProfiler::ObjectNameResolver* resolver) {
+ return TakeSnapshotImpl(snapshots_->names()->GetName(name), type, control,
+ resolver);
}
void HeapProfiler::StartHeapObjectsTrackingImpl() {
« no previous file with comments | « src/heap-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698