linux.ui: Add CPU entries under Resources View aggregated IRQ entries
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 3 Mar 2016 21:53:47 +0000 (16:53 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 4 Mar 2016 18:00:07 +0000 (13:00 -0500)
This adds CPU entries under the root IRQ entries in the resource view.

They look like this at the moment.

SOFT_IRQ 1 Timer: ------------[rrrrrrr|xx|xxxxx|xx]
......CPU 0     : -------------[rrrrrrrrr|xxxxx]
......CPU 1     : ------------[rrrrrrr|xx]
......CPU 2     : ---------------------[rrrrrrr|xx]

This implements the solution suggested in bug 381497

Change-Id: Ie0c9e9e505d4fb66a39579a0891620373e4d1e00
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/67453
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Hudson CI
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/AggregateResourcesEntry.java
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java

index eeafe6ec4a1771a8d02b6c9dd29ad0062063f558..eb41383827453a712d69112d96cb5e99b20ebd88 100644 (file)
@@ -62,6 +62,26 @@ class AggregateResourcesEntry extends ResourcesEntry {
         super(ITmfStateSystem.INVALID_ATTRIBUTE, trace, startTime, endTime, type, id);
     }
 
+    /**
+     * Constructor
+     *
+     * @param trace
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param type
+     *            The type of this entry
+     * @param id
+     *            The id of this entry
+     */
+    public AggregateResourcesEntry(@NonNull ITmfTrace trace, String name, long startTime, long endTime, Type type, int id) {
+        super(ITmfStateSystem.INVALID_ATTRIBUTE, trace, name, startTime, endTime, type, id);
+    }
+
     @Override
     public void addEvent(ITimeEvent event) {
     }
index 2782db468197a6086ba4411a7f698fc7678bdd54..3c297e92fc31ec1dcb63aeb1e4bf817efbd493c1 100644 (file)
@@ -272,6 +272,9 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView {
                         if (aggregateInterruptEntry.getId() == resourceId && aggregateInterruptEntry.getType().equals(type)) {
                             found = true;
                             aggregateInterruptEntry.addContributor(interruptEntry);
+                            final AggregateResourcesEntry irqCpuEntry = new AggregateResourcesEntry(trace, cpuEntry.getName(), startTime, endTime, type, cpuEntry.getId());
+                            irqCpuEntry.addContributor(interruptEntry);
+                            aggregateInterruptEntry.addChild(irqCpuEntry);
                             break;
                         }
                     }
@@ -279,6 +282,9 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView {
                 if (!found) {
                     AggregateResourcesEntry aggregateInterruptEntry = new AggregateResourcesEntry(trace, startTime, endTime, type, resourceId);
                     aggregateInterruptEntry.addContributor(interruptEntry);
+                    final AggregateResourcesEntry irqCpuEntry = new AggregateResourcesEntry(trace, cpuEntry.getName(), startTime, endTime, type, cpuEntry.getId());
+                    irqCpuEntry.addContributor(interruptEntry);
+                    aggregateInterruptEntry.addChild(irqCpuEntry);
                     traceEntry.addChild(aggregateInterruptEntry);
                 }
             } else {
This page took 0.043994 seconds and 5 git commands to generate.