The Bottom-up page shows the most time consuming functions and the functions with poor CPU utilization are indicated by the red poor bars. Here, you can see the clock function with a red bar throughout the entire duration. The Bottom-up window also shows the other house building tasks and organizes them to show the most CPU time consuming tasks first at the top, all the way to the lowest at the bottom.
- [Voiceover] Clicking on the bottom-up tab at the very top brings us to the bottom-up window. The bottom-up window shows us the most CPU time-consuming functions with red bars. Which means poor CPU utilization. Let's expand the clock function. You can adjust the columns by selecting on the column edge and dragging either to the right or to the left. We can do the same for the bottom window. Selecting the edge of the column and dragging it down. Notice that build frame, brick laying and roofing take up the most time.
At the bottom of this long bar is the applications main thread activity. As indicated by main CRT startup. And below that there are some filtering options that we will revisit when looking at the multi-threaded version results. Now let's right-click on build frame. And select view source from the side menu that pops up. This will take us directly to the line of code where most of the CP time is spent. Once again selecting the edge of the column and dragging it to the right or to the left. We can see more of the source code.
As we can see it takes us to the do work function call inside the build frame task. We are deliberately keeping the CP busy by performing some calculations after build frame has made a clock function call. So this do work function call is the culprit for why build frame is consuming the CPU for the time it is. If we wanted to optimize this, we would optimize the do work function.
- Installing VTune Amplifier
- Exploring the single-threaded source code
- Analyzing single-threaded apps
- Analyzing multithreaded apps
- Identifying hotspots
- Comparing results of single-threaded vs. multithreaded analysis