This reverts commit ed7e4554db
.
Reason for revert: new test fails on Mac: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/40407/overview
Original change's description:
> [mjsunit][tools][d8] Full roundtrip tickprocessor test
>
> - Add os.d8Path property
> - Add os.name property
> - Change tickprocssor test to use command line arguments for testing
> various configurations
> - Change tickprocessor test to create a temporary v8.log and read it
> back in on linux only
> - Rearrange code in tickprocessor.mjs to allow instantiating the
> CppEntriesProvider directly
> - Drop complete symbol-list for tickprocessor-test-large.log for better
> code searching in V8
>
> Change-Id: Ib56dd0a1ba5377282c84c4de6f17e2fd69ee8123
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929120
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74892}
Change-Id: I7d7506b370f96365552a21fa767b1c5c608ebb1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929380
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#74894}
59 lines
1.0 KiB
JavaScript
59 lines
1.0 KiB
JavaScript
// Copyright 2020 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.
|
|
|
|
// Sample file for creating tickprocessor-test.log
|
|
"use strict"
|
|
|
|
let result;
|
|
|
|
function loop() {
|
|
let result = 0;
|
|
for (let i = 0; i < 10_000_000; i++) {
|
|
result = add(result, 1);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function add(a, b) {
|
|
return a + b;
|
|
}
|
|
|
|
|
|
result = loop();
|
|
result = loop();
|
|
|
|
// Cause some IC misses
|
|
function read_monomorphic(o) {
|
|
return o.value
|
|
}
|
|
|
|
function read_polymorphic(o) {
|
|
return o.value
|
|
}
|
|
|
|
function read_megamorphic(o) {
|
|
return o.value
|
|
}
|
|
|
|
const objects = [];
|
|
for (let i = 0; i < 100; i++) {
|
|
const object = {};
|
|
object['key' + i ];
|
|
object['value'] = 1 + i/100;
|
|
objects.push(object)
|
|
}
|
|
|
|
function ics() {
|
|
result = 0;
|
|
for (let i = 0; i < objects.length; i++) {
|
|
result += read_monomorphic(objects[0]);
|
|
result += read_polymorphic(objects[i % 3])
|
|
result += read_megamorphic(objects[i]);
|
|
}
|
|
}
|
|
|
|
for (let i = 0; i < 100_000; i++) {
|
|
ics();
|
|
}
|