linux.ui: Add Operating System Overview Perspective
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 9 May 2016 14:42:59 +0000 (10:42 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 15 Jul 2016 19:21:52 +0000 (15:21 -0400)
When solving a problem, one must locate it before they can
identify it.

The current LTTng Kernel perspective is very good at identifying
problems but its views are mostly useful when a user is zoomed in.

This perspective, allows users to locate problem using metrics that
they are used to: CPU usage, Memory usage and IO usage, just like
system monitors in Linux[1] and Windows[2].

This perspective is intended to be used in tandem with the LTTng
Kernel perspective as this one can hone in on an issue and the
Kernel perspective can figure out the problem.

[1] http://static.thegeekstuff.com/wp-content/uploads/2009/10/system-monitor-resources.png
[2] http://www.windows7library.com/blog/wp-content/uploads/2011/04/Resource-Monitor.jpg

Change-Id: I0465b5bd61dc6cca6e8b6f78adbf2969df6f5481
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/72303
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/os_overview.png [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/perspectives/KernelOverviewPerspectiveFactory.java [new file with mode: 0644]

diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/os_overview.png b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/os_overview.png
new file mode 100644 (file)
index 0000000..bd17f33
Binary files /dev/null and b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/os_overview.png differ
index dc26cd55143dbf28157305c7e99ef89f9bd8fd17..2826638360a2849afc7aef0feba4eaa4b707cfde 100644 (file)
@@ -25,3 +25,5 @@ latency.stats.view.name = System Call Latency Statistics
 latency.density.view.name = System Call Density
 kernelmemoryusageview.view.name = Kernel Memory Usage View
 diskioactivity.view.name = Disk I/O Activity
+
+perspective.name = OS Tracing Overview
\ No newline at end of file
index fb1abc9d8d4967b4302c7c54747c240cb250777f..0137f5b79782d854ee03236b93842642766cd4e4 100644 (file)
          </analysisModuleClass>
       </output>
    </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.eclipse.tracecompass.internal.analysis.os.linux.ui.perspectives.KernelOverviewPerspectiveFactory"
+            icon="icons/obj16/os_overview.png"
+            id="org.eclipse.tracecompass.analysis.os.linux.ui.perspective"
+            name="%perspective.name">
+      </perspective>
+   </extension>
 </plugin>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/perspectives/KernelOverviewPerspectiveFactory.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/perspectives/KernelOverviewPerspectiveFactory.java
new file mode 100644 (file)
index 0000000..8833dd5
--- /dev/null
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.ui.perspectives;
+
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.cpuusage.CpuUsageView;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.io.diskioactivity.DiskIOActivityView;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.kernelmemoryusage.KernelMemoryUsageView;
+import org.eclipse.tracecompass.tmf.ui.project.wizards.NewTmfProjectWizard;
+import org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * The overview perspective. This perspective is useful for locating problem
+ * areas in a kernel trace.
+ *
+ * @author Matthew Khouzam
+ */
+public class KernelOverviewPerspectiveFactory implements IPerspectiveFactory {
+
+    /** Perspective ID */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.ui.perspective"; //$NON-NLS-1$
+
+    // LTTng views
+    private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
+    private static final String CPU_VIEW_ID = CpuUsageView.ID;
+    private static final String MEMORY_VIEW_ID = KernelMemoryUsageView.ID;
+    private static final String DISK_VIEW_ID = DiskIOActivityView.ID;
+
+    // Standard Eclipse views
+    private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
+    private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
+
+    @Override
+    public void createInitialLayout(IPageLayout layout) {
+
+        layout.setEditorAreaVisible(true);
+
+        // Create the top left folder
+        IFolderLayout topLeftFolder = layout.createFolder(
+                "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        topLeftFolder.addView(PROJECT_VIEW_ID);
+
+        // Create the top right folder
+        IFolderLayout topFolders[] = new IFolderLayout[3];
+        topFolders[0] = layout.createFolder(
+                "topFolder1", IPageLayout.TOP, 1.0f/5.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        topFolders[0].addView(CPU_VIEW_ID);
+        // Create the top right folder
+        topFolders[1] = layout.createFolder(
+                "topFolder2", IPageLayout.TOP, 1.0f/4.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        topFolders[1].addView(DISK_VIEW_ID);
+        // Create the top right folder
+        topFolders[2] = layout.createFolder(
+                "topFolders3", IPageLayout.TOP, 1.0f/3.0f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        topFolders[2].addView(MEMORY_VIEW_ID);
+
+        // Create the bottom right folder
+        IFolderLayout bottomRightFolder = layout.createFolder(
+                "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
+        bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
+
+        layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
+    }
+
+}
This page took 0.026961 seconds and 5 git commands to generate.