Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding v8/Node.js profiling report

I'm trying to use --prof option with Node.js. So I get the following report after linux-tick-processor:

 [Shared libraries]:
   ticks  total  nonlib   name
  20736   94.8%    0.0%  b78a5000-b78a6000
    574    2.6%    0.0%  /usr/lib/libv8.so.3.4.14.21
    117    0.5%    0.0%  /usr/bin/node
     62    0.3%    0.0%  /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
      1    0.0%    0.0%  /lib/i386-linux-gnu/ld-2.13.so

 [JavaScript]:
   ticks  total  nonlib   name
      3    0.0%    0.8%  Stub: StringAddStub
      3    0.0%    0.8%  Builtin: A builtin from the snapshot {1}

 ...

   ticks parent  name
  20736   94.8%  b78a5000-b78a6000

    574    2.6%  /usr/lib/libv8.so.3.4.14.21
     94   16.4%    Function: ~QueryCommand.toBinary /storage/hoc/nodejs/lib/mongodb/commands/query_command.js:37
     94  100.0%      Function: ~Connection.send /storage/hoc/nodejs/lib/mongodb/connection.js:353
     94  100.0%        Function: ~Db.executeCommand /storage/hoc/nodejs/lib/mongodb/db.js:629

 ...

What is the b78a5000-b78a6000? Numbers in this line are different on each run.

What do columns total, nonlib, parent mean? I can't find docs on it.

like image 526
Pavel Koryagin Avatar asked Nov 22 '11 07:11

Pavel Koryagin


1 Answers

I am guessing this question is now obsolete. I am also interested in profiling my node application, but there no longer is a --prof switch (which seems to get crude information anyway).

Look for dtrace and flamegraph if you use Unix (such as Solaris). Very detailed profiling. Unfortunately, I cannot use it because I run Linux (Ubuntu) and the original dtrace is not properly ported yet.

like image 152
Redsandro Avatar answered Sep 22 '22 02:09

Redsandro