Commit d8f9d3e4 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Add ExtendedCrashReporting value annotations to MessageQuotaChecker.

This will surface these values in a structured way on the crash
backend, obviating the need for a debugger.

Bug: 1003391
Change-Id: Ib8c1868babd4b3c01600bcb05d861a1f15875478
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055543
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#741604}
parent c438d59d
......@@ -6,6 +6,7 @@
#include <algorithm>
#include "base/debug/activity_tracker.h"
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
......@@ -77,6 +78,19 @@ NOINLINE void MaybeDumpWithoutCrashing(
base::debug::Alias(&messages_dequeued);
base::debug::Alias(&messages_written);
// Also record the data for extended crash reporting.
base::debug::ScopedActivity scoped_activity;
auto& user_data = scoped_activity.user_data();
user_data.SetUint("total_quota_used", total_quota_used);
user_data.SetUint("local_quota_used", local_quota_used);
user_data.SetBool("had_message_pipe", had_message_pipe);
user_data.SetUint("seconds_since_construction", seconds_since_construction);
user_data.SetUint("average_write_rate_per_second",
static_cast<uint64_t>(average_write_rate_per_second));
user_data.SetUint("messages_enqueued", messages_enqueued);
user_data.SetUint("messages_dequeued", messages_dequeued);
user_data.SetUint("messages_enqueued", messages_enqueued);
// This is happening because the user of the interface implicated on the crash
// stack has queued up an unreasonable number of messages, namely
// |total_quota_used|.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment