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

Issue 159787: Add snapshot mode for heap profiling. (Closed)

Created:
11 years, 4 months ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add an ability to initiate GC through V8 API. I'm planning to use it in DevTools heap profiler. It is a common scenario in debugging memory leaks to enforce GC, then perform an operation, then enforce GC again to check for non-collected (that is, leaked) objects. Using the existing GC extension isn't possible because it doesn't exposed in the normal operation mode of Chromium. Committed: http://code.google.com/p/v8/source/detail?r=2619

Patch Set 1 #

Patch Set 2 : Reworked to hide explicit GC inside Profiler API #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -52 lines) Patch
M include/v8.h View 1 1 chunk +2 lines, -1 line 2 comments Download
M src/api.cc View 1 3 chunks +18 lines, -22 lines 2 comments Download
M src/log.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/log.cc View 2 chunks +48 lines, -23 lines 0 comments Download
M test/cctest/test-log.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
mnaganov (inactive)
11 years, 4 months ago (2009-08-03 13:49:58 UTC) #1
Søren Thygesen Gjesse
Exposing the (full) GC directly in the API is something we are trying very hard ...
11 years, 4 months ago (2009-08-03 14:06:48 UTC) #2
mnaganov (inactive)
OK, now explicit GC is hidden inside Profiling API. I also moved flag manipulation logic ...
11 years, 4 months ago (2009-08-04 13:29:16 UTC) #3
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/159787/diff/1005/4 File include/v8.h (right): http://codereview.chromium.org/159787/diff/1005/4#newcode1973 Line 1973: * kinds of heap profiling. Each can ...
11 years, 4 months ago (2009-08-04 13:44:55 UTC) #4
mnaganov (inactive)
11 years, 4 months ago (2009-08-04 14:12:38 UTC) #5
http://codereview.chromium.org/159787/diff/1005/4
File include/v8.h (right):

http://codereview.chromium.org/159787/diff/1005/4#newcode1973
Line 1973: * kinds of heap profiling. Each can be turned on / off independently.
On 2009/08/04 13:44:55, Søren Gjesse wrote:
> Please add a comment on PROFILER_MODULE_HEAP_SNAPSHOT.

Done.

http://codereview.chromium.org/159787/diff/1005/5
File src/api.cc (right):

http://codereview.chromium.org/159787/diff/1005/5#newcode3246
Line 3246: flags &= ~PROFILER_MODULE_HEAP_SNAPSHOT;
On 2009/08/04 13:44:55, Søren Gjesse wrote:
> Should PROFILER_MODULE_CPU be masked out here as well? What is the exact
> semantics of combining PROFILER_MODULE_CPU and PROFILER_MODULE_HEAP_SNAPSHOT?

Combining CPU profiling with snapshot makes no sense to me. Added masking for
it.

Powered by Google App Engine
This is Rietveld 408576698