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

Issue 2869073002: Adding PE TimeStamp to chrome trace to ease retrieving debug information (Closed)

Created:
3 years, 7 months ago by etienneb
Modified:
3 years, 6 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org, chrisha, erikchen
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding PE TimeStamp to chrome trace to ease retrieving debug information On windows, symbols servers can be queried to retrieve debug information. The code identifier is used as a key to retrieve the exact executable. Current chrome memory dump contains the loaded module and their loaded addresses. example: {"bs":{"pc":"0","pd":"0","pss":"0","sc":"0","sd":"0","sw":"0"},"mf":"C:\\Windows\\system32\\powrprof.dll","pf":0,"sa":"7ffdae7a0000","sz":"4b000"}, But to uniquely identify them and being able to retrieve debug information from symbols servers, the TimeStamp present in PE header is required. This patch is adding the "ts" (TimeStamp) field. {"bs":{"pc":"0","pd":"0","pss":"0","sc":"0","sd":"0","sw":"0"},"mf":"C:\\Windows\\SYSTEM32\\ntdll.dll","pf":0,"sa":"7ffdb2170000","sz":"1c1000","ts":"580ee321"}, From these information one can query MS/Google symbols servers. https://msdl.microsoft.com/download/symbols/ntdll.dll/580EE3211C1000/ntdll.dl_ basename / code-ident /dll The code-identifier is built from the timestamp AND the size of the executable CC=chrisha@chromium.org, erikchen@chromium.org R=primiano@chromium.org BUG=719969 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2869073002 Cr-Commit-Position: refs/heads/master@{#475930} Committed: https://chromium.googlesource.com/chromium/src/+/a81e171d89732c62f3e8d1846ea685baa87ecd6f

Patch Set 1 #

Total comments: 6

Patch Set 2 : primiano + cl format #

Total comments: 2

Patch Set 3 : nit #

Patch Set 4 : fix components build #

Total comments: 2

Patch Set 5 : fix components build #

Patch Set 6 : nit #

Patch Set 7 : format #

Patch Set 8 : nits #

Patch Set 9 : nits #

Patch Set 10 : dcheng comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -4 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download
M base/trace_event/process_memory_maps.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/trace_event/process_memory_maps.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M base/win/BUILD.gn View 1 2 3 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M components/tracing/BUILD.gn View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M components/tracing/common/process_metrics_memory_dump_provider.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (46 generated)
etienneb
PTAL
3 years, 7 months ago (2017-05-09 15:55:44 UTC) #1
Primiano Tucci (use gerrit)
I am sympathetic with the goal, if that is the best way to fetch symbols. ...
3 years, 7 months ago (2017-05-09 16:34:01 UTC) #2
etienneb
PTAnL This line: pe_image.GetNTHeaders()->FileHeader.TimeDateStamp; Should result in offset computation only: typedef struct _IMAGE_NT_HEADERS { DWORD ...
3 years, 7 months ago (2017-05-09 17:39:31 UTC) #3
Primiano Tucci (use gerrit)
LGTM with 1 small comment addressed. https://codereview.chromium.org/2869073002/diff/20001/components/tracing/common/process_metrics_memory_dump_provider.cc File components/tracing/common/process_metrics_memory_dump_provider.cc (right): https://codereview.chromium.org/2869073002/diff/20001/components/tracing/common/process_metrics_memory_dump_provider.cc#newcode28 components/tracing/common/process_metrics_memory_dump_provider.cc:28: #include "base/win/pe_image.h" there ...
3 years, 7 months ago (2017-05-09 17:46:12 UTC) #4
etienneb
fixed https://codereview.chromium.org/2869073002/diff/20001/components/tracing/common/process_metrics_memory_dump_provider.cc File components/tracing/common/process_metrics_memory_dump_provider.cc (right): https://codereview.chromium.org/2869073002/diff/20001/components/tracing/common/process_metrics_memory_dump_provider.cc#newcode28 components/tracing/common/process_metrics_memory_dump_provider.cc:28: #include "base/win/pe_image.h" On 2017/05/09 17:46:12, Primiano Tucci wrote: ...
3 years, 7 months ago (2017-05-09 18:12:54 UTC) #5
etienneb
landing...
3 years, 7 months ago (2017-05-09 18:13:22 UTC) #6
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/2869073002/40001
3 years, 7 months ago (2017-05-09 18:14:40 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/224463)
3 years, 7 months ago (2017-05-09 19:04:44 UTC) #11
etienneb
The CL as-is is not working with the component build. is_clang = true is_asan = ...
3 years, 7 months ago (2017-05-11 14:52:28 UTC) #12
chrisha
The actual offset calculation is very trivial and there's no explicit need to pass through ...
3 years, 7 months ago (2017-05-11 15:09:46 UTC) #13
etienneb
An alternative would be to call: GetTimestampForLoadedLibrary see https://msdn.microsoft.com/en-us/library/windows/desktop/ms680142(v=vs.85).aspx This implies a dependency to dbghelp ...
3 years, 7 months ago (2017-05-11 15:16:46 UTC) #14
dcheng
https://codereview.chromium.org/2869073002/diff/60001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/2869073002/diff/60001/base/BUILD.gn#newcode1666 base/BUILD.gn:1666: deps = [ "//base/win:pe_image" ] The deps line looks ...
3 years, 7 months ago (2017-05-11 20:31:20 UTC) #21
etienneb
dcheng, PTAnL. I needed to change deps to public_deps to make it work. Is that ...
3 years, 6 months ago (2017-05-29 20:25:54 UTC) #48
jschuh
I'm still not entirely up to speed on GN. Scott, could you take a look ...
3 years, 6 months ago (2017-05-30 16:53:42 UTC) #54
scottmg
public_deps is OK. That just means that things that depend on base_static are allowed to ...
3 years, 6 months ago (2017-05-30 16:59:29 UTC) #55
dcheng
lgtm
3 years, 6 months ago (2017-05-30 17:04:48 UTC) #56
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/2869073002/180001
3 years, 6 months ago (2017-05-30 21:08:33 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/226565)
3 years, 6 months ago (2017-05-30 22:45:34 UTC) #61
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/2869073002/180001
3 years, 6 months ago (2017-05-31 15:15:28 UTC) #63
commit-bot: I haz the power
3 years, 6 months ago (2017-05-31 16:02:11 UTC) #66
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/a81e171d89732c62f3e8d1846ea6...

Powered by Google App Engine
This is Rietveld 408576698