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

Unified Diff: src/spaces-inl.h

Issue 8055029: Add experimental support for tracing the state of the VM heap to a file Base URL: http://v8.googlecode.com/svn/branches/experimental/heap-visualization/
Patch Set: Created 9 years, 3 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
« src/spaces.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 9457)
+++ src/spaces-inl.h (working copy)
@@ -170,6 +170,16 @@
owner->Free(page->ObjectAreaStart(),
static_cast<int>(page->ObjectAreaEnd() -
page->ObjectAreaStart()));
+ for (HeapVisualizer* vis = heap->visualizer();
+ vis != NULL;
+ vis = vis->next()) {
+ vis->Name(v8::HeapVisualizer::kHeapOverheadPseudoSpaceIdentity,
+ reinterpret_cast<uintptr_t>(page->address()),
+ page->ObjectAreaStart() - page->address());
+ vis->ConstantAllocation(reinterpret_cast<uintptr_t>(page->address()),
+ page->ObjectAreaStart() - page->address(),
+ 0);
+ }
heap->incremental_marking()->SetOldSpacePageFlags(chunk);
@@ -184,6 +194,17 @@
}
+void PagedSpace::SetTop(Address top, Address limit) {
+ if (heap()->has_visualizer()) {
+ VisualizeTopChange(top);
+ }
+ ASSERT(top == limit ||
+ Page::FromAddress(top) == Page::FromAddress(limit - 1));
+ allocation_info_.top = top;
+ allocation_info_.limit = limit;
+}
+
+
void MemoryChunk::set_scan_on_scavenge(bool scan) {
if (scan) {
if (!scan_on_scavenge()) heap_->increment_scan_on_scavenge_pages();
« src/spaces.cc ('K') | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698