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

Issue 402100: Add logging of callbacks in prof-lazy mode. (Closed)

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

Description

Add logging of callbacks in prof-lazy mode. This is needed to show calls to DOM in CPU profiles. I can think of a better approach like adding specific functions into V8 API for explicitly providing callback names and modifying bindings codegen appropriately. My plan is as follows: - submit this CL; - implement anything I need to process log data and display DOM calls in profiles; - think again about adding specific functions and modifying bindings codegen. BUG=http://code.google.com/p/chromium/issues/detail?id=27613 Committed: http://code.google.com/p/v8/source/detail?r=3340

Patch Set 1 #

Patch Set 2 : Fix lint error #

Total comments: 16

Patch Set 3 : Comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -1 line) Patch
M src/log.h View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M src/log.cc View 1 2 4 chunks +83 lines, -0 lines 0 comments Download
M test/cctest/test-log.cc View 1 2 2 chunks +61 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
mnaganov (inactive)
11 years, 1 month ago (2009-11-19 22:20:02 UTC) #1
Søren Thygesen Gjesse
LGTM, however we need to iterate on this to make it more general. As far ...
11 years, 1 month ago (2009-11-20 08:04:02 UTC) #2
mnaganov (inactive)
11 years, 1 month ago (2009-11-20 08:46:27 UTC) #3
Thanks!

Your point about dynamic updates of callback entries is really good, I forgot
about it.

http://codereview.chromium.org/402100/diff/1001/2001
File src/log.cc (right):

http://codereview.chromium.org/402100/diff/1001/2001#newcode650
Line 650: // TODO(mnaganov): Don't use a bogus size.
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> Please file a bug and change this to TODO(bugnumber).

Just removing comment and settings this to zero.

http://codereview.chromium.org/402100/diff/1001/2001#newcode1239
Line 1239: void VisitFTI(Object* o) {
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> Looks as if this has some assumptions to how the object model has been build.
It
> is OK for now, but it needs to be more general, perhaps with information from
> the embedding application on how to name the callback functions.

Yes, this is what I'm talking about in CL description. Currently I just looked
at how Chromium bindings fill this information. I haven't yet grasped a full
understanding on how the whole interaction between an application and VM is
supposed to be, so this solution is temporary. After I'll implement needed
pieces to use callbacks info and to display their entries in profiles, I'll
return back to the entry points info discovering problem.

http://codereview.chromium.org/402100/diff/1001/2001#newcode1257
Line 1257: // Properties are triples: [property name, entry point, attributes].
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> No mentioning of Chromium.

Right. This is actually about how Temlate::Set works.

http://codereview.chromium.org/402100/diff/1001/2002
File src/log.h (right):

http://codereview.chromium.org/402100/diff/1001/2002#newcode117
Line 117: V(BOUND_TAG,                      "Bound",                  "bo")     
 \
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> I don't see why this is called bound object. A more natural name would be just
> callback.

Done.

http://codereview.chromium.org/402100/diff/1001/2002#newcode204
Line 204: // Emits a code event for a callback of a bound object.
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> "callback of a bound object" -> "callback function"

Done.

http://codereview.chromium.org/402100/diff/1001/2002#newcode205
Line 205: static void BoundObjectCallbackEvent(const char* class_name,
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> Just CallbackEvent or CallbackFunctionEvent.

Done. "CallbackEvent"

http://codereview.chromium.org/402100/diff/1001/2002#newcode275
Line 275: // Used for logging Chromium bindings callback entry points
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> Please don't mention Chromium in the V8 code. This is really not Chromium
> specific.

Done.

http://codereview.chromium.org/402100/diff/1001/2002#newcode278
Line 278: static void LogChromiumBindingsCallbacks();
On 2009/11/20 08:04:02, Søren Gjesse wrote:
> LogChromiumBindingsCallbacks -> LogCallbackFunctions

I think "LogCallbacks" will be enough and is consistent with "CallbackEvent".

Powered by Google App Engine
This is Rietveld 408576698