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

Unified Diff: base/trace_event/trace_log.cc

Issue 1860653002: CL for testing on Win. Base URL: https://chromium.googlesource.com/chromium/src.git@task_file
Patch Set: more logs. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/trace_event/trace_event_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index a0b12fbc5426fc1f357b4be8eb219a690ca2c647..09a5f85c72a471e3bf486b9d0a5b4df7f95d24be 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -223,6 +223,7 @@ class TraceLog::ThreadLocalEventBuffer
}
int generation() const { return generation_; }
+ size_t chunk_index() { return chunk_index_; }
private:
// MessageLoop::DestructionObserver
@@ -1254,6 +1255,11 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
lock.EnsureAcquired();
trace_event = AddEventToThreadSharedChunkWhileLocked(&handle, true);
}
+ if (strcmp(name, "SequencedWorkerPool::Inner::ThreadLoop") == 0) {
+ LOG(ERROR) << "ssid adding event SequencedWorkerPool::Inner::ThreadLoop using " << (thread_local_event_buffer ? "thread_local " : "thread_shared ") << handle.chunk_seq << " " << handle.chunk_index << " " << handle.event_index << " " << name;
+
+ LOG(ERROR) << "ssid sshared index " << thread_shared_chunk_index_ << " local index " << (thread_local_event_buffer? thread_local_event_buffer->chunk_index() : 0);
+ }
if (trace_event) {
trace_event->Initialize(thread_id,
@@ -1436,6 +1442,15 @@ void TraceLog::UpdateTraceEventDuration(
TraceEvent* trace_event = GetEventByHandleInternal(handle, &lock);
if (trace_event) {
DCHECK(trace_event->phase() == TRACE_EVENT_PHASE_COMPLETE);
+ if (trace_event->duration().ToInternalValue() != -1) {
+ LOG(ERROR) << "ssid got event from " << (thread_local_event_buffer_.Get() ? "thread_local" : "thread_shared");
+ if (thread_shared_chunk_ && handle.chunk_index == thread_shared_chunk_index_)
+ LOG(ERROR) << "ssid event if not local is from in flight shared chunk with index " << thread_shared_chunk_index_;
+ else
+ LOG(ERROR) << "ssid event if not local is from logged_events_";
+ LOG(ERROR) << "ssid duration set for handle " << handle.chunk_seq << " " << handle.chunk_index << " " << handle.event_index << " " << name;
+ }
+ CHECK_EQ(trace_event->name(), name);
trace_event->UpdateDuration(now, thread_now);
#if defined(OS_ANDROID)
trace_event->SendToATrace();
« no previous file with comments | « base/trace_event/trace_event_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698