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

Unified Diff: src/heap.h

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 2 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/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index da78b18a512764dae3510e6fcc6dfaa66665e129..ba3882c98c7dc0def37648c78335061a6294076a 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -259,6 +259,12 @@ class Isolate;
class WeakObjectRetainer;
+enum AllocationOriginTrackMode {
+ DONT_TRACK_ALLOCATION_ORIGIN,
+ TRACK_ALLOCATION_ORIGIN
+};
+
+
typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
Object** pointer);
@@ -564,8 +570,9 @@ class Heap {
MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray(
ElementsKind elements_kind,
PretenureFlag pretenure = NOT_TENURED) {
- return AllocateJSArrayAndStorage(elements_kind, 0, 0,
- DONT_INITIALIZE_ARRAY_ELEMENTS,
+ return AllocateJSArrayAndStorage(elements_kind, 0,
+ JSArray::kPreallocatedArrayElements,
+ INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE,
pretenure);
}
@@ -593,7 +600,9 @@ class Heap {
// Returns a deep copy of the JavaScript object.
// Properties and elements are copied too.
// Returns failure if allocation failed.
- MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source);
+ MUST_USE_RESULT MaybeObject* CopyJSObject(
+ JSObject* source,
+ AllocationOriginTrackMode mode = DONT_TRACK_ALLOCATION_ORIGIN);
// Allocates the function prototype.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698