0

Add trace event arguments in net::HttpCache::Transaction

This CL adds priority and url of the transaction as trace event
arguments. These are useful for investigations.

Bug: N/A
Change-Id: I632cded79c48d09c9b18b76d6502a36fc40c2f47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3266831
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#939225}
This commit is contained in:
Kenichi Ishibashi
2021-11-08 04:13:10 +00:00
committed by Chromium LUCI CQ
parent 66ed699837
commit 171683bc79

@ -192,7 +192,8 @@ HttpCache::Transaction::Transaction(RequestPriority priority, HttpCache* cache)
moved_network_transaction_to_writers_(false),
websocket_handshake_stream_base_create_helper_(nullptr),
in_do_loop_(false) {
TRACE_EVENT0("io", "HttpCacheTransaction::Transaction");
TRACE_EVENT1("io", "HttpCacheTransaction::Transaction", "priority",
RequestPriorityToString(priority));
static_assert(HttpCache::Transaction::kNumValidationHeaders ==
base::size(kValidationHeaders),
"invalid number of validation headers");
@ -240,6 +241,7 @@ int HttpCache::Transaction::Start(const HttpRequestInfo* request,
const NetLogWithSource& net_log) {
DCHECK(request);
DCHECK(!callback.is_null());
TRACE_EVENT1("io", "HttpCacheTransaction::Start", "url", request->url);
// Ensure that we only have one asynchronous call at a time.
DCHECK(callback_.is_null());