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

Issue 16286016: Notify CPU profiler when calling native getters (Closed)

Created:
7 years, 6 months ago by yurys
Modified:
7 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Notify CPU profiler when calling native getters This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case. BUG=244580 R=dcarney@chromium.org, loislo@chromium.org, svenpanne@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=15116

Patch Set 1 #

Patch Set 2 : Added ia32 #

Patch Set 3 : Added ARM support #

Patch Set 4 : MIPS support #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Total comments: 2

Patch Set 7 : Moved new functions from ic to api and reverted assembler changes #

Patch Set 8 : reverted src/assembler.* changes (now for real) #

Patch Set 9 : Check if profiler is enabled in generated code (x64-only) #

Patch Set 10 : added is_profiling check on ia32,arm,mips #

Patch Set 11 : Use separate ExternalReference types for the new functions #

Patch Set 12 : code formatting #

Patch Set 13 : WIP: do the branching in CallApiFunction #

Patch Set 14 : Moved is_profiling check to GenerateApiCallAndReturn as suggested #

Patch Set 15 : Updated test-api #

Patch Set 16 : Check external_callback in test-api #

Total comments: 8

Patch Set 17 : bool is_profiling = (i > 0); #

Patch Set 18 : Removed check that pthread_kill always succeeds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+591 lines, -136 lines) Patch
M src/api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +18 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +51 lines, -0 lines 0 comments Download
M src/arm/code-stubs-arm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -7 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +24 lines, -1 line 0 comments Download
M src/arm/simulator-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +63 lines, -2 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +29 lines, -1 line 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +19 lines, -1 line 0 comments Download
M src/cpu-profiler.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +20 lines, -0 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +26 lines, -7 lines 0 comments Download
M src/mips/code-stubs-mips.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -7 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +23 lines, -1 line 0 comments Download
M src/mips/simulator-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +55 lines, -0 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +32 lines, -1 line 0 comments Download
M src/sampler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -3 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +22 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +18 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 26 chunks +174 lines, -96 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 2 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
yurys
7 years, 6 months ago (2013-06-05 15:37:22 UTC) #1
yurys
As discussed with Took off the bug it could make sense to change InvokeAccessorGetter/InvokeAccessorGetterCallback signatures ...
7 years, 6 months ago (2013-06-05 15:51:28 UTC) #2
yurys
7 years, 6 months ago (2013-06-05 16:07:06 UTC) #3
loislo
lgtm https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc File src/arm/stub-cache-arm.cc (right): https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc#newcode1459 src/arm/stub-cache-arm.cc:1459: __ mov(r2, Operand(reinterpret_cast<int32_t>(getter_address))); nit: As a newbie for ...
7 years, 6 months ago (2013-06-06 06:20:12 UTC) #4
yurys
https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc File src/arm/stub-cache-arm.cc (right): https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc#newcode1459 src/arm/stub-cache-arm.cc:1459: __ mov(r2, Operand(reinterpret_cast<int32_t>(getter_address))); On 2013/06/06 06:20:12, loislo wrote: > ...
7 years, 6 months ago (2013-06-06 06:35:59 UTC) #5
loislo
On 2013/06/06 06:35:59, Yury Semikhatsky wrote: > https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc > File src/arm/stub-cache-arm.cc (right): > > https://codereview.chromium.org/16286016/diff/8015/src/arm/stub-cache-arm.cc#newcode1459 ...
7 years, 6 months ago (2013-06-06 06:58:49 UTC) #6
dcarney
lgtm I think you want to run the blink dromeao and bindings perf tests before ...
7 years, 6 months ago (2013-06-06 07:20:00 UTC) #7
danno
Although I am not an API expert, the use of public instead of internal types ...
7 years, 6 months ago (2013-06-06 09:20:12 UTC) #8
dcarney
On 2013/06/06 09:20:12, danno wrote: > Although I am not an API expert, the use ...
7 years, 6 months ago (2013-06-06 09:24:33 UTC) #9
danno
Then is this not a more fundamental problem with how PropertyCallbackInfo and AccessorInfo are declared. ...
7 years, 6 months ago (2013-06-06 09:30:57 UTC) #10
dcarney
On 2013/06/06 09:30:57, danno wrote: > Then is this not a more fundamental problem with ...
7 years, 6 months ago (2013-06-06 09:33:13 UTC) #11
yurys
On Thu, Jun 6, 2013 at 1:33 PM, Sven Panne <svenpanne@chromium.org> wrote: > On Thu, ...
7 years, 6 months ago (2013-06-06 10:08:39 UTC) #12
yurys
On 2013/06/06 09:30:57, danno wrote: > Then is this not a more fundamental problem with ...
7 years, 6 months ago (2013-06-06 10:31:39 UTC) #13
yurys
Dromaeo test results: http://dromaeo.com/?id=196536,196546 - diff 196536 - run without the patch 196546 - run ...
7 years, 6 months ago (2013-06-06 11:12:06 UTC) #14
danno
I assume (hope?) the extra overhead is only in the case when the profiler is ...
7 years, 6 months ago (2013-06-06 13:39:43 UTC) #15
yurys
On 2013/06/06 13:39:43, danno wrote: > I assume (hope?) the extra overhead is only in ...
7 years, 6 months ago (2013-06-06 13:52:39 UTC) #16
yurys
Currently there is 2-3% regression on dom_attr Dromaeo test which is most sensitive to the ...
7 years, 6 months ago (2013-06-06 14:06:08 UTC) #17
danno
I agree with Sven here. We've been working very hard at making the JS/C++ transitions ...
7 years, 6 months ago (2013-06-06 14:35:59 UTC) #18
yurys
On Thu, Jun 6, 2013 at 6:16 PM, Sven Panne <svenpanne@chromium.org> wrote: > I don't ...
7 years, 6 months ago (2013-06-06 14:44:02 UTC) #19
yurys
On Thu, Jun 6, 2013 at 6:50 PM, Yang Guo <yangguo@chromium.org> wrote: > FYI we ...
7 years, 6 months ago (2013-06-07 09:23:28 UTC) #20
yurys
So I disabled CPU throttling as Dan suggested and ran full Dromaeo DOM Core test ...
7 years, 6 months ago (2013-06-07 13:29:32 UTC) #21
yurys
The approach when we check if profiler is active in the generated code should have ...
7 years, 6 months ago (2013-06-10 22:00:09 UTC) #22
dcarney
On 2013/06/10 22:00:09, Yury Semikhatsky wrote: > The approach when we check if profiler is ...
7 years, 6 months ago (2013-06-11 07:20:41 UTC) #23
dcarney
On 2013/06/11 07:20:41, dcarney wrote: > On 2013/06/10 22:00:09, Yury Semikhatsky wrote: > > The ...
7 years, 6 months ago (2013-06-11 07:33:01 UTC) #24
dcarney
I looked over it more, and it seems like you could move the entirety of ...
7 years, 6 months ago (2013-06-11 07:36:20 UTC) #25
yurys
On 2013/06/11 07:36:20, dcarney wrote: > I looked over it more, and it seems like ...
7 years, 6 months ago (2013-06-11 08:17:23 UTC) #26
yurys
On 2013/06/11 07:20:41, dcarney wrote: > On 2013/06/10 22:00:09, Yury Semikhatsky wrote: > > The ...
7 years, 6 months ago (2013-06-12 12:53:06 UTC) #27
dcarney
lgtm you need to trigger all the cases in tests. specifically, two tests, test-api/FunctionTemplate and ...
7 years, 6 months ago (2013-06-13 06:38:13 UTC) #28
yurys
On 2013/06/13 06:38:13, dcarney wrote: > lgtm > > you need to trigger all the ...
7 years, 6 months ago (2013-06-13 08:57:19 UTC) #29
dcarney
https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc#newcode999 test/cctest/test-api.cc:999: for (int i = 0; i < 2; i++) ...
7 years, 6 months ago (2013-06-13 09:10:11 UTC) #30
Sven Panne
LGTM with 2 style nits when Dan's feedback is addressed. https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc#newcode1000 ...
7 years, 6 months ago (2013-06-13 09:14:00 UTC) #31
yurys
https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc#newcode999 test/cctest/test-api.cc:999: for (int i = 0; i < 2; i++) ...
7 years, 6 months ago (2013-06-13 09:16:20 UTC) #32
yurys
https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://chromiumcodereview.appspot.com/16286016/diff/68001/test/cctest/test-api.cc#newcode1000 test/cctest/test-api.cc:1000: bool is_profiling = i; On 2013/06/13 09:14:00, Sven Panne ...
7 years, 6 months ago (2013-06-13 09:19:14 UTC) #33
yurys
7 years, 6 months ago (2013-06-13 13:46:55 UTC) #34
Message was sent while issue was closed.
Committed patchset #18 manually as r15116 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698