Chromium Code Reviews

Unified Diff: src/spaces.h

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: Code style fixes after review #2 Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index 43f44a5c707d0c41632215943f2a553296a0f611..6144c95d14d689876dc2008c5c506ecfd37faa51 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -1714,9 +1714,16 @@ class PagedSpace : public Space {
Address* allocation_top_address() { return &allocation_info_.top; }
Address* allocation_limit_address() { return &allocation_info_.limit; }
+ enum AllocationType {
+ NEW_OBJECT,
+ MOVE_OBJECT
+ };
+
// Allocate the requested number of bytes in the space if possible, return a
// failure object if not.
- MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes);
+ MUST_USE_RESULT inline MaybeObject* AllocateRaw(
+ int size_in_bytes,
+ AllocationType event = NEW_OBJECT);
virtual bool ReserveSpace(int bytes);

Powered by Google App Engine