Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / tracing / tracks / thread_track.html
index cd9a946..4cdd6cb 100644 (file)
@@ -56,12 +56,8 @@ tvcm.exportTo('tracing.tracks', function() {
       this.heading = this.thread_.userFriendlyName + ': ';
       this.tooltip = this.thread_.userFriendlyDetails;
 
-      if (this.thread_.asyncSliceGroup.length) {
-        var asyncTrack = new tracing.tracks.AsyncSliceGroupTrack(this.viewport);
-        asyncTrack.group = this.thread_.asyncSliceGroup;
-        if (asyncTrack.hasVisibleContent)
-          this.appendChild(asyncTrack);
-      }
+      if (this.thread_.asyncSliceGroup.length)
+        this.appendAsyncSliceTracks_();
 
       this.appendThreadSamplesTracks_();
 
@@ -84,6 +80,18 @@ tvcm.exportTo('tracing.tracks', function() {
       }
     },
 
+    appendAsyncSliceTracks_: function() {
+      var subGroups = this.thread_.asyncSliceGroup.titleSubGroups;
+      subGroups.forEach(function(subGroup) {
+        var asyncTrack = new tracing.tracks.AsyncSliceGroupTrack(this.viewport);
+        var title = subGroup.slices[0].title;
+        asyncTrack.group = subGroup;
+        asyncTrack.heading = title;
+        if (asyncTrack.hasVisibleContent)
+          this.appendChild(asyncTrack);
+      }, this);
+    },
+
     appendThreadSamplesTracks_: function() {
       var threadSamples = this.thread_.samples;
       if (threadSamples === undefined || threadSamples.length === 0)