| Visualization Tools Aid Multi-core Development |
|
|
| Jun 05 2007 | |
|
Page 2 of 4
advertisement:
Visualize Multi-Core BehaviorHardware breakpoints are great for debugging serial code. Stop the system, look at the stack, read the registers and verify the computation is correct. But understanding multi-core behavior is beyond the reach of traditional debug and profiling tools, which primarily detect problems within single programs. With conventional tools, multi-core system developers have to gather information separately from each core and then somehow combine the information for analysis. Multi-core tools give developers greater insight into the dynamic interactions between cores, typically using visualization. This provides a powerful picture of behavior because it’s easier to see workload balance, contention, and race conditions. To take advantage of the true hardware parallelism offered by multi-core processors, software developers have to split up their computations into separate threads that run concurrently. Task-parallel threads are independent code sequences that can run simultaneously. Data-parallel threads are code sequences that perform the same computation over and over on a set of data, such as dimming all of the pixels on an LCD display. When an operation is divided into threads and then distributed over multiple cores, it normally executes much faster than when it runs sequentially on one core. Workload Balance![]() Figure 1. The QNX Momentics System Profiler Displaying CPU Usage By Thread and Overall CPU Utilization Click to enlarge ![]() Figure 2. The QNX Momentics System Profiler Displaying CPU Usage and Task Migrations Click to enlarge In Figure 1, the right screenshot shows the QNX Momentics System Profiler displaying the CPU usage of four cores executing an application over a 22 millisecond time interval. This macro-level perspective helps identify opportunities to balance the workload across the system. The left screenshot displays the names of different threads and how much time they spend running on each core. Four threads are highlighted in the bottom half of the shot, and the CPU cycles they consume are shown in the top half. Thread migrations are shown in Figure 2, along with a migration histogram. In conjunction with Figure 1, one can detect whether a thread is efficiently taking advantage of the CPU cycles of all the cores or is perhaps incessantly thrashing among them. Again, this type of visual information helps developers control utilization of key system resources. |








