linux-tick-processors produces error "Code move event for unknown code"

59 views
Skip to first unread message

Danny Dorfman

unread,
May 1, 2016, 8:45:50 AM5/1/16
to v8-users
Hello there,

I have been trying to activate V8;s internal profiler by running V8::SetFlagsFromCommandLine() from my code (with "--log-timer-events" and "--prof" as parameters). The code runs, and several log files are created.
I tried processing the log files with tools/linux-tick-processor, but the script aborts with this error:

Code move event for unknown code: 0x2d6bba36c7a0
Statistical profiling result from /mydir/isolate-0x7f498c04dbc0-v8.log, (0 ticks, 0 unaccounted, 0 excluded).

Any idea what this means? The log file has a lot of lines in it, but I think the relevant segment looks like this:
...
code-move,0x2d6bba45fdc0,0x2d6bba52e080
code-move,0x2d6bba45fea0,0x2d6bba52e160
code-move,0x2d6bba36c7a0,0x2d6bba52e220
code-move,0x2d6bba36c920,0x2d6bba52e3a0
code-move,0x2d6bba36cb60,0x2d6bba52e5e0
...

I use the latest build of version 4.9.

Regards,
Danny

Ben Noordhuis

unread,
May 2, 2016, 6:47:58 AM5/2/16
to v8-users
I assume V8 is already running by the time you call SetFlagsFromCommandLine()?

The warning you see is what you get when tickprocessor.js sees ticks
in JS code that existed before the profiler was started, because those
don't have a corresponding code-creation entry in the log file.

You could try including --nocompact_code_space but YMMV; use at your own risk.

Danny Dorfman

unread,
May 2, 2016, 8:14:23 AM5/2/16
to v8-users
I tried moving SetFlagsFromCommandLine() to be the first V8 API call (before any initialization takes place), and running my application again.

After executing linux-tick-processor on the new log file, it looks like d8 is crashing after 5 seconds into its run.

# tools/linux-tick-processor /mydir/isolate-0x7f566004dbb0-v8.log
which: no d8 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/depot_tools:/usr/lib/vslick/bin:/usr/lib/jvm/java-1.7.0/bin)
tools/linux-tick-processor: line 41:  2855 Broken pipe             cat $log_file
      2856 Segmentation fault      | $d8_exec $tools_path/splaytree.js $tools_path/codemap.js $tools_path/csvparser.js $tools_path/consarray.js $tools_path/profile.js $tools_path/profile_view.js $tools_path/logreader.js $tools_path/tickprocessor.js $tools_path/SourceMap.js $tools_path/tickprocessor-driver.js -- $@ 2> /dev/null

Adding  --nocompact_code_space makes no difference. The crash is still there. Please assist.

Ben Noordhuis

unread,
May 2, 2016, 9:50:51 AM5/2/16
to v8-users
On Mon, May 2, 2016 at 2:14 PM, Danny Dorfman <wilder...@gmail.com> wrote:
> I tried moving SetFlagsFromCommandLine() to be the first V8 API call (before
> any initialization takes place), and running my application again.
>
> After executing linux-tick-processor on the new log file, it looks like d8
> is crashing after 5 seconds into its run.
>
> # tools/linux-tick-processor /mydir/isolate-0x7f566004dbb0-v8.log
> which: no d8 in
> (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/depot_tools:/usr/lib/vslick/bin:/usr/lib/jvm/java-1.7.0/bin)
> tools/linux-tick-processor: line 41: 2855 Broken pipe cat
> $log_file
> 2856 Segmentation fault | $d8_exec $tools_path/splaytree.js
> $tools_path/codemap.js $tools_path/csvparser.js $tools_path/consarray.js
> $tools_path/profile.js $tools_path/profile_view.js $tools_path/logreader.js
> $tools_path/tickprocessor.js $tools_path/SourceMap.js
> $tools_path/tickprocessor-driver.js -- $@ 2> /dev/null
>
> Adding --nocompact_code_space makes no difference. The crash is still
> there. Please assist.

Try setting the D8_PATH environment variable to the directory where d8
can be found.

Danny Dorfman

unread,
May 5, 2016, 2:44:59 AM5/5/16
to v8-users
This has no positive effect. The d8 executable still crashes after 5 seconds.

Danny Dorfman

unread,
Jul 4, 2016, 8:47:01 AM7/4/16
to v8-users
I found out what is causing the crash in d8. One of the "shared-library" lines my log file points to a very large library (157M). The line looks like this: 

shared-library,"/path/to/my/file/name.so",0x7fdf1f909000,0x7fdf23d2b000,0

Once it's removed, everything works fine. Is there a size limit?

Ben Noordhuis

unread,
Jul 4, 2016, 9:20:05 AM7/4/16
to v8-users
On Mon, Jul 4, 2016 at 2:47 PM, Danny Dorfman <wilder...@gmail.com> wrote:
> I found out what is causing the crash in d8. One of the "shared-library"
> lines my log file points to a very large library (157M). The line looks like
> this:
>
> shared-library,"/path/to/my/file/name.so",0x7fdf1f909000,0x7fdf23d2b000,0
>
> Once it's removed, everything works fine. Is there a size limit?

Effectively, yes. The tick processor parses the output of nm(1) into
a list. It sounds like it's running out of memory.
Reply all
Reply to author
Forward
0 new messages