Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Issue 8055029: Add experimental support for tracing the state of the VM heap to a file

Created:
9 years, 2 months ago by Erik Corry
Modified:
9 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add experimental support for tracing the state of the VM heap to a file or socket.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+728 lines, -31 lines) Patch
M include/v8.h View 2 chunks +165 lines, -0 lines 0 comments Download
M src/api.cc View 1 chunk +64 lines, -0 lines 0 comments Download
M src/d8.cc View 3 chunks +32 lines, -1 line 0 comments Download
M src/execution.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/heap.h View 3 chunks +19 lines, -1 line 0 comments Download
M src/heap.cc View 7 chunks +260 lines, -2 lines 0 comments Download
M src/incremental-marking.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/mark-compact.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M src/spaces.h View 10 chunks +39 lines, -10 lines 1 comment Download
M src/spaces.cc View 11 chunks +118 lines, -17 lines 3 comments Download
M src/spaces-inl.h View 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Erik Corry
9 years, 2 months ago (2011-09-27 22:12:53 UTC) #1
Vyacheslav Egorov (Chromium)
9 years, 2 months ago (2011-09-28 15:21:11 UTC) #2
it kinda lgtm

but I would prefer that we have a nice interface for it instead of writing loops
over visualizers directly in many different places. 

To keep changes contained/isolated/compact we should just call different hooks
from different places (spaces{-inl,}.{cc,h}) without looping over visualizers
every time. Take a look at how it is done for GDBJIT or profiler.

This would guarantee that our low-level files do not depend on visualizer
internals.

http://codereview.chromium.org/8055029/diff/1/src/spaces.cc
File src/spaces.cc (right):

http://codereview.chromium.org/8055029/diff/1/src/spaces.cc#newcode447
src/spaces.cc:447: if (owner != NULL) {
Move out of the spaces.cc to some visualizer specific place and keep only a call
to this function here.

Just to keep things isolated with a small interface like we do with GDBJIT or
profiler.

http://codereview.chromium.org/8055029/diff/1/src/spaces.cc#newcode483
src/spaces.cc:483: vis != NULL;
ditto

http://codereview.chromium.org/8055029/diff/1/src/spaces.cc#newcode940
src/spaces.cc:940: !page->is_anchor();
ditto

http://codereview.chromium.org/8055029/diff/1/src/spaces.h
File src/spaces.h (right):

http://codereview.chromium.org/8055029/diff/1/src/spaces.h#newcode1361
src/spaces.h:1361: FreeListNode* get_chain(int i) {
make enum!

Powered by Google App Engine
This is Rietveld 408576698