0

I am trying to profile a nodeJS REST API using perf utility. command I'm using is perf record -F 99 -p 5395 -g -- sleep 60 5395 being process id. It works properly and writes data to perf.data file. [ perf record: Woken up 6 times to write data ] [ perf record: Captured and wrote 1.360 MB perf.data (~59425 samples) ] However when I'm trying to create report from it using perf script > out.perf I'm getting error Failed to open /tmp/perf-5395.map, continuing without symbols. Which basically means perf could not decompile code to show javascript code in output file. How to get this map file? What am I missing?

Pramod Jangam
  • 316
  • 3
  • 10

1 Answers1

1

Missing --perf_basic_prof_only_functions on node.

E.g. node --perf_basic_prof_only_functions app.js

Marius
  • 3,589
  • 3
  • 27
  • 30
Brendan Gregg
  • 965
  • 8
  • 10
  • I am new to linux. Can you please elabourate `perf record --perf_basic_prof_only_functions -F 99 -p 26882 -g -- sleep 60` tells me `unknown option `perf_basic_prof_only_functions'` – Pramod Jangam Oct 21 '16 at 20:46
  • Add that to your node process like this `node --perf_basic_prof_only_functions app.js` , then use `perf` as before. – Marius Jan 23 '17 at 02:17