FAQ
I'm using https://github.com/bnoordhuis/node-profiler to do some profiling.
I've got a chunk of code that pulls in json from a file and performs some
logic on the objects that get loaded. There are 1000s of objects and a
dependency graph, so it takes a good long while. This is a stress test. The
code looks like:

   var profiler = require('profiler');
profiler.resume();
ce.buildDepGraph();
profiler.pause();

OK so ce.buildDepGraph is a function that loops the objects from the json
and builds a dep graph. It all runs fine, but when I run v8.log through the
linux-tick-processor I get hundreds of lines that look like:

     line 947: unknown code state: undefined

and hundreds more like:

     Code move event for unknown code: 0x3254c6e0

At the end, I get this:


Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted, 0
excluded).

  [Unknown]:
    ticks total nonlib name
    9259 100.0%

  [Shared libraries]:
    ticks total nonlib name

  [JavaScript]:
    ticks total nonlib name

  [C++]:
    ticks total nonlib name

  [GC]:
    ticks total nonlib name
       0 0.0%

  [Bottom up (heavy) profile]:
   Note: percentage shows a share of a particular caller in the total
   amount of its parent calls.
   Callers occupying less than 2.0% are not shown.

    ticks parent name


Well blech, that's not even remotely useful.

I did this profiling without node-profiler and got the same results. Do I
have to put the actual buildDepGraph code into this test to get it to
profile correctly?


--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Ben Noordhuis at Apr 4, 2013 at 7:33 pm

    On Thu, Apr 4, 2013 at 8:07 PM, Justin Collum wrote:
    I'm using https://github.com/bnoordhuis/node-profiler to do some profiling.
    I've got a chunk of code that pulls in json from a file and performs some
    logic on the objects that get loaded. There are 1000s of objects and a
    dependency graph, so it takes a good long while. This is a stress test. The
    code looks like:
    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the json
    and builds a dep graph. It all runs fine, but when I run v8.log through the
    linux-tick-processor I get hundreds of lines that look like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted, 0
    excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do I
    have to put the actual buildDepGraph code into this test to get it to
    profile correctly?
    Does the linux-tick-processor match the version of node / V8 that
    generated the log file?

    Are you using the cluster module? If events from multiple processes
    end up in a single log file, the tick processor output will be bogus.
    Node.js master understands --logfile=%p.log, where %p is replaced with
    the process ID.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 4, 2013 at 8:54 pm
    Does the linux-tick-processor match the version of node / V8 that
    generated the log file?

    As in 64b vs 32b? I'm on Ubuntu 12, 32b. I installed v8
    from git://github.com/v8/v8.git.

    Looks like node.js is 32bit.

         arch: 'ia32',
         platform: 'linux',

    Changelog for v8 says 3.14.5.

         13:46 vmplanet@ubuntu /usr/bin/nodejs-0.10.2/deps/v8 $ cat ChangeLog
         2012-10-22: Version 3.14.5

    I'm not sure if I answered your question.
    Are you using the cluster module? No.
    On Thursday, April 4, 2013 12:33:11 PM UTC-7, Ben Noordhuis wrote:
    On Thu, Apr 4, 2013 at 8:07 PM, Justin Collum wrote:
    I'm using https://github.com/bnoordhuis/node-profiler to do some
    profiling.
    I've got a chunk of code that pulls in json from a file and performs some
    logic on the objects that get loaded. There are 1000s of objects and a
    dependency graph, so it takes a good long while. This is a stress test. The
    code looks like:
    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the json
    and builds a dep graph. It all runs fine, but when I run v8.log through the
    linux-tick-processor I get hundreds of lines that look like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted, 0
    excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do I
    have to put the actual buildDepGraph code into this test to get it to
    profile correctly?
    Does the linux-tick-processor match the version of node / V8 that
    generated the log file?

    Are you using the cluster module? If events from multiple processes
    end up in a single log file, the tick processor output will be bogus.
    Node.js master understands --logfile=%p.log, where %p is replaced with
    the process ID.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 4, 2013 at 9:32 pm
    Just to be sure I went through the whole process again:

    1. download v8 to ~/v8: https://code.google.com/p/v8/wiki/UsingGit

    2. build using `make dependencies && make ia32.release`:
    https://code.google.com/p/v8/wiki/BuildingWithGYP

    3. run the js test file

    Result:

      [Shared libraries]:
        ticks total nonlib name
       280868 96.2% 0.0% b7713000-b7714000
         177 0.1% 0.0% /lib/i386-linux-gnu/libc-2.15.so
          24 0.0% 0.0% /usr/bin/nodejs

      [JavaScript]:
        ticks total nonlib name

      [C++]:
        ticks total nonlib name
         187 0.1% 1.7% void
    v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::EvacuateObject<(v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::ObjectContents)1,
    (v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::SizeRestriction)0,
    4>(v8::internal::Map*, v8::internal::HeapObject**,
    v8::internal::HeapObject*, int)

    So it appears that it's processing the log but none of the js calls (which
    are 96.2% of the exec time) are parsed.

    On Thursday, April 4, 2013 1:54:16 PM UTC-7, Justin Collum wrote:

    Does the linux-tick-processor match the version of node / V8 that
    generated the log file?

    As in 64b vs 32b? I'm on Ubuntu 12, 32b. I installed v8 from git://
    github.com/v8/v8.git.

    Looks like node.js is 32bit.

    arch: 'ia32',
    platform: 'linux',

    Changelog for v8 says 3.14.5.

    13:46 vmplanet@ubuntu /usr/bin/nodejs-0.10.2/deps/v8 $ cat ChangeLog
    2012-10-22: Version 3.14.5

    I'm not sure if I answered your question.
    Are you using the cluster module? No.
    On Thursday, April 4, 2013 12:33:11 PM UTC-7, Ben Noordhuis wrote:
    On Thu, Apr 4, 2013 at 8:07 PM, Justin Collum wrote:
    I'm using https://github.com/bnoordhuis/node-profiler to do some
    profiling.
    I've got a chunk of code that pulls in json from a file and performs some
    logic on the objects that get loaded. There are 1000s of objects and a
    dependency graph, so it takes a good long while. This is a stress test. The
    code looks like:
    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the json
    and builds a dep graph. It all runs fine, but when I run v8.log through the
    linux-tick-processor I get hundreds of lines that look like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259
    unaccounted, 0
    excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do I
    have to put the actual buildDepGraph code into this test to get it to
    profile correctly?
    Does the linux-tick-processor match the version of node / V8 that
    generated the log file?

    Are you using the cluster module? If events from multiple processes
    end up in a single log file, the tick processor output will be bogus.
    Node.js master understands --logfile=%p.log, where %p is replaced with
    the process ID.
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 4, 2013 at 9:57 pm
    I suppose this isn't all that clear. The first set of log parser output is
    from node-profiler. The second is from v8's linux-tick-processor.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Ben Noordhuis at Apr 4, 2013 at 11:07 pm

    On Thu, Apr 4, 2013 at 11:32 PM, Justin Collum wrote:
    Just to be sure I went through the whole process again:

    1. download v8 to ~/v8: https://code.google.com/p/v8/wiki/UsingGit

    2. build using `make dependencies && make ia32.release`:
    https://code.google.com/p/v8/wiki/BuildingWithGYP

    3. run the js test file
    You don't have to download V8, it's bundled with node:

       $ make -C deps/v8 native

    (You may have to symlink gyp first.)
    Result:

    [Shared libraries]:
    ticks total nonlib name
    280868 96.2% 0.0% b7713000-b7714000
    177 0.1% 0.0% /lib/i386-linux-gnu/libc-2.15.so
    24 0.0% 0.0% /usr/bin/nodejs

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name
    187 0.1% 1.7% void
    v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::EvacuateObject<(v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::ObjectContents)1,
    (v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)1,
    (v8::internal::LoggingAndProfiling)0>::SizeRestriction)0,
    4>(v8::internal::Map*, v8::internal::HeapObject**,
    v8::internal::HeapObject*, int)

    So it appears that it's processing the log but none of the js calls (which
    are 96.2% of the exec time) are parsed.
    That's probably the vDSO (notice how it's only 4 kB of memory) which
    probably means your process was sleeping in system calls most of the
    time. Keep in mind the profiler measures wall clock time, not CPU
    time.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 8, 2013 at 5:09 pm

    You don't have to download V8, it's bundled with node:
    $ make -C deps/v8 native
    (You may have to symlink gyp first.)
    Do I have to symlink it if it shows up with `which`?

    I gave it a shot and didn't get anything productive:

    10:03 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ which gyp
    /usr/local/bin/gyp
    10:03 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ make -C deps/v8 native
    make: Entering directory `/usr/bin/nodejs-0.10.2/deps/v8'
    make: *** No rule to make target `test/cctest/cctest.gyp', needed by
    `out/Makefile.native'. Stop.
    make: Leaving directory `/usr/bin/nodejs-0.10.2/deps/v8'
    10:04 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $
    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Ben Noordhuis at Apr 8, 2013 at 6:01 pm

    On Mon, Apr 8, 2013 at 7:09 PM, Justin Collum wrote:
    You don't have to download V8, it's bundled with node:
    $ make -C deps/v8 native
    (You may have to symlink gyp first.)
    Do I have to symlink it if it shows up with `which`?

    I gave it a shot and didn't get anything productive:
    10:03 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ which gyp
    /usr/local/bin/gyp
    10:03 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ make -C deps/v8 native
    make: Entering directory `/usr/bin/nodejs-0.10.2/deps/v8'
    make: *** No rule to make target `test/cctest/cctest.gyp', needed by
    `out/Makefile.native'. Stop.
    make: Leaving directory `/usr/bin/nodejs-0.10.2/deps/v8'
    10:04 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $
    Yes, try symlinking it like this:

       $ (cd deps/v8/build && ln -s ../../../tools/gyp)

    That way you know you're building with a known-good version of gyp.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 8, 2013 at 6:12 pm
    Thanks for sticking with me. But it looks like that didn't help.

    11:09 vmplanet@ubuntu /usr/bin/nodejs-0.10.2/deps/v8/build $ ll
    total 56K
    -rw-r--r-- 1 root root 427 Mar 28 12:07 all.gyp
    -rw-r--r-- 1 root root 8.8K Mar 28 12:07 android.gypi
    -rw-r--r-- 1 root root 15K Mar 28 12:07 common.gypi
    lrwxrwxrwx 1 root root 18 Apr 8 11:04 gyp -> ../../../tools/gyp
    -rwxr-xr-x 1 root root 5.9K Mar 28 12:07 gyp_v8


    11:10 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ make -C deps/v8 native
    make: Entering directory `/usr/bin/nodejs-0.10.2/deps/v8'
    make: *** No rule to make target `test/cctest/cctest.gyp', needed by
    `out/Makefile.native'. Stop.
    make: Leaving directory `/usr/bin/nodejs-0.10.2/deps/v8'

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Ben Noordhuis at Apr 8, 2013 at 6:16 pm

    On Mon, Apr 8, 2013 at 8:12 PM, Justin Collum wrote:
    Thanks for sticking with me. But it looks like that didn't help.

    11:09 vmplanet@ubuntu /usr/bin/nodejs-0.10.2/deps/v8/build $ ll
    total 56K
    -rw-r--r-- 1 root root 427 Mar 28 12:07 all.gyp
    -rw-r--r-- 1 root root 8.8K Mar 28 12:07 android.gypi
    -rw-r--r-- 1 root root 15K Mar 28 12:07 common.gypi
    lrwxrwxrwx 1 root root 18 Apr 8 11:04 gyp -> ../../../tools/gyp
    -rwxr-xr-x 1 root root 5.9K Mar 28 12:07 gyp_v8


    11:10 vmplanet@ubuntu /usr/bin/nodejs-0.10.2 $ make -C deps/v8 native
    make: Entering directory `/usr/bin/nodejs-0.10.2/deps/v8'
    make: *** No rule to make target `test/cctest/cctest.gyp', needed by
    `out/Makefile.native'. Stop.
    make: Leaving directory `/usr/bin/nodejs-0.10.2/deps/v8'
    Strange. I just tried it on my Ubuntu 12.04 machine with 0.10.4-pre
    (i.e. the v0.10 branch from github) and it just works.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Justin Collum at Apr 8, 2013 at 9:22 pm
    Well I thought I'd give it a shot with a fresh Ubuntu 12 VM. Installed node
    using the Ubuntu instructions here:

    https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu

    First issue, you have to build node from source. If you install it
    following the instructions on joyent's wiki page (above), you wont have a
    deps directory. OK, got that fixed.

    Next issue: `$ make -C deps/v8 native` doesn't work, have to use
    ia32.release to get it to work.

    OK so I tried making that symlink, which worked and then I did this:

    vmplanet@ubuntu:/usr/local/src/node$ sudo make -C deps/v8 native
    make: Entering directory `/usr/local/src/node/deps/v8'
    make: *** No rule to make target `native'. Stop.
    make: Leaving directory `/usr/local/src/node/deps/v8'


    Nope. So I tried it with ia32.release.

    vmplanet@ubuntu:/usr/local/src/node$ sudo make -C deps/v8 ia32.release
    make: Entering directory `/usr/local/src/node/deps/v8'
    make[1]: Entering directory `/usr/local/src/node/deps/v8/out'
       CXX(target)
    /usr/local/src/node/deps/v8/out/ia32.release/obj.target/cctest/test/cctest/test-api.o
    ../test/cctest/test-api.cc: In function ‘void TestGlobalPrototype()’:

    Big ol' error stack.

    This is a completely fresh Ubuntu VM. Opened the VM, did `sudo apt-get
    upgrade` and then followed the steps above.

    I'm stumped here.

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sam Gardner at May 1, 2013 at 7:46 am
    Did either of you end up figuring this out?

    I'm running a tiny little Arch VM and having the same issue.

    Sam
    On Thursday, April 4, 2013 1:07:29 PM UTC-5, Justin Collum wrote:

    I'm using https://github.com/bnoordhuis/node-profiler to do some
    profiling. I've got a chunk of code that pulls in json from a file and
    performs some logic on the objects that get loaded. There are 1000s of
    objects and a dependency graph, so it takes a good long while. This is a
    stress test. The code looks like:

    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the json
    and builds a dep graph. It all runs fine, but when I run v8.log through the
    linux-tick-processor I get hundreds of lines that look like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted, 0
    excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do I
    have to put the actual buildDepGraph code into this test to get it to
    profile correctly?

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brock Pytlik at Apr 1, 2014 at 3:26 am
    I was able to get this working eventually though it was a pain. Here are
    the steps that worked for me:


        1. wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz ; #Download
        the src tarball for the release of node you're using
        from http://nodejs.org/dist/
        2. tar -xzvf node-v0.10.24.tar.gz
        3. git clone http://github.com/v8/v8 ; #this provides the cctest
        directory that we need later on
        4. cd v8
        5. git checkout <tag for the version of v8 you need> # I found this by
        looking at node-v0.10.24/deps/v8/ChangeLog in my case it was 3.14.5
        6. cd node-v0.10.24
        7. ./configure && make ; #build node
        8. cd deps/v8/
        9. ln -s <path to cloned v8>/test/ ; #this link provides the cctest
        directory that the build was complaining about
        10. (cd build && ln -s ../../../tools/gyp) # link in gyp as Ben
        describes above
        11. make native
        12. Run your JS program using the node you just built with the --prof
        option which will generate a v8.log file
        13. OPTIONAL: edit <path to node-v0.10.24>/deps/v8/tools/tickprocess.js
        to change TickProcessor.CALL_PROFILE_CUTOFF_PCT to something other than
        2.0%. With that default, all I got in my call graph was "syscall" (which I
        think was because what I profiled happened to be sleeping most of the time,
        but I could be wrong).
        14. D8_PATH=<path to node-v0.10.24 dir>/deps/v8/out/native/ <path to
        node-v0.10.24 dir>/deps/v8/tools/linux-tick-processor # process your v8 log

    The result wasn't perfect, I still got a few errors like this:
    Code move event for unknown code: 0x125542380620
    line 24071: unknown code state: 0x110eae38fde0

    but only a total of 5 instead of 1000's.

    Here are the problems all this works around:
    1) no tests directory in deps/v8 in the src distribution of nodejs
    2) the lack of a link for gyp in v8's build context


    After all that, I got a big text output with the call graph in it (among
    other things). I suspect there's a way to get useful visualization from it
    (something like what's in chromes developer tools), but that's a project
    for another day.

    Hope this helps someone,
    Brock

    On Tuesday, April 30, 2013 8:01:19 PM UTC-7, Sam Gardner wrote:

    Did either of you end up figuring this out?

    I'm running a tiny little Arch VM and having the same issue.

    Sam
    On Thursday, April 4, 2013 1:07:29 PM UTC-5, Justin Collum wrote:

    I'm using https://github.com/bnoordhuis/node-profiler to do some
    profiling. I've got a chunk of code that pulls in json from a file and
    performs some logic on the objects that get loaded. There are 1000s of
    objects and a dependency graph, so it takes a good long while. This is a
    stress test. The code looks like:

    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the json
    and builds a dep graph. It all runs fine, but when I run v8.log through the
    linux-tick-processor I get hundreds of lines that look like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted,
    0 excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do I
    have to put the actual buildDepGraph code into this test to get it to
    profile correctly?

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Michael Hart at Apr 2, 2014 at 4:03 am
    Do the steps you've listed produce much that's different than just using
    the sources from node?

    https://gist.github.com/mhart/5107424

    (and then run `nprof` in the same dir as your v8.log file)
    On Tuesday, 1 April 2014 14:26:51 UTC+11, Brock Pytlik wrote:

    I was able to get this working eventually though it was a pain. Here are
    the steps that worked for me:


    1. wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz ;
    #Download the src tarball for the release of node you're using from
    http://nodejs.org/dist/
    2. tar -xzvf node-v0.10.24.tar.gz
    3. git clone http://github.com/v8/v8 ; #this provides the cctest
    directory that we need later on
    4. cd v8
    5. git checkout <tag for the version of v8 you need> # I found this by
    looking at node-v0.10.24/deps/v8/ChangeLog in my case it was 3.14.5
    6. cd node-v0.10.24
    7. ./configure && make ; #build node
    8. cd deps/v8/
    9. ln -s <path to cloned v8>/test/ ; #this link provides the cctest
    directory that the build was complaining about
    10. (cd build && ln -s ../../../tools/gyp) # link in gyp as Ben
    describes above
    11. make native
    12. Run your JS program using the node you just built with the --prof
    option which will generate a v8.log file
    13. OPTIONAL: edit <path to
    node-v0.10.24>/deps/v8/tools/tickprocess.js to
    change TickProcessor.CALL_PROFILE_CUTOFF_PCT to something other than 2.0%.
    With that default, all I got in my call graph was "syscall" (which I think
    was because what I profiled happened to be sleeping most of the time, but I
    could be wrong).
    14. D8_PATH=<path to node-v0.10.24 dir>/deps/v8/out/native/ <path to
    node-v0.10.24 dir>/deps/v8/tools/linux-tick-processor # process your v8 log

    The result wasn't perfect, I still got a few errors like this:
    Code move event for unknown code: 0x125542380620
    line 24071: unknown code state: 0x110eae38fde0

    but only a total of 5 instead of 1000's.

    Here are the problems all this works around:
    1) no tests directory in deps/v8 in the src distribution of nodejs
    2) the lack of a link for gyp in v8's build context


    After all that, I got a big text output with the call graph in it (among
    other things). I suspect there's a way to get useful visualization from it
    (something like what's in chromes developer tools), but that's a project
    for another day.

    Hope this helps someone,
    Brock

    On Tuesday, April 30, 2013 8:01:19 PM UTC-7, Sam Gardner wrote:

    Did either of you end up figuring this out?

    I'm running a tiny little Arch VM and having the same issue.

    Sam
    On Thursday, April 4, 2013 1:07:29 PM UTC-5, Justin Collum wrote:

    I'm using https://github.com/bnoordhuis/node-profiler to do some
    profiling. I've got a chunk of code that pulls in json from a file and
    performs some logic on the objects that get loaded. There are 1000s of
    objects and a dependency graph, so it takes a good long while. This is a
    stress test. The code looks like:

    var profiler = require('profiler');
    profiler.resume();
    ce.buildDepGraph();
    profiler.pause();

    OK so ce.buildDepGraph is a function that loops the objects from the
    json and builds a dep graph. It all runs fine, but when I run v8.log
    through the linux-tick-processor I get hundreds of lines that look
    like:

    line 947: unknown code state: undefined

    and hundreds more like:

    Code move event for unknown code: 0x3254c6e0

    At the end, I get this:


    Statistical profiling result from v8.log, (9259 ticks, 9259 unaccounted,
    0 excluded).

    [Unknown]:
    ticks total nonlib name
    9259 100.0%

    [Shared libraries]:
    ticks total nonlib name

    [JavaScript]:
    ticks total nonlib name

    [C++]:
    ticks total nonlib name

    [GC]:
    ticks total nonlib name
    0 0.0%

    [Bottom up (heavy) profile]:
    Note: percentage shows a share of a particular caller in the total
    amount of its parent calls.
    Callers occupying less than 2.0% are not shown.

    ticks parent name


    Well blech, that's not even remotely useful.

    I did this profiling without node-profiler and got the same results. Do
    I have to put the actual buildDepGraph code into this test to get it to
    profile correctly?

    --
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedApr 4, '13 at 6:07p
activeApr 2, '14 at 4:03a
posts14
users5
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase