Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59470 Details for
Bug 167995
Enhance Heap Statistics View
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Initial impl of Heap Profiler Configuration (UI part)
patch.txt (text/plain), 13.86 KB, created by
Vitaly Provodin
on 2007-02-21 08:32:44 EST
(
hide
)
Description:
Initial impl of Heap Profiler Configuration (UI part)
Filename:
MIME Type:
Creator:
Vitaly Provodin
Created:
2007-02-21 08:32:44 EST
Size:
13.86 KB
patch
obsolete
>Index: src/org/eclipse/tptp/platform/jvmti/client/internal/ITILaunchConfigurationConstants.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/ITILaunchConfigurationConstants.java,v >retrieving revision 1.2 >diff -u -r1.2 ITILaunchConfigurationConstants.java >--- src/org/eclipse/tptp/platform/jvmti/client/internal/ITILaunchConfigurationConstants.java 20 Feb 2007 22:34:45 -0000 1.2 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/ITILaunchConfigurationConstants.java 21 Feb 2007 13:07:58 -0000 >@@ -40,6 +40,12 @@ > */ > public static final String ATTR_EXEC_CPU_TIME = TIPlugin.getId() + ".ATTR_EXEC_CPU_TIME"; > >+ /** >+ * A <code>boolean</code> indicating whether Object allocation informaton >+ * should be included or not. Object allocation informaton is included if >+ * the flag is set; otherwise it will not be included. >+ */ >+ public static final String ATTR_EXEC_OBJ_ALLOC_SITE = TIPlugin.getId() + ".ATTR_EXEC_OBJ_ALLOC_SITE"; > > /** > * A <code>boolean</code> indicating whether execution flow or execution statistics should >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/TIPlugin.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/TIPlugin.java,v >retrieving revision 1.1 >diff -u -r1.1 TIPlugin.java >--- src/org/eclipse/tptp/platform/jvmti/client/internal/TIPlugin.java 1 May 2006 15:28:13 -0000 1.1 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/TIPlugin.java 21 Feb 2007 13:07:58 -0000 >@@ -10,7 +10,10 @@ > **********************************************************************/ > package org.eclipse.tptp.platform.jvmti.client.internal; > >+import java.util.ResourceBundle; >+ > import org.eclipse.ui.plugin.*; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.jface.resource.ImageDescriptor; > import org.osgi.framework.BundleContext; > >@@ -76,4 +79,21 @@ > { > return ID; > } >+ >+ /** >+ * Returns the resource string for the given key >+ * >+ * @param key >+ * String, the key >+ * @return String, the resource String >+ */ >+ public static String getResourceString(String key) { >+ try { >+ ResourceBundle resourceBundle = Platform.getResourceBundle(Platform >+ .getBundle(ID)); >+ return resourceBundle.getString(key); >+ } catch (Exception e) { >+ return key; >+ } >+ } > } >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/messages.properties,v >retrieving revision 1.3 >diff -u -r1.3 messages.properties >--- src/org/eclipse/tptp/platform/jvmti/client/internal/messages.properties 20 Feb 2007 22:34:45 -0000 1.3 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/messages.properties 21 Feb 2007 13:07:58 -0000 >@@ -43,5 +43,8 @@ > EXEC_LEVEL_OF_DETAIL = Level of detail > EXEC_TYPE_OF_DATA = Type of data > EXEC_COLLECT_CPU_TIME = Collect method CPU time information >+EXEC_HEAPUI_TITLE = Memory analysis >+EXEC_HEAPUI_DESC = Analyze the application memory usage by monitoring object allocations >+EXEC_COLLECT_OBJECT_ALLOCATION = Track object allocation sites > EXEC_COLLECT_STATISTICS = Show execution statistics (compressed) > EXEC_COLLECT_FLOW = Show execution flow graphical details >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/TIMessages.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/src/org/eclipse/tptp/platform/jvmti/client/internal/TIMessages.java,v >retrieving revision 1.1 >diff -u -r1.1 TIMessages.java >--- src/org/eclipse/tptp/platform/jvmti/client/internal/TIMessages.java 1 May 2006 15:28:13 -0000 1.1 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/TIMessages.java 21 Feb 2007 13:07:58 -0000 >@@ -50,6 +50,7 @@ > public static String EXEC_LEVEL_OF_DETAIL; > public static String EXEC_TYPE_OF_DATA; > public static String EXEC_COLLECT_CPU_TIME; >+ public static String EXEC_COLLECT_OBJECT_ALLOCATION; > public static String EXEC_COLLECT_STATISTICS; > public static String EXEC_COLLECT_FLOW; > >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/plugin.properties,v >retrieving revision 1.6 >diff -u -r1.6 plugin.properties >--- plugin.properties 20 Feb 2007 22:35:52 -0000 1.6 >+++ plugin.properties 21 Feb 2007 13:07:57 -0000 >@@ -26,6 +26,7 @@ > > JVMTI_ANALYSIS_TYPE_HEAP_NAME = Memory Analysis > JVMTI_ANALYSIS_TYPE_HEAP_DESC = Analyze the Memory usage of your application >+JVMTI_ANALYSIS_TYPE_HEAP_OBJ_ALLOC_DESC = Analyze the application memory usage by monitoring object allocations > > JVMTI_ANALYSIS_TYPE_THRD_NAME = Thread Analysis > JVMTI_ANALYSIS_TYPE_THRD_DESC = Analyze the execution of your application threads >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.jvmti.client/plugin.xml,v >retrieving revision 1.5 >diff -u -r1.5 plugin.xml >--- plugin.xml 12 Oct 2006 02:36:07 -0000 1.5 >+++ plugin.xml 21 Feb 2007 13:07:58 -0000 >@@ -102,7 +102,7 @@ > dialogTitle="%JVMTI_DATA_COLLECTOR_CONF_TITILE" > id="org.eclipse.tptp.trace.jvmti.heapConfiguration"/> > <configuration >- class="org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIHeapAnalysisConfig" >+ class="org.eclipse.tptp.platform.jvmti.client.internal.analysistypes.TIThreadAnalysisConfig" > dialogTitle="%JVMTI_DATA_COLLECTOR_CONF_TITILE" > id="org.eclipse.tptp.trace.jvmti.threadConfiguration"/> > </extension> >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisConfig.java >=================================================================== >RCS file: src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisConfig.java >diff -N src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisConfig.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisConfig.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,115 @@ >+/***************************************************************************** >+ * Copyright (c) 2007, Intel Corporation. >+ * 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: >+ * Intel Corporation - Initial API and implementation >+ * Vitaly A. Provodin, Intel - Initial API and implementation >+ * >+ * $Id: >+ *****************************************************************************/ >+package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes; >+ >+import java.util.Vector; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.debug.core.ILaunchConfiguration; >+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; >+import org.eclipse.hyades.internal.execution.local.common.Options; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.tptp.platform.jvmti.client.internal.ITILaunchConfigurationConstants; >+import org.eclipse.tptp.platform.jvmti.client.internal.TIMessages; >+import org.eclipse.tptp.platform.jvmti.client.internal.TIPlugin; >+import org.eclipse.tptp.trace.ui.internal.launcher.application.AbstractConfiguration; >+import org.eclipse.tptp.trace.ui.internal.launcher.application.PIMemoryAnalysisConf.MemoryConfigurationPage; >+import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherMessages; >+import org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility; >+import org.eclipse.tptp.trace.ui.provisional.launcher.DataCollectionEngineAttribute; >+ >+public class TIHeapAnalysisConfig extends AbstractConfiguration { >+ >+ public TIHeapAnalysisConfig() { >+ super(new Class[] { TIHeapAnalysisOpt.class }); >+ } >+ >+ /** >+ * The heap analysis options are displayed in this configuration page. >+ */ >+ public static class TIHeapAnalysisOpt extends MemoryConfigurationPage { >+ >+ /** The heap analysis UI */ >+ private TIHeapAnalysisUI execHeapAnalysisUI; >+ >+ /** >+ * Indicates whether object allocation site information should be >+ * collected >+ */ >+ private boolean collectObjectAllocationSite; >+ >+ public TIHeapAnalysisOpt() { >+ execHeapAnalysisUI = new TIHeapAnalysisUI(); >+ } >+ >+ public void reset(ILaunchConfiguration launchConfiguration) { >+ try { >+ collectObjectAllocationSite = launchConfiguration >+ .getAttribute( >+ ITILaunchConfigurationConstants.ATTR_EXEC_OBJ_ALLOC_SITE, >+ false); >+ } catch (CoreException e) { >+ LauncherUtility.openErrorWithDetail( >+ LauncherMessages.LAUNCHER_COMMON_ERROR_TITLE, >+ TIMessages.ERROR_TI_CONFIGURATION_RESET, e); >+ } >+ } >+ >+ public Vector getAttributes() { >+ Vector options = null; >+ options = new Vector(); >+ options.add(new DataCollectionEngineAttribute( >+ ITILaunchConfigurationConstants.ATTR_EXEC_OBJ_ALLOC_SITE, >+ Options.OPTION_VALUE_TRUE)); >+ return options; >+ } >+ >+ public boolean storeAttributes( >+ ILaunchConfigurationWorkingCopy configurationWC) { >+ configurationWC.setAttribute( >+ ITILaunchConfigurationConstants.ATTR_EXEC_OBJ_ALLOC_SITE, >+ execHeapAnalysisUI.isCollectObjectAllocationSiteSelected()); >+ return true; >+ >+ } >+ >+ public void createControl(Composite parent) { >+ execHeapAnalysisUI.createControl(parent); >+ execHeapAnalysisUI >+ .setCollectObjectAllocationSite(collectObjectAllocationSite); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.tptp.trace.ui.internal.launcher.application.PIMemoryAnalysisConf.MemoryConfigurationPage#getDescription() >+ */ >+ public String getDescription() { >+ String desc = TIPlugin >+ .getResourceString("JVMTI_ANALYSIS_TYPE_HEAP_OBJ_ALLOC_DESC"); >+ return desc; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.tptp.trace.ui.internal.launcher.application.PIMemoryAnalysisConf.MemoryConfigurationPage#getTitle() >+ */ >+ public String getTitle() { >+ String title = TIPlugin >+ .getResourceString("JVMTI_ANALYSIS_TYPE_HEAP_NAME"); >+ return title; >+ } >+ } >+} >Index: src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisUI.java >=================================================================== >RCS file: src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisUI.java >diff -N src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisUI.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/tptp/platform/jvmti/client/internal/analysistypes/TIHeapAnalysisUI.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+/***************************************************************************** >+ * Copyright (c) 2007, Intel Corporation. >+ * 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: >+ * Intel Corporation - Initial API and implementation >+ * Vitaly A. Provodin, Intel - Initial API and implementation >+ * >+ * $Id: >+ *****************************************************************************/ >+package org.eclipse.tptp.platform.jvmti.client.internal.analysistypes; >+ >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.tptp.platform.jvmti.client.internal.TIMessages; >+ >+public class TIHeapAnalysisUI { >+ >+ /** Object allocation site option */ >+ private Button collectObjectAllocationSite; >+ >+ public void createControl(Composite parent) { >+ /* Create the level of detail group */ >+ createLevelOfDetailGroup(parent); >+ } >+ >+ private void createLevelOfDetailGroup(Composite parent) { >+ Group grp = createGroup(parent, TIMessages.EXEC_LEVEL_OF_DETAIL); >+ collectObjectAllocationSite = createButton(grp, >+ TIMessages.EXEC_COLLECT_OBJECT_ALLOCATION, SWT.CHECK); >+ >+ Composite gap = new Composite(grp, SWT.NONE); >+ GridLayout gl = new GridLayout(); >+ gl.marginBottom = 5; >+ gap.setLayout(gl); >+ } >+ >+ private Group createGroup(Composite parent, String name) { >+ Group grp = new Group(parent, SWT.NONE); >+ grp.setLayout(new GridLayout()); >+ grp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, true)); >+ grp.setText(name); >+ >+ return grp; >+ } >+ >+ private Button createButton(Composite parent, String name, int style) { >+ Button button = new Button(parent, style); >+ button.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false)); >+ button.setText(name); >+ >+ return button; >+ } >+ >+ /** >+ * @return the collectCPUTime >+ */ >+ public boolean isCollectObjectAllocationSiteSelected() { >+ return collectObjectAllocationSite == null >+ || collectObjectAllocationSite.isDisposed() ? false >+ : collectObjectAllocationSite.getSelection(); >+ } >+ >+ /** >+ * @param collectCPUTime >+ * the collectCPUTime to set >+ */ >+ public void setCollectObjectAllocationSite(boolean collectObjectAllocation) { >+ this.collectObjectAllocationSite.setSelection(collectObjectAllocation); >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167995
: 59470 |
60265
|
61066
|
61814
|
61815