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

Side by Side Diff: base/trace_event/trace_event_impl.h

Issue 994133002: Generate globally (cross-process) unique IDs for memory tracing dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_
7 #define BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ 7 #define BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 typedef base::Callback<void()> WatchEventCallback; 595 typedef base::Callback<void()> WatchEventCallback;
596 void SetWatchEvent(const std::string& category_name, 596 void SetWatchEvent(const std::string& category_name,
597 const std::string& event_name, 597 const std::string& event_name,
598 const WatchEventCallback& callback); 598 const WatchEventCallback& callback);
599 // Cancel the watch event. If tracing is enabled, this may race with the 599 // Cancel the watch event. If tracing is enabled, this may race with the
600 // watch event notification firing. 600 // watch event notification firing.
601 void CancelWatchEvent(); 601 void CancelWatchEvent();
602 602
603 int process_id() const { return process_id_; } 603 int process_id() const { return process_id_; }
604 604
605 uint64 HashEventId(uint64 id);
Primiano Tucci (use gerrit) 2015/04/13 22:13:58 I think this should be called MangleEventId, but I
dsinclair 2015/04/14 13:42:46 +1 we use mangle in other places in the trace even
606
605 // Exposed for unittesting: 607 // Exposed for unittesting:
606 608
607 void WaitSamplingEventForTesting(); 609 void WaitSamplingEventForTesting();
608 610
609 // Allows deleting our singleton instance. 611 // Allows deleting our singleton instance.
610 static void DeleteForTesting(); 612 static void DeleteForTesting();
611 613
612 // Allow tests to inspect TraceEvents. 614 // Allow tests to inspect TraceEvents.
613 TraceEvent* GetEventByHandle(TraceEventHandle handle); 615 TraceEvent* GetEventByHandle(TraceEventHandle handle);
614 616
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; 806 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
805 subtle::AtomicWord generation_; 807 subtle::AtomicWord generation_;
806 808
807 DISALLOW_COPY_AND_ASSIGN(TraceLog); 809 DISALLOW_COPY_AND_ASSIGN(TraceLog);
808 }; 810 };
809 811
810 } // namespace trace_event 812 } // namespace trace_event
811 } // namespace base 813 } // namespace base
812 814
813 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ 815 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698