Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |