Bug 396076 - [Visualizer] Cores displayed non-optimally when there are multiple CPUs
Summary: [Visualizer] Cores displayed non-optimally when there are multiple CPUs
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.2   Edit
Assignee: William Swanson CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 15:14 EST by Marc Dumais CLA
Modified: 2013-02-21 16:18 EST (History)
3 users (show)

See Also:


Attachments
screenshot showing problem (6.73 KB, image/png)
2012-12-07 15:15 EST, Marc Dumais CLA
no flags Details
Same visualizer screenshot after applying fix (8.85 KB, image/png)
2012-12-07 15:25 EST, Marc Dumais CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Dumais CLA 2012-12-07 15:14:41 EST
In the case where there are multiple CPUs being shown in the visualizer, the computation that figures-out the required size of the cores that fits in a CPU uses the total number of cores instead of the number of cores per CPU.   This results in the cores being displayed smaller than they should.   

For example, see attached screenshot where a (simulated) system with 4 CPU each having 4 cores is shown in the visualizer.  Notice that the size of the cores would be ok if all 16 were to be shown inside a single CPU.
Comment 1 Marc Dumais CLA 2012-12-07 15:15:17 EST
Created attachment 224443 [details]
screenshot showing problem
Comment 2 Marc Dumais CLA 2012-12-07 15:25:03 EST
The proposed fix is to take the number of CPUs into account when calculating the size of the cores to display.   Also, it was necessary to prevent that code to be reached before the model is build, since it would result in a division by zero.   

Here is the proposed patch:

https://git.eclipse.org/r/9110
Comment 3 Marc Dumais CLA 2012-12-07 15:25:40 EST
Created attachment 224444 [details]
Same visualizer screenshot after applying fix
Comment 4 Marc Dumais CLA 2012-12-10 09:51:46 EST
Hi William,

Thanks for the quick review.   I have updated the patch to take your suggestion into account.

Regards,

Marc
Comment 5 Marc Dumais CLA 2012-12-10 09:52:53 EST
Hi william,

Thanks for the quick review.   I have updated the patch to take your comment into consideration.

Regards,

Marc
Comment 6 Marc Dumais CLA 2012-12-10 14:59:15 EST
w/r to the patch submitted in this bug, I declare the following:

1) that I am authorized to submit this code change
2) that the code is 100% my own work
Comment 7 William Swanson CLA 2013-02-19 15:00:14 EST
Change has been committed, setting to resolved/fixed.