Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2012-09-28 17:19:00 -0400
committerRoland Grunberg2012-10-01 11:20:58 -0400
commit6bca9f50103862b6f0527d8d18af9e95305b4059 (patch)
tree0af65c96d6ee7ed09c8ca3782236530ff2f6e695
parent6ac7b96b25d1b4e896c6c0ec97eb0b7dac952fa6 (diff)
downloadorg.eclipse.linuxtools-6bca9f50103862b6f0527d8d18af9e95305b4059.tar.gz
org.eclipse.linuxtools-6bca9f50103862b6f0527d8d18af9e95305b4059.tar.xz
org.eclipse.linuxtools-6bca9f50103862b6f0527d8d18af9e95305b4059.zip
Bug 390731: Add cachegrind to Profiling Memory category
https://bugs.eclipse.org/bugs/show_bug.cgi?id=390731 Change-Id: I32a1ae44f15ca895a65fd3c9607671fb4a6b2e5a Reviewed-on: https://git.eclipse.org/r/7984 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com> IP-Clean: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF5
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.properties1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.xml13
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchConfigurationTabGroup.java27
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchShortcut.java42
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF3
9 files changed, 105 insertions, 2 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
index ead127f0fb..1db77fe4fe 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
@@ -1,3 +1,13 @@
+2012-09-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchConfigurationTabGroup.java: New file.
+ * src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchShortcut.java: New file.
+ * META-INF/MANIFEST.MF: Add needed imports.
+ * plugin.properties: Add cachegrind profiling name.
+ * plugin.xml: Add extension to support cachegrind as memory profiler.
+ * src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java (setDefaults): Add setting of
+ tool attribute.
+
2010-08-06 Elliott Baron <ebaron@fedoraproject.org>
* src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchDelegate.java (initializeView): Check that outputs are not null.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
index 59d805a31b..8d00c64494 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindPlugin
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.valgrind.core
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
@@ -18,6 +19,8 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.debug.core,
org.eclipse.debug.ui,
org.eclipse.jface.text,
+ org.eclipse.linuxtools.internal.valgrind.launch,
+ org.eclipse.linuxtools.profiling.launch,
org.eclipse.linuxtools.profiling.ui,
org.eclipse.linuxtools.valgrind.core,
org.eclipse.linuxtools.valgrind.launch,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.properties b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.properties
index 3777964d66..8755fbd0a5 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.properties
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.properties
@@ -1,3 +1,4 @@
#Properties file for org.eclipse.linuxtools.valgrind.cachegrind
Bundle-Vendor.0 = Eclipse Linux Tools
Bundle-Name.0 = Cachegrind Plug-in
+cachegrindLaunchConfiguration.name.0=Cache Usage [Valgrind] \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.xml b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.xml
index 24746eb332..510a71d744 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/plugin.xml
@@ -17,5 +17,18 @@
definitionId="org.eclipse.linuxtools.valgrind.launch.cachegrind">
</view>
</extension>
+ <extension
+ point="org.eclipse.linuxtools.profiling.launch.launchProvider">
+ <provider
+ default="false"
+ delegate="org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate"
+ id="org.eclipse.linuxtools.profiling.provider.valgrind.cachegrind"
+ name="%cachegrindLaunchConfiguration.name.0"
+ priority="2"
+ shortcut="org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindLaunchShortcut"
+ tabgroup="org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindLaunchConfigurationTabGroup"
+ type="memory">
+ </provider>
+ </extension>
</plugin>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchConfigurationTabGroup.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000000..0b2038a265
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchConfigurationTabGroup.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * 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
+ *
+ * Contributors:
+ * Red Hat Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.cachegrind;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindSingleToolOptionsTab;
+import org.eclipse.linuxtools.profiling.launch.ProfileLaunchConfigurationTabGroup;
+
+public class CachegrindLaunchConfigurationTabGroup extends
+ ProfileLaunchConfigurationTabGroup {
+
+ @Override
+ public AbstractLaunchConfigurationTab[] getProfileTabs() {
+ return new AbstractLaunchConfigurationTab[] {
+ new ValgrindSingleToolOptionsTab("org.eclipse.linuxtools.valgrind.launch.cachegrind"), //$NON-NLS-1$
+ };
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchShortcut.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchShortcut.java
new file mode 100644
index 0000000000..470e0df677
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindLaunchShortcut.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * 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
+ *
+ * Contributors:
+ * Red Hat Inc - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.valgrind.cachegrind;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchPlugin;
+import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab;
+import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
+
+public class CachegrindLaunchShortcut extends ProfileLaunchShortcut {
+
+
+ @Override
+ protected void setDefaultProfileAttributes(
+ ILaunchConfigurationWorkingCopy wc) throws CoreException {
+ ValgrindOptionsTab tab = new ValgrindOptionsTab();
+ tab.setDefaults(wc);
+ ILaunchConfigurationTab defaultTab = ValgrindLaunchPlugin.getDefault().getToolPage(CachegrindPlugin.TOOL_ID);
+ defaultTab.setDefaults(wc);
+ }
+
+ /**
+ * Method getValgrindLaunchConfigType.
+ * @return ILaunchConfigurationType
+ */
+ @Override
+ protected ILaunchConfigurationType getLaunchConfigType() {
+ return getLaunchManager().getLaunchConfigurationType(ValgrindLaunchPlugin.LAUNCH_ID);
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java
index c47bdba42a..d34829a2bb 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/internal/valgrind/cachegrind/CachegrindToolPage.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.linuxtools.internal.valgrind.core.LaunchConfigurationConstants;
import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -256,6 +257,7 @@ public class CachegrindToolPage extends AbstractLaunchConfigurationTab
}
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ config.setAttribute(LaunchConfigurationConstants.ATTR_TOOL, CachegrindPlugin.TOOL_ID);
config.setAttribute(CachegrindLaunchConstants.ATTR_CACHEGRIND_CACHE_SIM, CachegrindLaunchConstants.DEFAULT_CACHEGRIND_CACHE_SIM);
config.setAttribute(CachegrindLaunchConstants.ATTR_CACHEGRIND_BRANCH_SIM, CachegrindLaunchConstants.DEFAULT_CACHEGRIND_BRANCH_SIM);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
index e3f3e88e61..7906e836d9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Allow cachegrind plug-in to access o.e.l.internal.valgrind.core.
+
2012-09-11 Jeff Johnston <jjohnstn@redhat.com>
* META-INF/MANIFEST.MF: Allow memcheck and valgrind plug-ins to access o.e.l.internal.valgrind.core.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
index a90e1c9a08..9cf7129e4f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.core/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Export-Package: org.eclipse.linuxtools.internal.valgrind.core;
org.eclipse.linuxtools.valgrind.massif.tests,
org.eclipse.linuxtools.valgrind.memcheck.tests,
org.eclipse.linuxtools.valgrind.massif,
- org.eclipse.linuxtools.valgrind.memcheck",
+ org.eclipse.linuxtools.valgrind.memcheck,
+ org.eclipse.linuxtools.valgrind.cachegrind",
org.eclipse.linuxtools.valgrind.core
Import-Package: org.eclipse.cdt.utils.pty,
org.eclipse.core.resources,

Back to the top