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

Unified Diff: base/debug/trace_event_impl.h

Issue 17451017: Process names, and predictable thread and process ordering in about:tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « no previous file | base/debug/trace_event_impl.cc » ('j') | content/gpu/gpu_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.h
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index a7ebaf2d4d155132f9c3f4e4bb70905e27f42c46..4fe04a1d235a5ffe94bce1c936c8f0fcac89653e 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -6,6 +6,7 @@
#ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_
#define BASE_DEBUG_TRACE_EVENT_IMPL_H_
+#include <map>
#include <stack>
#include <string>
#include <vector>
@@ -450,6 +451,9 @@ class BASE_EXPORT TraceLog {
}
void SetProcessID(int process_id);
+ void SetProcessSortIndex(int sort_index);
+ void SetProcessLabel(int label_id, const std::string& current_label);
+ void SetThreadSortIndex(int thread_id, int sort_index);
// Allow setting an offset between the current TimeTicks time and the time
// that should be reported.
@@ -509,7 +513,7 @@ class BASE_EXPORT TraceLog {
TraceLog();
~TraceLog();
const unsigned char* GetCategoryGroupEnabledInternal(const char* name);
- void AddThreadNameMetadataEvents();
+ void AddMetadataEvents();
#if defined(OS_ANDROID)
void SendToATrace(char phase,
@@ -539,6 +543,10 @@ class BASE_EXPORT TraceLog {
bool dispatching_to_observer_list_;
std::vector<EnabledStateObserver*> enabled_state_observer_list_;
+ std::map<int, std::string> process_labels_;
+ int process_sort_index_;
+ base::hash_map<int, int> thread_sort_indices_;
+
base::hash_map<int, std::string> thread_names_;
base::hash_map<int, std::stack<TimeTicks> > thread_event_start_times_;
base::hash_map<std::string, int> thread_colors_;
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | content/gpu/gpu_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698