Parser of --trace-inlining
output from Crankshaft
Inlining builtin 000002F5B86C1BE9 <JS Function charCodeAt (SharedFunctionInfo 000002F5B8657279)>
Inlined isNaN called from adjustOffset.
Inlined get length called from slice.
Did not inline parse_int called from next_str (target text too big).
const parser = require('trace-inline-parse')
console.log(parser('Inlined isNaN called from adjustOffset.'))
/*
{
target: {
name: 'isNaN',
accessor: false
},
caller: {
name: 'adjustOffset',
accessor: false
},
type: 'func',
inlined: true,
tailcall: false
}
*/
console.log(parser('Did not inline get foo called from (target text too big).'))
/*
{
target: {
name: 'foo',
accessor: 'get'
},
caller: false,
type: 'func',
inlined: false,
reason: 'target text too big'
}
*/
console.log(parser('Inlining builtin 000002F5B86C1BE9 <JS Function charCodeAt (SharedFunctionInfo 000002F5B8657279)>'))
/*
{
target: {
name: 'charCodeAt',
accessor: false
},
caller: false,
type: 'native',
inlined: true,
place: 'builtin',
address: '000002F5B86C1BE9'
}
*/
Parse a line and return Node
object.
processed function; equals false
if function name is empty
parent function; equals false
if function name is empty
type of processed function: 'func' for plain js functions, 'native' for any native functions
Is node inlined or not?
Was function tail call optimized or not?
place of native inlined function: builtin
for any internal V8 functions, api
for any native nodejs function
address of native function
why function wasn't inlined?
Name of function
get
for getters, set
for setters, false
for any other functions
MIT, 2017 (c) Dmitry Tsvettsikh