ef7d657960
Add support to flush only baseline code. FLAG_flush_baseline_code controls if baseline code is flushed or not and FLAG_flush_bytecode controls if bytecode is flushed or not. With this CL it is possible to control if we want to flush only bytecode / only baseline code / both. This also lets us have different heuristics for bytecode and baseline code flushing. Bug: v8:11947 Change-Id: Ibdfb9d8be7e7d54196db7890541fa0b5d84f037e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060481 Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#76075}
23 lines
499 B
JavaScript
23 lines
499 B
JavaScript
// Copyright 2019 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --expose-gc --stress-flush-code --flush-bytecode
|
|
|
|
var Debug = debug.Debug
|
|
var bp;
|
|
|
|
Debug.setListener(function (event, exec_state, event_data, data) {
|
|
if (event == Debug.DebugEvent.Break) {
|
|
Debug.clearBreakPoint(bp);
|
|
gc();
|
|
}
|
|
});
|
|
|
|
function f() {
|
|
(function () {})();
|
|
}
|
|
|
|
bp = Debug.setBreakPoint(f, 0, 0);
|
|
f();
|