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

Issue 2308763002: Integrate Crashpad UMA (Closed)

Created:
4 years, 3 months ago by scottmg
Modified:
4 years, 3 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Integrate Crashpad UMA Creates an global persistent metrics storage helper in base/metrics to allow stubbing in Crashpad when built outside of Chrome. Uses a pair of persistent metrics files, one that is the currently active one, which is renamed to a "previous run" on startup. In normal operation -active will be created, used, and removed on shutdown. However, if Crashpad itself crashes, then on next startup, -active will be moved to previous so that previous can be slurped in on startup to retrieve data from the crash. BUG=crashpad:100 Committed: https://crrev.com/785ed6054d704b40cf4be1da82a88c979efe03bb Cr-Commit-Position: refs/heads/master@{#419251}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 12

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 5

Patch Set 5 : pass through user data dir for metrics #

Total comments: 15

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 6

Patch Set 8 : . #

Patch Set 9 : . #

Total comments: 10

Patch Set 10 : . #

Total comments: 2

Patch Set 11 : oops #

Total comments: 21

Patch Set 12 : fixes #

Total comments: 2

Patch Set 13 : . #

Patch Set 14 : logging for integration test failures #

Patch Set 15 : more logging #

Patch Set 16 : logging 2 #

Patch Set 17 : logging 3 #

Patch Set 18 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -66 lines) Patch
M base/metrics/persistent_histogram_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +35 lines, -2 lines 0 comments Download
M base/metrics/persistent_histogram_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 15 16 17 3 chunks +60 lines, -3 lines 0 comments Download
M chrome/app/chrome_crash_reporter_client_win.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/chrome_crash_reporter_client_win.cc View 1 2 3 4 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_field_trials.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -11 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +76 lines, -47 lines 0 comments Download
M components/crash/content/app/crash_reporter_client.h View 1 2 3 4 5 6 7 1 chunk +13 lines, -1 line 0 comments Download
M components/crash/content/app/crash_reporter_client.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M components/crash/content/app/crashpad_mac.mm View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M components/crash/content/app/crashpad_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +10 lines, -1 line 0 comments Download
M third_party/crashpad/crashpad/client/crashpad_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/crashpad/crashpad/client/crashpad_client_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +14 lines, -1 line 0 comments Download
M third_party/crashpad/crashpad/client/crashpad_client_win.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/crashpad/crashpad/handler/handler_main.cc View 1 2 3 4 5 6 7 8 9 10 11 14 15 16 17 8 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 101 (59 generated)
scottmg
I haven't figured out how to stub this out when not building against //base yet, ...
4 years, 3 months ago (2016-09-02 19:33:54 UTC) #3
scottmg
Brian, could you take a look at the persistent metrics usage code in third_party/crashpad/crashpad/handler/handler_main.cc? I ...
4 years, 3 months ago (2016-09-12 20:08:39 UTC) #4
bcwhite
https://codereview.chromium.org/2308763002/diff/20001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/2308763002/diff/20001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode131 chrome/browser/metrics/chrome_metrics_service_client.cc:131: void RegisterInstallerFileMetricsPreferences(PrefRegistrySimple* registry) { How about changing the name ...
4 years, 3 months ago (2016-09-13 14:27:49 UTC) #5
scottmg
https://codereview.chromium.org/2308763002/diff/20001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/2308763002/diff/20001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode131 chrome/browser/metrics/chrome_metrics_service_client.cc:131: void RegisterInstallerFileMetricsPreferences(PrefRegistrySimple* registry) { On 2016/09/13 14:27:48, bcwhite wrote: ...
4 years, 3 months ago (2016-09-13 19:15:32 UTC) #6
bcwhite
https://codereview.chromium.org/2308763002/diff/20001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/20001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode149 third_party/crashpad/crashpad/handler/handler_main.cc:149: base::GlobalHistogramAllocator::CreateWithFile( On 2016/09/13 19:15:32, scottmg wrote: > On 2016/09/13 ...
4 years, 3 months ago (2016-09-13 19:38:24 UTC) #7
scottmg
On 2016/09/13 19:38:24, bcwhite wrote: > https://codereview.chromium.org/2308763002/diff/20001/third_party/crashpad/crashpad/handler/handler_main.cc > File third_party/crashpad/crashpad/handler/handler_main.cc (right): > > https://codereview.chromium.org/2308763002/diff/20001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode149 > ...
4 years, 3 months ago (2016-09-13 21:25:10 UTC) #9
Mark Mentovai
LGTM Are we concerned about the lag in getting reports back from the field? We ...
4 years, 3 months ago (2016-09-13 21:34:06 UTC) #10
Mark Mentovai
https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode325 third_party/crashpad/crashpad/handler/handler_main.cc:325: ToolSupport::CommandLineArgumentToFilePathStringType(options.database)); Hmm, this will delay the handshake with the ...
4 years, 3 months ago (2016-09-13 21:35:56 UTC) #11
scottmg
On 2016/09/13 21:34:06, Mark Mentovai wrote: > LGTM > > Are we concerned about the ...
4 years, 3 months ago (2016-09-13 21:40:45 UTC) #13
scottmg
https://codereview.chromium.org/2308763002/diff/80001/base/metrics/persistent_metrics_file_util.cc File base/metrics/persistent_metrics_file_util.cc (right): https://codereview.chromium.org/2308763002/diff/80001/base/metrics/persistent_metrics_file_util.cc#newcode62 base/metrics/persistent_metrics_file_util.cc:62: base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ | On 2016/09/13 21:34:06, ...
4 years, 3 months ago (2016-09-13 21:40:50 UTC) #14
scottmg
https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode325 third_party/crashpad/crashpad/handler/handler_main.cc:325: ToolSupport::CommandLineArgumentToFilePathStringType(options.database)); On 2016/09/13 21:35:56, Mark Mentovai wrote: > Hmm, ...
4 years, 3 months ago (2016-09-13 21:46:24 UTC) #15
scottmg
On 2016/09/13 21:46:24, scottmg wrote: > https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc > File third_party/crashpad/crashpad/handler/handler_main.cc (right): > > https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode325 > ...
4 years, 3 months ago (2016-09-13 21:50:13 UTC) #16
Mark Mentovai
https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode325 third_party/crashpad/crashpad/handler/handler_main.cc:325: ToolSupport::CommandLineArgumentToFilePathStringType(options.database)); On 2016/09/13 21:46:24, scottmg wrote: > On 2016/09/13 ...
4 years, 3 months ago (2016-09-13 21:52:01 UTC) #17
scottmg
On 2016/09/13 21:52:01, Mark Mentovai wrote: > https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc > File third_party/crashpad/crashpad/handler/handler_main.cc (right): > > https://codereview.chromium.org/2308763002/diff/80001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode325 ...
4 years, 3 months ago (2016-09-13 22:55:38 UTC) #18
bcwhite
Publishing my drafts doesn't show my comments in the same order as the files given ...
4 years, 3 months ago (2016-09-14 13:16:13 UTC) #19
scottmg
Thanks Brian. https://codereview.chromium.org/2308763002/diff/100001/base/metrics/persistent_metrics_file_util.cc File base/metrics/persistent_metrics_file_util.cc (right): https://codereview.chromium.org/2308763002/diff/100001/base/metrics/persistent_metrics_file_util.cc#newcode44 base/metrics/persistent_metrics_file_util.cc:44: allocator->CreateTrackingHistograms(metrics_name); On 2016/09/14 13:16:12, bcwhite wrote: > ...
4 years, 3 months ago (2016-09-14 20:37:02 UTC) #20
scottmg
https://codereview.chromium.org/2308763002/diff/100001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/100001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode406 third_party/crashpad/crashpad/handler/handler_main.cc:406: std::unique_ptr<CrashReportDatabase> database(CrashReportDatabase::Initialize( I think we should move metrics initialization ...
4 years, 3 months ago (2016-09-14 20:48:30 UTC) #21
bcwhite
LGTM Thanks for doing all that! https://codereview.chromium.org/2308763002/diff/100001/components/crash/content/app/crash_reporter_client.h File components/crash/content/app/crash_reporter_client.h (right): https://codereview.chromium.org/2308763002/diff/100001/components/crash/content/app/crash_reporter_client.h#newcode133 components/crash/content/app/crash_reporter_client.h:133: #if defined(OS_WIN) On ...
4 years, 3 months ago (2016-09-14 21:11:30 UTC) #22
scottmg
Thanks https://codereview.chromium.org/2308763002/diff/100001/components/crash/content/app/crash_reporter_client.h File components/crash/content/app/crash_reporter_client.h (right): https://codereview.chromium.org/2308763002/diff/100001/components/crash/content/app/crash_reporter_client.h#newcode133 components/crash/content/app/crash_reporter_client.h:133: #if defined(OS_WIN) On 2016/09/14 21:11:29, bcwhite wrote: > ...
4 years, 3 months ago (2016-09-14 22:12:31 UTC) #23
Mark Mentovai
LGTM otherwise https://codereview.chromium.org/2308763002/diff/180001/third_party/crashpad/crashpad/client/crashpad_client.h File third_party/crashpad/crashpad/client/crashpad_client.h (right): https://codereview.chromium.org/2308763002/diff/180001/third_party/crashpad/crashpad/client/crashpad_client.h#newcode58 third_party/crashpad/crashpad/client/crashpad_client.h:58: //! \param[in] metrics The path to an ...
4 years, 3 months ago (2016-09-14 23:48:40 UTC) #26
scottmg
Thanks! I'll land here first to make sure things are OK and then apply upstream ...
4 years, 3 months ago (2016-09-14 23:58:32 UTC) #29
Mark Mentovai
LGTM. I’m cool with landing in Chrome first. https://codereview.chromium.org/2308763002/diff/200001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/200001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode437 third_party/crashpad/crashpad/handler/handler_main.cc:437: histogram_allocator->DeletePersistentLocation(); ...
4 years, 3 months ago (2016-09-15 00:08:55 UTC) #32
scottmg
+asvitkine: could you review chrome\browser\chrome_browser_field_trials.cc chrome\browser\metrics\chrome_metrics_service_client.cc for OWNERS, please?
4 years, 3 months ago (2016-09-15 00:09:39 UTC) #34
scottmg
https://codereview.chromium.org/2308763002/diff/200001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/200001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode437 third_party/crashpad/crashpad/handler/handler_main.cc:437: histogram_allocator->DeletePersistentLocation(); On 2016/09/15 00:08:55, Mark Mentovai wrote: > Optional: ...
4 years, 3 months ago (2016-09-15 00:14:47 UTC) #35
Alexei Svitkine (slow)
Thanks! Some comments for you below. https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode747 base/metrics/persistent_histogram_allocator.cc:747: *out_base_path = dir.AppendASCII(name) ...
4 years, 3 months ago (2016-09-15 16:49:44 UTC) #40
bcwhite
https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode887 base/metrics/persistent_histogram_allocator.cc:887: File file(persistent_location_, On 2016/09/15 16:49:44, Alexei Svitkine (very slow) ...
4 years, 3 months ago (2016-09-15 17:07:48 UTC) #41
Alexei Svitkine (slow)
Yeah, it's true "utils" file are not advised. In this case, it's pretty targeted - ...
4 years, 3 months ago (2016-09-15 17:11:08 UTC) #42
Mark Mentovai
https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode402 third_party/crashpad/crashpad/handler/handler_main.cc:402: const char kMetricsName[] = "CrashpadMetrics"; Alexei Svitkine (very slow) ...
4 years, 3 months ago (2016-09-15 17:22:28 UTC) #44
bcwhite
> Yeah, it's true "utils" file are not advised. In this case, it's pretty > ...
4 years, 3 months ago (2016-09-15 17:26:19 UTC) #45
Alexei Svitkine (slow)
https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode402 third_party/crashpad/crashpad/handler/handler_main.cc:402: const char kMetricsName[] = "CrashpadMetrics"; On 2016/09/15 17:22:28, Mark ...
4 years, 3 months ago (2016-09-15 17:31:51 UTC) #46
Alexei Svitkine (slow)
On Thu, Sep 15, 2016 at 1:26 PM, <bcwhite@chromium.org> wrote: > > Yeah, it's true ...
4 years, 3 months ago (2016-09-15 17:32:20 UTC) #47
scottmg
https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode747 base/metrics/persistent_histogram_allocator.cc:747: *out_base_path = dir.AppendASCII(name) On 2016/09/15 16:49:44, Alexei Svitkine (very ...
4 years, 3 months ago (2016-09-15 17:41:13 UTC) #48
Alexei Svitkine (slow)
LGTM thanks! https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode887 base/metrics/persistent_histogram_allocator.cc:887: File file(persistent_location_, On 2016/09/15 17:41:13, scottmg wrote: ...
4 years, 3 months ago (2016-09-15 17:49:16 UTC) #49
bcwhite
https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2308763002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode887 base/metrics/persistent_histogram_allocator.cc:887: File file(persistent_location_, On 2016/09/15 17:49:16, Alexei Svitkine (very slow) ...
4 years, 3 months ago (2016-09-15 17:56:34 UTC) #50
scottmg
https://codereview.chromium.org/2308763002/diff/260001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/2308763002/diff/260001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode145 chrome/browser/metrics/chrome_metrics_service_client.cc:145: void RegisterOrRemovePreviousRunMetricsFile( On 2016/09/15 17:49:16, Alexei Svitkine (very slow) ...
4 years, 3 months ago (2016-09-15 18:31:24 UTC) #51
scottmg
https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc File third_party/crashpad/crashpad/handler/handler_main.cc (right): https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode402 third_party/crashpad/crashpad/handler/handler_main.cc:402: const char kMetricsName[] = "CrashpadMetrics"; On 2016/09/15 17:41:13, scottmg ...
4 years, 3 months ago (2016-09-15 19:29:09 UTC) #54
Mark Mentovai
scottmg wrote: > https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc > File third_party/crashpad/crashpad/handler/handler_main.cc (right): > > https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc#newcode402 > third_party/crashpad/crashpad/handler/handler_main.cc:402: const char ...
4 years, 3 months ago (2016-09-15 19:37:26 UTC) #55
scottmg
On 2016/09/15 19:37:26, Mark Mentovai wrote: > scottmg wrote: > > > https://codereview.chromium.org/2308763002/diff/220001/third_party/crashpad/crashpad/handler/handler_main.cc > > ...
4 years, 3 months ago (2016-09-15 20:11:15 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/2308763002/280001
4 years, 3 months ago (2016-09-15 22:29:04 UTC) #65
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/2308763002/450001
4 years, 3 months ago (2016-09-16 19:34:06 UTC) #98
commit-bot: I haz the power
Committed patchset #18 (id:450001)
4 years, 3 months ago (2016-09-16 19:39:35 UTC) #99
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 19:41:51 UTC) #101
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/785ed6054d704b40cf4be1da82a88c979efe03bb
Cr-Commit-Position: refs/heads/master@{#419251}

Powered by Google App Engine
This is Rietveld 408576698