process-heap-prof outdated?

81 views
Skip to first unread message

LDS

unread,
Jan 31, 2012, 1:57:01 PM1/31/12
to v8-users
To the best of my knowledge, this line in process-heap-prof:

if row[0] == 'heap-sample-begin' and row[1] == 'Heap':

won't parse correctly the v8.log output generated with --log_all
option as it seems that v8 won't output Heap (when did that happen?)

Was "Heap" replaced with "NewSpace"? Please advise.

Thanks,

LdS

Mikhail Naganov

unread,
Feb 1, 2012, 5:29:44 AM2/1/12
to v8-u...@googlegroups.com
Hi LDS,

You are absolutely correct. The change happened around the Isolates
branch merge. Actually, this script isn't actively used. Previously,
it was intended to be used with "--log_gc" flag.

> --
> v8-users mailing list
> v8-u...@googlegroups.com
> http://groups.google.com/group/v8-users

LDS

unread,
Feb 2, 2012, 3:06:34 PM2/2/12
to v8-users
Thanks Mikhail. And that's exactly how I intended to using it when I
found out the problem :-)

Now, if you don't mind sharing: how do you go about logging gc (which
is done already using the param --log_gc) and most importantly
analyzing the log dumps?

Thanks again for your help.

Mikhail Naganov

unread,
Feb 2, 2012, 4:34:46 PM2/2/12
to v8-u...@googlegroups.com
For what purpose do you want to log gc? If you are interested in
measuring how GC impacts your application in terms of time delays, and
want to see basic heap statistics, please consider using the
--trace_gc* family of flags (I'm not sure if all of them are
accessible in release builds, perhaps you'll need a debug build for
some of them).

If you want to investigate what comprises your heap in details, I
would advice you either to use heap profiler from Chrome Developer
Tools (tip: run canary or dev channel version of Chrome -- DevTools
evolve pretty fast), or Node inspector for node.js.

The reason why you can no more use log_gc out of the box is that after
the new GC algorithm was introduced in V8, heap is no more iterable at
arbitrary moments -- you need to perform a special round of GC for
that, so logging heap statistics continuously will require some
tweaking. I'm not saying it's impossible, but perhaps you can achieve
your goals without messing with this outdated logging feature.

Camilo Aguilar

unread,
May 3, 2012, 5:37:31 PM5/3/12
to v8-u...@googlegroups.com
fwiw, you can also check this tool if you are using nodejs: https://groups.google.com/forum/?fromgroups#!topic/nodejs/V3QRIjfwrC8
Reply all
Reply to author
Forward
0 new messages