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

Issue 1010233002: Make counter and histogram related callbacks part of the Isolate::CreateParams. (Closed)

Created:
5 years, 9 months ago by Vyacheslav Egorov (Google)
Modified:
5 years, 9 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev, Paweł Hajdan Jr., Sven Panne
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Make counter and histogram related callbacks part of the Isolate::CreateParams. Some native counters (e.g. KeyedLoadGenericSlow) are referenced from stubs that are generated very early in the Isolate lifecycle before v8::Isolate::New returns. Thus counter lookup callback also needs to be installed early prior to v8::internal::Isolate::Init call. Otherwise assembler will just assume that the counter is not enabled and produce no code from IncrementCounter - because address of the counter is not yet available. Histogram related callbacks are moved for consistency to make them able to collect samples which occur at isolate initialization time. BUG= Committed: https://crrev.com/0e024449b8322f99534c1901ac6acc6611ddcb1d Cr-Commit-Position: refs/heads/master@{#27262}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -7 lines) Patch
M include/v8.h View 2 chunks +22 lines, -1 line 0 comments Download
M src/api.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M src/d8.cc View 2 chunks +7 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Vyacheslav Egorov (Google)
Please take a look. I was trying to use counters to debug a performance issue ...
5 years, 9 months ago (2015-03-17 16:38:32 UTC) #2
Jakob Kummerow
+Sven: FYI, API-compatible v8.h change This patch LGTM. What's the plan for the old Isolate::SetCounterFunction() ...
5 years, 9 months ago (2015-03-18 09:43:51 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010233002/1
5 years, 9 months ago (2015-03-18 09:45:56 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 9 months ago (2015-03-18 10:14:55 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/0e024449b8322f99534c1901ac6acc6611ddcb1d Cr-Commit-Position: refs/heads/master@{#27262}
5 years, 9 months ago (2015-03-18 10:15:11 UTC) #7
bnoordhuis
5 years, 9 months ago (2015-03-18 12:10:03 UTC) #8
Message was sent while issue was closed.
On 2015/03/18 09:43:51, Jakob wrote:
> +Sven: FYI, API-compatible v8.h change
> 
> This patch LGTM.
> 
> What's the plan for the old Isolate::SetCounterFunction() and friends? Keep
> them, or deprecate them? Do we know of any embedders other than d8 that use
> them?

We (StrongLoop) use them in our strong-agent product, mostly for quick sanity
checks when customers report issues to us.

I'd be kind of sad to see the counter and histogram functions go because
strong-agent cannot influence the creation of the isolate, it's loaded by io.js
/ node.js at a time when the isolate already exists.  (And yes, I know some
counters don't work or are unreliable at that point but that's not a problem for
what we use them for.)

Powered by Google App Engine
This is Rietveld 408576698