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

Issue 1993653003: Initial support for emitting unwinding information in perf jitdump. (Closed)

Created:
4 years, 7 months ago by Stefano Sanfilippo
Modified:
4 years, 5 months ago
Reviewers:
titzer, Jarin, rmcilroy, ahaas, bradn
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-x87-ports_googlegroups.com, v8-ppc-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

This commit is the first step towards emitting unwinding information in the .eh_frame format as part of the jitdump generated when FLAG_perf_prof is enabled. The final goal is allowing precise unwinding of callchains that include JITted code when profiling V8 using perf. Unwinding information is stored in the body of code objects after the code itself, prefixed with its length and aligned to a 8-byte boundary. A boolean flag in the header signals its presence, resulting in zero memory overhead when the generation of unwinding info is disabled or no such information was attached to the code object. A new jitdump record type (with id 4) is introduced for specifying optional unwinding information for code load records. The EhFrameHdr struct is also introduced, together with a constructor to initialise it from the associated code object. At this stage no unwinding information is written to the jitdump, but the infrastructure for doing so is ready in place. BUG=v8:4899 LOG=N Committed: https://crrev.com/7d073b03c710b34f001fedd074f0ec9fbbaa5623 Cr-Commit-Position: refs/heads/master@{#37296}

Patch Set 1 : #

Patch Set 2 : Rebase. #

Patch Set 3 : Cleanup. #

Patch Set 4 : Rebase. #

Total comments: 38

Patch Set 5 : Review. #

Patch Set 6 : Fix missed header rename. #

Patch Set 7 : Rebase. #

Patch Set 8 : Turn kSizeOfCIE into EhFrameHdr::kCIESize. #

Patch Set 9 : Format fixes. #

Patch Set 10 : Fix imprecision in diagram . #

Total comments: 14

Patch Set 11 : Second review. #

Patch Set 12 : Reword comment under diagram. #

Patch Set 13 : Third review. #

Patch Set 14 : Enable with --perf-prof-unwinding-info. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+528 lines, -12 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/assembler-arm.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm64/assembler-arm64.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A src/eh-frame.h View 1 2 3 4 5 6 7 1 chunk +41 lines, -0 lines 0 comments Download
A src/eh-frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +96 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -2 lines 0 comments Download
M src/flag-definitions.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/globals.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/mips/assembler-mips.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/mips64/assembler-mips64.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 4 chunks +52 lines, -4 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 3 chunks +40 lines, -2 lines 0 comments Download
M src/perf-jit.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/perf-jit.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +58 lines, -1 line 0 comments Download
M src/ppc/assembler-ppc.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/s390/assembler-s390.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/x64/assembler-x64.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/x87/assembler-x87.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M test/cctest/BUILD.gn View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M test/cctest/cctest.gyp View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M test/cctest/test-code-cache.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A test/cctest/test-code-layout.cc View 1 2 3 4 1 chunk +84 lines, -0 lines 0 comments Download
A test/cctest/test-eh-frame-hdr.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +100 lines, -0 lines 0 comments Download
M test/cctest/test-reloc-info.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 162 (104 generated)
rmcilroy
Some high-level drive-by comments. https://codereview.chromium.org/1993653003/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1993653003/diff/1/src/objects.cc#newcode13076 src/objects.cc:13076: // Pad to 2**3 boundary ...
4 years, 7 months ago (2016-05-18 11:26:58 UTC) #2
Stefano Sanfilippo
On 2016/05/18 11:26:58, rmcilroy wrote: > Some high-level drive-by comments. > > https://codereview.chromium.org/1993653003/diff/20001/src/objects.cc > File ...
4 years, 7 months ago (2016-05-18 11:38:07 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/40001
4 years, 7 months ago (2016-05-18 14:51:43 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win_nosnap_shared_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_nosnap_shared_rel_ng/builds/1856) v8_win_rel_ng on ...
4 years, 7 months ago (2016-05-18 15:00:51 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/80001
4 years, 7 months ago (2016-05-18 15:46:25 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/7336)
4 years, 7 months ago (2016-05-18 15:50:57 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/100001
4 years, 7 months ago (2016-05-18 16:59:28 UTC) #18
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/17622) v8_win_nosnap_shared_rel_ng on ...
4 years, 7 months ago (2016-05-18 17:03:25 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/120001
4 years, 7 months ago (2016-05-18 17:04:43 UTC) #22
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-18 17:35:32 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/160001
4 years, 7 months ago (2016-05-19 11:39:14 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/1856) v8_linux64_rel_ng on ...
4 years, 7 months ago (2016-05-19 11:42:44 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/1993653003/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/250001
4 years, 7 months ago (2016-05-19 13:35:26 UTC) #37
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/5993) v8_linux_arm_rel_ng on ...
4 years, 7 months ago (2016-05-19 13:38:37 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/270001
4 years, 7 months ago (2016-05-19 14:05:33 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-19 14:38:55 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/290001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/290001
4 years, 7 months ago (2016-05-19 14:51:29 UTC) #47
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/1879) v8_linux64_rel_ng on ...
4 years, 7 months ago (2016-05-19 14:52:57 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/310001
4 years, 7 months ago (2016-05-19 15:00:44 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/1993653003/370001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/370001
4 years, 7 months ago (2016-05-23 13:03:20 UTC) #54
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/7598)
4 years, 7 months ago (2016-05-23 13:07:29 UTC) #56
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/390001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/390001
4 years, 7 months ago (2016-05-23 13:14:28 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/450001
4 years, 7 months ago (2016-05-23 14:04:19 UTC) #60
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-23 14:38:34 UTC) #62
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/530001
4 years, 7 months ago (2016-05-26 15:16:41 UTC) #65
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_rel/builds/15084) v8_linux_mipsel_compile_rel on ...
4 years, 7 months ago (2016-05-26 15:19:54 UTC) #67
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/550001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/550001
4 years, 7 months ago (2016-05-26 15:24:02 UTC) #70
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel_ng/builds/2216) v8_linux_arm_rel_ng on ...
4 years, 7 months ago (2016-05-26 15:25:53 UTC) #72
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/570001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/570001
4 years, 7 months ago (2016-05-26 15:43:11 UTC) #75
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/18069) v8_win_rel_ng on ...
4 years, 7 months ago (2016-05-26 15:46:02 UTC) #77
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/610001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/610001
4 years, 7 months ago (2016-05-26 16:04:14 UTC) #91
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/2242) v8_linux64_rel_ng on ...
4 years, 7 months ago (2016-05-26 16:08:05 UTC) #93
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/630001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993653003/630001
4 years, 6 months ago (2016-05-26 19:13:26 UTC) #102
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-26 19:51:58 UTC) #104
commit-bot: I haz the power
Dry run: None
4 years, 6 months ago (2016-05-26 19:52:03 UTC) #105
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/740001
4 years, 6 months ago (2016-06-20 18:15:23 UTC) #109
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-20 18:46:07 UTC) #111
Stefano Sanfilippo
jarin@ PTAL to the jitdump part, especially to confirm whether it fits with what is ...
4 years, 6 months ago (2016-06-21 10:46:15 UTC) #115
rmcilroy
First pass of comments. https://codereview.chromium.org/1993653003/diff/740001/src/factory.cc File src/factory.cc (right): https://codereview.chromium.org/1993653003/diff/740001/src/factory.cc#newcode1430 src/factory.cc:1430: int unpadded_body_size = desc.unwinding_info_size > ...
4 years, 6 months ago (2016-06-21 13:47:44 UTC) #117
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/760001
4 years, 6 months ago (2016-06-21 17:01:17 UTC) #119
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-21 17:30:15 UTC) #121
Stefano Sanfilippo
https://codereview.chromium.org/1993653003/diff/740001/src/factory.cc File src/factory.cc (right): https://codereview.chromium.org/1993653003/diff/740001/src/factory.cc#newcode1430 src/factory.cc:1430: int unpadded_body_size = desc.unwinding_info_size > 0 On 2016/06/21 13:47:43, ...
4 years, 6 months ago (2016-06-23 15:23:44 UTC) #131
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993653003/960001
4 years, 6 months ago (2016-06-23 15:43:32 UTC) #134
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-23 16:11:34 UTC) #137
rmcilroy
LGTM, thanks Stefano. Jaro, could you also take a look please? https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc File src/eh-frame.cc (right): ...
4 years, 6 months ago (2016-06-24 09:45:26 UTC) #140
Stefano Sanfilippo
https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc File src/eh-frame.cc (right): https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc#newcode61 src/eh-frame.cc:61: // which means we don't need to know the ...
4 years, 6 months ago (2016-06-24 10:36:37 UTC) #141
Jarin
On 2016/06/24 10:36:37, Stefano Sanfilippo wrote: > https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc > File src/eh-frame.cc (right): > > https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc#newcode61 ...
4 years, 6 months ago (2016-06-24 12:02:14 UTC) #142
rmcilroy
https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc File src/eh-frame.cc (right): https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc#newcode76 src/eh-frame.cc:76: offset_to_eh_frame_ = -(eh_frame_size + 4); // A -> D ...
4 years, 6 months ago (2016-06-24 12:55:25 UTC) #144
Stefano Sanfilippo
https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc File src/eh-frame.cc (right): https://codereview.chromium.org/1993653003/diff/1060001/src/eh-frame.cc#newcode76 src/eh-frame.cc:76: offset_to_eh_frame_ = -(eh_frame_size + 4); // A -> D ...
4 years, 6 months ago (2016-06-24 13:17:29 UTC) #145
Stefano Sanfilippo
On 2016/06/24 12:02:14, Jarin wrote: > lgtm. (Since this is not under a flag, could ...
4 years, 6 months ago (2016-06-24 13:30:31 UTC) #146
Stefano Sanfilippo
@ahaas could you please take a look at src/wasm/wasm-module.cc?
4 years, 6 months ago (2016-06-24 13:59:22 UTC) #148
Jarin
On 2016/06/24 13:30:31, Stefano Sanfilippo wrote: > On 2016/06/24 12:02:14, Jarin wrote: > > lgtm. ...
4 years, 6 months ago (2016-06-24 14:33:38 UTC) #149
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1993653003/1150001
4 years, 6 months ago (2016-06-24 15:03:24 UTC) #151
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-24 15:34:24 UTC) #153
ahaas
On 2016/06/24 at 15:34:24, commit-bot wrote: > Dry run: This issue passed the CQ dry ...
4 years, 5 months ago (2016-06-27 14:21:04 UTC) #155
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1993653003/1150001
4 years, 5 months ago (2016-06-27 14:37:11 UTC) #158
commit-bot: I haz the power
Committed patchset #14 (id:1150001)
4 years, 5 months ago (2016-06-27 15:06:44 UTC) #160
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 15:11:01 UTC) #162
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/7d073b03c710b34f001fedd074f0ec9fbbaa5623
Cr-Commit-Position: refs/heads/master@{#37296}

Powered by Google App Engine
This is Rietveld 408576698