Community
Participate
Working Groups
Using the candidate 4.4 driver try to run Unload profiling data on a process run using java 5 ( JVMTI profiling ) I should see the heap size going down but nothing seems to happen. This is a regression from previous releases, please investigate as a 4.4.0.1 candidate
Created attachment 72818 [details] Heap analysis screen shot Attaching a screen shot from a heap dump after running an execution analysis profiling and then triggering Unload Profiling data. It's clear that the execution trace is not cleaned up.
Created attachment 73043 [details] Patch with the fix
Eugene please review and test the attached patch. Make sure you apply also the patches from bug 194543, 190685 and 148603.
The patch seems okay but context.cleanUp(); in HierarchyXMIResourceImpl have to check for null context. Also the auto refresh UI thread (org.eclipse.hyades.trace.internal.ui.PDProjectExplorer$RefreshUI) is loading back the agent after each unload. at org.eclipse.hyades.models.hierarchy.util.HierarchyXMIResourceImpl.doLoad(HierarchyXMIResourceImpl.java:294) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1354) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1155) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:256) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:271) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:398) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:217) at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:199) at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:259) at org.eclipse.hyades.models.hierarchy.impl.TRCAgentProxyImpl.getAgent(TRCAgentProxyImpl.java:710) at org.eclipse.hyades.trace.internal.ui.PDProjectExplorer$RefreshUI.isAgentModified(PDProjectExplorer.java:220) at org.eclipse.hyades.trace.internal.ui.PDProjectExplorer$RefreshUI.isModified(PDProjectExplorer.java:156) at org.eclipse.hyades.trace.internal.ui.PDProjectExplorer$RefreshUI.access$0(PDProjectExplorer.java:150) at org.eclipse.hyades.trace.internal.ui.PDProjectExplorer$1.run(PDProjectExplorer.java:132) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Created attachment 73071 [details] Updated patch Eugene please review and test this updated patch.
Hi Marius. The changes made in Refresh UI does not always work. If you look at org.eclipse.hyades.trace.ui.internal.piclient.XMLTraceDataProcessor.RefreshUI.run(), line 824 actually set the collection to false when refresh. This is stopping the refresh from working in some use case. And the unload action now frees up memory provide views are closed.
(In reply to comment #6) > Hi Marius. The changes made in Refresh UI does not always work. If you look at > org.eclipse.hyades.trace.ui.internal.piclient.XMLTraceDataProcessor.RefreshUI.run(), > line 824 actually set the collection to false when refresh. This is stopping > the refresh from working in some use case. > And the unload action now frees up memory provide views are closed. > The XMLTraceDataProcessor.RefreshUI thread will set it back on true on line 846 (getAgentProxy().setCollectionData(true)) when new data is received from the AC agent. As you noted in some cases the automatic refresh might not work, as I don't see a non risky quick fix to that problem the workaround would be to start and stop the auto refresh or refresh manually. The current implementation (before the patch) of org.eclipse.hyades.trace.internal.ui.PDProjectExplorer.RefreshUI.isAgentModified triggers the load of the currently selected agent irregardless of the fact that none of the profiling views are open, through the patch I avoid that problem too. In 4.4.1 we should revisit the auto refresh and find a fix for the refresh problem. I'll open a separate bug for that problem to be handled post 4.4.0.1.
I opened bug 195459 for the auto refresh UI side effect.
Fix in CVS.
Fixed
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.