Reviewers: Michael Starzinger,
Message:
PTAL
Description:
Allow to enable/disable inline allocation via runtime function.
This will allow to artificially trigger GCs on all allocations for testing
purposes.
BUG=
Please review this at https://codereview.chromium.org/144543005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -1 lines):
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
55b270c16fb24e335ccb4abd47b8b4e27851e67e..e34f0ca900c586e34a226e6d2cd61a091592f2cb
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8744,12 +8744,22 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_CompileForOnStackReplacement) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) {
SealHandleScope shs(isolate);
- ASSERT(args.length() == 2);
+ ASSERT(args.length() == 2 || args.length() == 3);
#ifdef DEBUG
CONVERT_SMI_ARG_CHECKED(interval, 0);
CONVERT_SMI_ARG_CHECKED(timeout, 1);
isolate->heap()->set_allocation_timeout(timeout);
FLAG_gc_interval = interval;
+ if (args.length() == 3) {
+ // Enable/disable inline allocation if requested.
+ CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2);
+ if (inline_allocation &&
isolate->heap()->inline_allocation_disabled()) {
+ isolate->heap()->EnableInlineAllocation();
+ } else if (!inline_allocation &&
+ !isolate->heap()->inline_allocation_disabled()) {
+ isolate->heap()->DisableInlineAllocation();
+ }
+ }
#endif
return isolate->heap()->undefined_value();
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.