Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2015-02-13 17:51:16 +0000
committerGerrit Code Review @ Eclipse.org2015-02-17 13:31:11 +0000
commitef889c26f953534d2ae3bb4662e92a0ac3fa1a14 (patch)
tree33e5b93ae53b7ed0d40836b4430e879fc2cc5cc9 /dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui
parent7e3a37be7bd0ddf5ee04655fbfe87cbb17154e7f (diff)
downloadorg.eclipse.cdt-ef889c26f953534d2ae3bb4662e92a0ac3fa1a14.tar.gz
org.eclipse.cdt-ef889c26f953534d2ae3bb4662e92a0ac3fa1a14.tar.xz
org.eclipse.cdt-ef889c26f953534d2ae3bb4662e92a0ac3fa1a14.zip
Bug 459901 - [visualizer] The visualizer may display duplicate elements
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui')
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
index 43b4a4ded8e..f6a2007482f 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/view/MulticoreVisualizer.java
@@ -1132,12 +1132,13 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
DsfSession session = DsfSession.getSession(sessionId);
if (session != null) {
- fDataModel = new VisualizerModel(sessionId);
+ final VisualizerModel model = new VisualizerModel(sessionId);
+ fDataModel = model;
fTargetData.getCPUs(m_sessionState, new DataRequestMonitor<ICPUDMContext[]>(session.getExecutor(), null) {
@Override
protected void handleCompleted() {
ICPUDMContext[] cpuContexts = isSuccess() ? getData() : null;
- getCPUsDone(cpuContexts, fDataModel);
+ getCPUsDone(cpuContexts, model);
}
});
}
@@ -1146,8 +1147,8 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
/** Invoked when getModel() request completes. */
@ConfinedToDsfExecutor("getSession().getExecutor()")
public void getVisualizerModelDone(VisualizerModel model) {
- fDataModel.setLoadMetersEnabled(m_loadMetersEnabled);
- updateLoads();
+ model.setLoadMetersEnabled(m_loadMetersEnabled);
+ updateLoads(model);
model.sort();
setCanvasModel(model);
}
@@ -1375,10 +1376,9 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
done(1, model);
}
-
/** Updates the loads for all cpus and cores */
@ConfinedToDsfExecutor("getSession().getExecutor()")
- public void updateLoads() {
+ public void updateLoads(final VisualizerModel model) {
if (m_cpuCoreContextsCache.isEmpty()) {
// not ready to get load info yet
return;
@@ -1388,8 +1388,6 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
return;
}
- final VisualizerModel model = fDataModel;
-
model.getLoadTodo().dispose();
// keep track of how many loads we expect
model.getLoadTodo().add(m_cpuCoreContextsCache.size());
@@ -1470,7 +1468,8 @@ public class MulticoreVisualizer extends GraphicCanvasVisualizer implements IPin
executor.execute(new Runnable() {
@Override
public void run() {
- updateLoads();
+ final VisualizerModel model = fDataModel;
+ updateLoads(model);
}
});
}

Back to the top