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

Issue 3417019: Provide more functions to CPU profiler (fix issue 858). (Closed)

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

Description

Provide more functions to CPU profiler (fix issue 858). The cause for missing functions is that some of them are created from compiled code (see FastNewClosureStub), and thus not get registered in profiler's code map. My solution is to hook on GC visitor to provide JS functions addresses to profiler, only if it is enabled. BUG=858 TEST= Committed: http://code.google.com/p/v8/source/detail?r=5523

Patch Set 1 #

Patch Set 2 : Hooked on MC/MS also #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -21 lines) Patch
M src/cpu-profiler.h View 1 6 chunks +17 lines, -1 line 0 comments Download
M src/cpu-profiler.cc View 1 5 chunks +60 lines, -2 lines 2 comments Download
M src/heap.cc View 1 1 chunk +8 lines, -1 line 0 comments Download
M src/log.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/log.cc View 1 2 chunks +12 lines, -2 lines 2 comments Download
M src/mark-compact.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/profile-generator.h View 3 chunks +6 lines, -3 lines 0 comments Download
M src/profile-generator.cc View 2 chunks +11 lines, -7 lines 0 comments Download
M src/stub-cache.cc View 1 chunk +22 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
mnaganov (inactive)
10 years, 3 months ago (2010-09-23 15:17:22 UTC) #1
Vyacheslav Egorov (Chromium)
There is a change in scavenge but no changes in mark-sweep/compact. Is this intentional?
10 years, 3 months ago (2010-09-23 15:48:32 UTC) #2
mnaganov (inactive)
On 2010/09/23 15:48:32, Vyacheslav Egorov wrote: > There is a change in scavenge but no ...
10 years, 3 months ago (2010-09-23 15:56:59 UTC) #3
mnaganov (inactive)
On 2010/09/23 15:56:59, Michail Naganov wrote: > On 2010/09/23 15:48:32, Vyacheslav Egorov wrote: > > ...
10 years, 3 months ago (2010-09-23 17:03:04 UTC) #4
mnaganov (inactive)
On 2010/09/23 17:03:04, Michail Naganov wrote: > On 2010/09/23 15:56:59, Michail Naganov wrote: > > ...
10 years, 3 months ago (2010-09-24 09:47:26 UTC) #5
Søren Thygesen Gjesse
LGTM Will this only start profiling these functions after a full GC, or does the ...
10 years, 3 months ago (2010-09-24 10:20:07 UTC) #6
mnaganov (inactive)
On 2010/09/24 10:20:07, Søren Gjesse wrote: > LGTM > > Will this only start profiling ...
10 years, 3 months ago (2010-09-24 11:43:40 UTC) #7
Søren Thygesen Gjesse
10 years, 3 months ago (2010-09-24 12:01:04 UTC) #8
I missed the scavenge change in heap.cc.

On 2010/09/24 11:43:40, Michail Naganov wrote:
> On 2010/09/24 10:20:07, Søren Gjesse wrote:
> > LGTM
> > 
> > Will this only start profiling these functions after a full GC, or does the
> > processing of the events make it possible to trace the new function
backwards
> to
> > when it was created and process ticks from that point?
> > 
> 
> I hooked on scavenge, so full GC isn't required. You are right, some samples
can
> still miss a function on decoding, but this should not last for a long time,
as
> scavenges do happen frequently.
> 
> http://codereview.chromium.org/3417019/diff/6001/7001
> File src/cpu-profiler.cc (right):
> 
> http://codereview.chromium.org/3417019/diff/6001/7001#newcode431
> src/cpu-profiler.cc:431: // The same function can be reported several times.
> On 2010/09/24 10:20:07, Søren Gjesse wrote:
> > Please add a comment here that this is called during mark-compact where
> marking
> > bits might still be set.
> 
> Done.
> 
> http://codereview.chromium.org/3417019/diff/6001/7004
> File src/log.cc (right):
> 
> http://codereview.chromium.org/3417019/diff/6001/7004#newcode879
> src/log.cc:879: msg.Append(',');
> On 2010/09/24 10:20:07, Søren Gjesse wrote:
> > I think a comment here on why we use unchecked_code would be helpful.
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698