resolve-jit-symbols
v0.5.0
Published
Resolves symbols for dynamic code generated by a JIT via a map file.
Downloads
38,634
Readme
resolve-jit-symbols
Resolves symbols for dynamic code generated by a JIT via a map file.
var resolveJITSymbols = require('resolve-jit-symbols');
var map = fs.readFileSync(__dirname + '/test/fixtures/jit.map', 'utf8')
var resolver = resolveJITSymbols(map);
var res = resolver.resolve('0x38852ffd485a');
console.log(res);
{ address : '38852ffd4640',
size : '54c',
decimalAddress : 62144686933568,
symbol : 'LazyCompile : *go' }
Command Line
cat test/fixtures/callgraph.csv | rjs test/fixtures/jit.map
Installation
npm install resolve-jit-symbols
Usage
# Supply path to map file
cat callstack.csv | rjs /tmp/<perf-*.map>
# Or pid of process whose map file to use (resolved from /tmp/perf-<pid>.map)
cat callstack.csv | rjs <pid>
How to Generate JIT Symbol Files
Any tool that can generate the format described here will work.
With Node.js >=v0.11.15
do the following:
node --perf-basic-prof your-app.js
This will create a map file at /tmp/perf-<pid>.map
.
API
generated with docme
License
MIT