mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Bug 396076 - [Visualizer] Cores displayed non-optimally when there are
multiple CPUs Change-Id: Ib043630b29ba1c25bd5fd8ee08c68e3ca388bb68 Reviewed-on: https://git.eclipse.org/r/9110 Reviewed-by: William Swanson <traveler@tilera.com> IP-Clean: William Swanson <traveler@tilera.com> Tested-by: William Swanson <traveler@tilera.com>
This commit is contained in:
parent
880ac74b26
commit
c916dfe4e7
1 changed files with 7 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* William R. Swanson (Tilera Corporation) - initial API and implementation
|
||||
* Marc Dumais (Ericsson) - Bug 396076
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.dsf.gdb.multicorevisualizer.internal.ui.view;
|
||||
|
@ -396,6 +397,11 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
|
|||
}
|
||||
|
||||
if (m_recacheSizes) {
|
||||
// avoid doing resize calculations if the model is not ready
|
||||
if (m_model == null ) {
|
||||
m_recacheSizes = false;
|
||||
return;
|
||||
}
|
||||
// update cached size information
|
||||
|
||||
// General margin/spacing constants.
|
||||
|
@ -418,7 +424,7 @@ public class MulticoreVisualizerCanvas extends GraphicCanvas
|
|||
if (cpu_size < 0) cpu_size = 0;
|
||||
|
||||
// Calculate area on each CPU for placing cores.
|
||||
int ncores = m_cores.size();
|
||||
int ncores = m_cores.size() / ((ncpus == 0) ? 1 : ncpus);
|
||||
int cpu_width = cpu_size - core_margin * 2 + core_separation;
|
||||
int cpu_height = cpu_size - core_margin * 2 + core_separation;
|
||||
int core_edge = fitSquareItems(ncores, cpu_width, cpu_height);
|
||||
|
|
Loading…
Add table
Reference in a new issue