[cctest] Fix SetJitCodeEventHandler
- Remove commented out line - Simulate full space properly, independently of flags set Bug: Change-Id: I6013caae43eb40dd568fbd872eb0ee78288c61bf Reviewed-on: https://chromium-review.googlesource.com/531084 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#45874}
This commit is contained in:
parent
dda2b5b1ec
commit
6713a76b06
@ -14592,7 +14592,6 @@ static void event_handler(const v8::JitCodeEvent* event) {
|
||||
|
||||
UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
||||
i::FLAG_stress_compaction = true;
|
||||
// FLAG_stress_incremental_marking = false;
|
||||
i::FLAG_incremental_marking = false;
|
||||
if (i::FLAG_never_compact) return;
|
||||
const char* script =
|
||||
@ -14636,24 +14635,24 @@ UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
||||
for (int i = 0; i < kIterations; ++i) {
|
||||
LocalContext env(isolate);
|
||||
i::AlwaysAllocateScope always_allocate(i_isolate);
|
||||
i::heap::SimulateFullSpace(i::FLAG_ignition || i::FLAG_turbo
|
||||
? heap->old_space()
|
||||
: heap->code_space());
|
||||
CompileRun(script);
|
||||
|
||||
// Keep a strong reference to the code object in the handle scope.
|
||||
i::Handle<i::Code> bar_code(
|
||||
i::Handle<i::JSFunction>::cast(
|
||||
i::Handle<i::JSFunction> bar(i::Handle<i::JSFunction>::cast(
|
||||
v8::Utils::OpenHandle(*env->Global()
|
||||
->Get(env.local(), v8_str("bar"))
|
||||
.ToLocalChecked()))
|
||||
->code());
|
||||
i::Handle<i::Code> foo_code(
|
||||
i::Handle<i::JSFunction>::cast(
|
||||
.ToLocalChecked())));
|
||||
i::Handle<i::JSFunction> foo(i::Handle<i::JSFunction>::cast(
|
||||
v8::Utils::OpenHandle(*env->Global()
|
||||
->Get(env.local(), v8_str("foo"))
|
||||
.ToLocalChecked()))
|
||||
->code());
|
||||
.ToLocalChecked())));
|
||||
|
||||
i::PagedSpace* foo_owning_space = reinterpret_cast<i::PagedSpace*>(
|
||||
i::Page::FromAddress(foo->abstract_code()->address())->owner());
|
||||
i::PagedSpace* bar_owning_space = reinterpret_cast<i::PagedSpace*>(
|
||||
i::Page::FromAddress(bar->abstract_code()->address())->owner());
|
||||
CHECK_EQ(foo_owning_space, bar_owning_space);
|
||||
i::heap::SimulateFullSpace(foo_owning_space);
|
||||
|
||||
// Clear the compilation cache to get more wastage.
|
||||
reinterpret_cast<i::Isolate*>(isolate)->compilation_cache()->Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user