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

Issue 1828633003: [Interpreter] Enable tracing of bytecode handler dispatches. (Closed)

Created:
4 years, 9 months ago by Stefano Sanfilippo
Modified:
4 years, 8 months ago
Reviewers:
rmcilroy
CC:
v8-reviews_googlegroups.com, oth, rmcilroy, Michael Hablich
Base URL:
https://chromium.googlesource.com/v8/v8.git@count-bc
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Enable tracing of bytecode handler dispatches. When FLAG_trace_ignition_dispatches is enabled, a dispatch counter is kept for each pair of source-destination bytecode handlers. Each counter saturates at max uintptr_t value. Counters are dumped as a JSON-encoded object of objects, such that each key on the top level object is a source bytecode name, and each key on the corresponding value is a destination bytecode name, with the associated counter as value. The output file name can be controlled with the FLAG_trace_ignition_dispatches_output_file flag. The JSON file may be written by calling Interpreter::WriteDispatchCounters(), which is done for d8 in Shell::OnExit, if FLAG_trace_ignition_dispatches is enabled. BUG=v8:4899 LOG=N Committed: https://crrev.com/1e3257d27f42ee1fd81aaf97536db171e7abd7fd Cr-Commit-Position: refs/heads/master@{#35380}

Patch Set 1 : #

Patch Set 2 : Rebase on updated base patch. #

Patch Set 3 : Reword comment in i_p_h_c.py #

Patch Set 4 : Rebase on updated base patch, use uintptr instead of uint32. #

Patch Set 5 : Rebase on updated base patch. #

Patch Set 6 : Remove unused bailout reason. #

Patch Set 7 : Remove counters print from Shell::OnExit. #

Patch Set 8 : Rebase on updated base patch. #

Patch Set 9 : Rebase on master, use kPointerSizeLog2. #

Patch Set 10 : Single flag, NON DISPATCHED column, use smart pointers. #

Patch Set 11 : Get rid of kCountersTableRowSize, fix signed/unsigned on MSVC. #

Patch Set 12 : Rebase on updated base patch. #

Patch Set 13 : Minor cleanups. #

Patch Set 14 : Fix sign check on unsigned. #

Patch Set 15 : More precise terms in comment. #

Patch Set 16 : Also check cumulative (row) counters for overflows. #

Patch Set 17 : Remove cumulative counters. #

Total comments: 26

Patch Set 18 : Add option to print the top N counters. #

Patch Set 19 : Do not explicitly build the flattened counters table. #

Patch Set 20 : Renamings, drop python script for a future CL, new output format. #

Patch Set 21 : No need for a std::map #

Total comments: 9

Patch Set 22 : Review. #

Total comments: 4

Patch Set 23 : Second review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -3 lines) Patch
M src/assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -0 lines 0 comments Download
M src/d8.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +8 lines, -0 lines 0 comments Download
M src/external-reference-table.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +7 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +61 lines, -3 lines 0 comments Download
M src/interpreter/interpreter-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/interpreter/interpreter-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +39 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 72 (40 generated)
Stefano Sanfilippo
Here is the follow-up to https://codereview.chromium.org/1817033002/ (dispatch counters). PTAL.
4 years, 9 months ago (2016-03-24 14:12:21 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/320001
4 years, 8 months ago (2016-04-05 17:54:13 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win_compile_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_compile_dbg/builds/15589)
4 years, 8 months ago (2016-04-05 18:08:31 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/340001
4 years, 8 months ago (2016-04-06 09:27:03 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel_ng/builds/3850) v8_linux64_rel_ng_triggered on ...
4 years, 8 months ago (2016-04-06 10:07:25 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/360001
4 years, 8 months ago (2016-04-06 11:12:05 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-06 11:52:37 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/380001
4 years, 8 months ago (2016-04-07 09:36:45 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-07 10:01:35 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/400001
4 years, 8 months ago (2016-04-07 10:53:02 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-07 11:17:28 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/420001
4 years, 8 months ago (2016-04-07 13:59:13 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-07 14:22:55 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/440001
4 years, 8 months ago (2016-04-07 17:41:29 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-07 18:07:27 UTC) #38
rmcilroy
https://codereview.chromium.org/1828633003/diff/460001/src/assembler.h File src/assembler.h (right): https://codereview.chromium.org/1828633003/diff/460001/src/assembler.h#newcode912 src/assembler.h:912: static ExternalReference interpreter_handler_to_handler_dispatch_counters( interpreter_dispatch_counters should be fine (throughout) https://codereview.chromium.org/1828633003/diff/460001/src/d8.cc ...
4 years, 8 months ago (2016-04-08 11:24:44 UTC) #39
Stefano Sanfilippo
https://codereview.chromium.org/1828633003/diff/460001/src/assembler.h File src/assembler.h (right): https://codereview.chromium.org/1828633003/diff/460001/src/assembler.h#newcode912 src/assembler.h:912: static ExternalReference interpreter_handler_to_handler_dispatch_counters( On 2016/04/08 11:24:43, rmcilroy (Slow) wrote: ...
4 years, 8 months ago (2016-04-08 14:42:44 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/580001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/580001
4 years, 8 months ago (2016-04-08 16:24:39 UTC) #44
rmcilroy
LGTM once comments are addressed. https://codereview.chromium.org/1828633003/diff/580001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/1828633003/diff/580001/src/d8.cc#newcode1284 src/d8.cc:1284: uintptr_t* handler_to_handler_dispatch_counters = update ...
4 years, 8 months ago (2016-04-08 16:40:31 UTC) #45
Stefano Sanfilippo
All issues addressed. PT a last look. https://codereview.chromium.org/1828633003/diff/580001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/1828633003/diff/580001/src/d8.cc#newcode1284 src/d8.cc:1284: uintptr_t* handler_to_handler_dispatch_counters ...
4 years, 8 months ago (2016-04-08 17:01:05 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/600001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/600001
4 years, 8 months ago (2016-04-08 17:03:27 UTC) #48
rmcilroy
https://codereview.chromium.org/1828633003/diff/580001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/1828633003/diff/580001/src/interpreter/interpreter.cc#newcode37 src/interpreter/interpreter.cc:37: static const int kCountersTableRowSize = On 2016/04/08 17:01:05, Stefano ...
4 years, 8 months ago (2016-04-08 17:15:47 UTC) #49
Stefano Sanfilippo
https://codereview.chromium.org/1828633003/diff/600001/src/d8.cc File src/d8.cc (right): https://codereview.chromium.org/1828633003/diff/600001/src/d8.cc#newcode1281 src/d8.cc:1281: void Shell::WriteInterpreterDispatchCounters(Isolate* isolate) { On 2016/04/08 17:15:47, rmcilroy wrote: ...
4 years, 8 months ago (2016-04-08 18:10:02 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/620001
4 years, 8 months ago (2016-04-08 18:10:07 UTC) #52
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 18:34:25 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/640001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/640001
4 years, 8 months ago (2016-04-09 16:35:08 UTC) #57
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-09 17:06:13 UTC) #59
rmcilroy
LGTM, but please update the title and description to be more informative.
4 years, 8 months ago (2016-04-11 09:20:33 UTC) #60
Stefano Sanfilippo
On 2016/04/11 09:20:33, rmcilroy wrote: > LGTM, but please update the title and description to ...
4 years, 8 months ago (2016-04-11 10:01:43 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828633003/640001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828633003/640001
4 years, 8 months ago (2016-04-11 10:33:12 UTC) #68
commit-bot: I haz the power
Committed patchset #23 (id:640001)
4 years, 8 months ago (2016-04-11 11:57:42 UTC) #70
commit-bot: I haz the power
4 years, 8 months ago (2016-04-11 11:58:12 UTC) #72
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/1e3257d27f42ee1fd81aaf97536db171e7abd7fd
Cr-Commit-Position: refs/heads/master@{#35380}

Powered by Google App Engine
This is Rietveld 408576698