Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,75 @@
// Copyright 2017 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.
(function() {
createSuite('Debugger.paused', 10000, DebuggerPaused, Setup, TearDown);
createSuite(
'Debugger.getPossibleBreakpoints', 10000, DebuggerGetPossibleBreakpoints,
SetupGetPossibleBreakpoints, TearDown);
createSuite(
'AsyncStacksInstrumentation', 10000, AsyncStacksInstrumentation,
SetupAsyncStacksInstrumentation, TearDown);
function Setup() {
SendMessage('Debugger.enable');
// Force lazy compilation of inspector related scripts.
SendMessage('Runtime.evaluate', {expression: ''});
}
function TearDown() {
SendMessage('Debugger.disable');
}
function DebuggerPaused() {
for (var i = 0; i < 10; ++i) {
debugger;
}
}
let scriptId;
function SetupGetPossibleBreakpoints() {
Setup();
let expression = '';
for (let i = 0; i < 20; ++i) {
expression += `function foo${i}(){
if (a) {
return true;
} else {
return false;
}
}\n`;
};
listener = function(msg) {
if (msg.method === 'Debugger.scriptParsed') {
scriptId = msg.params.scriptId;
listener = null;
}
};
SendMessage('Runtime.evaluate', {expression});
}
function DebuggerGetPossibleBreakpoints() {
SendMessage(
'Debugger.getPossibleBreakpoints',
{start: {lineNumber: 0, columnNumber: 0, scriptId: scriptId}});
}
function SetupAsyncStacksInstrumentation() {
Setup();
SendMessage('Debugger.setAsyncCallStackDepth', {maxDepth: 1024});
}
function AsyncStacksInstrumentation() {
var p = Promise.resolve();
var nopCallback = () => undefined;
var done = false;
for (let i = 0; i < 1000; ++i) {
p = p.then(nopCallback);
}
p = p.then(() => done = true);
while (!done) %PerformMicrotaskCheckpoint();
}
})();

View File

@ -0,0 +1,46 @@
// Copyright 2017 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.
d8.file.execute('../base.js');
let listener = null;
d8.file.execute('debugger.js');
d8.file.execute('runtime.js');
let success = true;
let lastId = 0;
function PrintResult(name, result) {
print(name + '-Inspector(Score): ' + result);
}
function PrintStep(name) {}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError,
NotifyStep: PrintStep });
function SendMessage(method, params) {
let obj = {id: ++lastId, method: method};
if (params) {
obj.params = params;
}
send(JSON.stringify(obj));
}
function receive(message) {
if (listener) {
listener(JSON.parse(message));
}
}

View File

@ -0,0 +1,25 @@
// Copyright 2017 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.
(function() {
new BenchmarkSuite('Runtime.evaluate(String16Cstor)', [1000], [
new Benchmark('Runtime.evaluate(String16Cstor)', false, false, 0, EvaluateTest, Setup, TearDown),
]);
function Setup() {
// Force lazy compilation of inspector related scripts.
SendMessage('Runtime.evaluate', {expression: ''});
}
function TearDown() {
}
function EvaluateTest() {
// This is meant to exercise the overhead of v8_inspector::String16
// constructors. https://crbug.com/738469
for (var i = 0; i < 10; ++i) {
SendMessage('Runtime.evaluate', {expression: '({})', returnByValue: true});
}
}
})();