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

Unified Diff: tracing/tracing/ui/tracks/process_track_base.html

Issue 2450073002: Include scheduling-only threads in tracks (Closed)
Patch Set: Include scheduling-only threads in tracks Created 4 years, 2 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 | « tracing/tracing/ui/tracks/other_threads_track.html ('k') | tracing/tracing/ui/tracks/thread_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/process_track_base.html
diff --git a/tracing/tracing/ui/tracks/process_track_base.html b/tracing/tracing/ui/tracks/process_track_base.html
index b56b2cf30029e270679a41392ee3a75f3d5cd538..fe5b136f381e9e5a6581863bc76ef8d19a8b3636 100644
--- a/tracing/tracing/ui/tracks/process_track_base.html
+++ b/tracing/tracing/ui/tracks/process_track_base.html
@@ -15,6 +15,7 @@ found in the LICENSE file.
<link rel="import" href="/tracing/ui/tracks/counter_track.html">
<link rel="import" href="/tracing/ui/tracks/frame_track.html">
<link rel="import" href="/tracing/ui/tracks/object_instance_group_track.html">
+<link rel="import" href="/tracing/ui/tracks/other_threads_track.html">
<link rel="import" href="/tracing/ui/tracks/process_summary_track.html">
<link rel="import" href="/tracing/ui/tracks/spacing_track.html">
<link rel="import" href="/tracing/ui/tracks/thread_track.html">
@@ -137,12 +138,6 @@ tr.exportTo('tr.ui.tracks', function() {
this.didAppendTracks_();
},
- addEventsToTrackMap: function(eventToTrackMap) {
- this.tracks_.forEach(function(track) {
- track.addEventsToTrackMap(eventToTrackMap);
- });
- },
-
willAppendTracks_: function() {
},
@@ -256,14 +251,33 @@ tr.exportTo('tr.ui.tracks', function() {
threads.sort(tr.model.Thread.compare);
// Create the threads.
+ var otherThreads = [];
+ var hasVisibleThreads = false;
threads.forEach(function(thread) {
var track = new tr.ui.tracks.ThreadTrack(this.viewport);
track.thread = thread;
if (!track.hasVisibleContent)
return;
- Polymer.dom(this).appendChild(track);
- Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
+ if (track.hasSlices) {
+ hasVisibleThreads = true;
+ Polymer.dom(this).appendChild(track);
+ Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
+ } else if (track.hasTimeSlices) {
+ otherThreads.push(thread);
+ }
}.bind(this));
+
+ if (otherThreads.length > 0) {
+ // If there's only 1 thread with scheduling-only information don't
+ // bother making a group, just display it directly
+ // Similarly if we are a process with only scheduling-only threads
+ // don't bother making a group as the process itself serves
+ // as the collapsable group
+ var track = new tr.ui.tracks.OtherThreadsTrack(this.viewport);
+ track.threads = otherThreads;
+ track.collapsible = otherThreads.length > 1 && hasVisibleThreads;
+ Polymer.dom(this).appendChild(track);
+ }
}
};
« no previous file with comments | « tracing/tracing/ui/tracks/other_threads_track.html ('k') | tracing/tracing/ui/tracks/thread_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698