A simple application that simulates the tasks it takes to build a house. House building involves pouring the foundation, electrical wiring, plumbing and many other tedious tasks. This application performs each task sequentially one at a time which means the house is going to take a while to build. You will see how this causes more CPU usage, followed by call stack walking to find the task which takes the longest. By the end of this course you will see an improved version of the house building application where task parallelism is introduced and how to inspect call stacks and CPU usage for comparison.
- [Narrator] We're going to perform CPU analysis…on a Win32 console application that simulates…building a house.…If you don't have access to the Exercise Files,…you're going to want to make your own Win32…console application project in Visual Studio 2015.…House building involves pouring the foundation,…electrical wiring, plumbing, and other typical tasks.…To simulate the time these tasks need to complete,…our program counts through a calculated number…of CPU cycles.…As in real life, the time required for the program…to complete each task may not be the same…across all tasks.…
For example, pouring the foundation keeps the CPU busy…for one second, whereas roofing takes three seconds.…We'll look at the source code in the following video.…Now, let's look at the structure…of the house building application.…The first tasks that can be executed…are PourFoundation…and PourDriveway.…BuildFrame can't be executed…until PourFoundation is completed.…And you can't start roofing until you have…a frame built for the house.…Roofing, Plumbing, and BrickLaying…
- Looking at single-threaded source code
- Collecting CPU data
- Call-stack walking
- Inspecting thread activity
- Transforming a single-threaded app into a multithreaded app