2016-04-18 20:40:09 +02:00
|
|
|
/* eslint-disable strict */
|
2015-12-09 20:37:51 +01:00
|
|
|
const scriptFiles = [
|
2015-11-25 15:08:58 +01:00
|
|
|
'internal/v8_prof_polyfill',
|
|
|
|
'v8/tools/splaytree',
|
|
|
|
'v8/tools/codemap',
|
|
|
|
'v8/tools/csvparser',
|
|
|
|
'v8/tools/consarray',
|
|
|
|
'v8/tools/profile',
|
|
|
|
'v8/tools/profile_view',
|
|
|
|
'v8/tools/logreader',
|
|
|
|
'v8/tools/tickprocessor',
|
|
|
|
'v8/tools/SourceMap',
|
|
|
|
'v8/tools/tickprocessor-driver'
|
|
|
|
];
|
2015-12-09 20:37:51 +01:00
|
|
|
var script = '';
|
2015-11-25 15:08:58 +01:00
|
|
|
|
2015-12-09 20:37:51 +01:00
|
|
|
scriptFiles.forEach(function(s) {
|
|
|
|
script += process.binding('natives')[s] + '\n';
|
2015-11-25 15:08:58 +01:00
|
|
|
});
|
|
|
|
|
2017-06-09 23:14:35 +02:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
function printErr(err) {
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
|
2016-09-17 12:54:34 +02:00
|
|
|
const tickArguments = [];
|
2015-11-25 15:08:58 +01:00
|
|
|
if (process.platform === 'darwin') {
|
2016-09-10 15:05:30 +02:00
|
|
|
tickArguments.push('--mac');
|
2015-11-25 15:08:58 +01:00
|
|
|
} else if (process.platform === 'win32') {
|
|
|
|
tickArguments.push('--windows');
|
|
|
|
}
|
|
|
|
tickArguments.push.apply(tickArguments, process.argv.slice(1));
|
2016-01-24 18:32:14 +01:00
|
|
|
script = `(function() {
|
|
|
|
arguments = ${JSON.stringify(tickArguments)};
|
|
|
|
${script}
|
|
|
|
})()`;
|
2015-12-09 20:37:51 +01:00
|
|
|
eval(script);
|