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

Unified Diff: tracing/tracing/ui/tracks/thread_track.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/process_track_base.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/thread_track.html
diff --git a/tracing/tracing/ui/tracks/thread_track.html b/tracing/tracing/ui/tracks/thread_track.html
index ece278cee1af27fe5ef97829669744c94cac29bf..424a0d320c2024970542b3cd47dd0c430eb2af52 100644
--- a/tracing/tracing/ui/tracks/thread_track.html
+++ b/tracing/tracing/ui/tracks/thread_track.html
@@ -33,6 +33,7 @@ tr.exportTo('tr.ui.tracks', function() {
decorate: function(viewport) {
tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
Polymer.dom(this).classList.add('thread-track');
+ this.heading_ = document.createElement('tr-ui-heading');
},
get thread() {
@@ -48,6 +49,15 @@ tr.exportTo('tr.ui.tracks', function() {
return this.tracks_.length > 0;
},
+ get hasSlices() {
+ return this.thread_.asyncSliceGroup.length > 0 ||
+ this.thread_.sliceGroup.length > 0;
+ },
+
+ get hasTimeSlices() {
+ return this.thread_.timeSlices;
+ },
+
get eventContainer() {
return this.thread;
},
@@ -64,21 +74,24 @@ tr.exportTo('tr.ui.tracks', function() {
if (!this.thread_)
return;
- this.heading = this.thread_.userFriendlyName + ': ';
- this.tooltip = this.thread_.userFriendlyDetails;
+ this.heading_.heading = this.thread_.userFriendlyName;
+ this.heading_.tooltip = this.thread_.userFriendlyDetails;
if (this.thread_.asyncSliceGroup.length)
this.appendAsyncSliceTracks_();
this.appendThreadSamplesTracks_();
+ var needsHeading = false;
if (this.thread_.timeSlices) {
var timeSlicesTrack = new tr.ui.tracks.SliceTrack(this.viewport);
timeSlicesTrack.heading = '';
timeSlicesTrack.height = tr.ui.b.THIN_SLICE_HEIGHT + 'px';
timeSlicesTrack.slices = this.thread_.timeSlices;
- if (timeSlicesTrack.hasVisibleContent)
+ if (timeSlicesTrack.hasVisibleContent) {
+ needsHeading = true;
Polymer.dom(this).appendChild(timeSlicesTrack);
+ }
}
if (this.thread_.sliceGroup.length) {
@@ -86,8 +99,14 @@ tr.exportTo('tr.ui.tracks', function() {
track.heading = this.thread_.userFriendlyName;
track.tooltip = this.thread_.userFriendlyDetails;
track.group = this.thread_.sliceGroup;
- if (track.hasVisibleContent)
+ if (track.hasVisibleContent) {
+ needsHeading = false;
Polymer.dom(this).appendChild(track);
+ }
+ }
+
+ if (needsHeading) {
+ Polymer.dom(this).appendChild(this.heading_);
}
},
« no previous file with comments | « tracing/tracing/ui/tracks/process_track_base.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698