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

Unified Diff: src/objects.cc

Issue 22852024: Track JS allocations as they arrive with no affection on performance when tracking is switched off (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make separate API for JS allocations recording, add example of checking JS allocations recording in… Created 7 years, 4 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index daa5a4a5bdad825e7d73fc42531df9e23ac848b6..95d9c83b5179ce4002fa0b3818e8d535ae795c20 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2312,6 +2312,13 @@ static void RightTrimFixedArray(Heap* heap, FixedArray* elms, int to_trim) {
MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta);
}
}
+
+ // This repeating record is necessary because the array may not be moved
+ // during GC, and size has to be adjusted nevetheless.
loislo 2013/08/27 09:04:57 tipo: nevertheless
Alexandra Mikhaylova 2013/09/19 16:03:38 Done.
+ HeapProfiler* profiler = heap->isolate()->heap_profiler();
+ if (profiler->is_tracking_allocations()) {
+ profiler->NewObjectEvent(elms->address(), elms->Size());
loislo 2013/08/27 09:04:57 Sounds like we need UpdateObjectSizeEvent method.
Hannes Payer (out of office) 2013/08/28 09:51:32 yes, an update object size event would be the righ
Alexandra Mikhaylova 2013/09/19 16:03:38 Done.
Alexandra Mikhaylova 2013/09/19 16:03:38 Done.
+ }
}

Powered by Google App Engine
This is Rietveld 408576698