by John O (Intel)
DreamWorks Animation seeks to thread complex rendering applications that were written before threading was commonplace. This article shows a technique to find and fix thread safety issues by executing legacy code in a threaded test harness and monitoring execution with Intel developer tools.
Our engineering engagement with DreamWorks Animation involved introducing thread parallelism in performance critical regions of various applications. There are literally hundreds of libraries developed by DreamWorks Animation. During parallelization, we discovered that some of these libraries were not thread safe and had to be addressed first before we could continue our work. Here I describe a methodology developed working with DreamWorks Animation to investigate thread safety issues using Intel® software development tools. I’ll discuss how to effectively use the tools together and highlight features that are useful when analyzing serial code to determine if it can be safely executed in parallel. The tools described are available in Intel® Parallel Studio XE 2011and include:
* Intel® Inspector XE 2011 (Formerly Intel® Thread Checker),
* Threading diagnostics available in the Intel® C++ Compiler, and
* Code coverage tool provided with Intel® C++ Compiler.