Download pdf Format
Transcript
user can build, run, and test the system, using the same instructions that would have been used in a normal track. During the compile phase, the symbols PURIFY or QUANTIFY are defined, depending on the track being used. These symbols are added throughout the code to turn on the changes needed for supporting the shared library and tasking support. In the case of Purify, the PURIFY symbol also enables the alternate memory routines. When the symbol QUANTIFY is defined, code is added to disable the recording of data for certain areas of code. All of this code is controlled by enclosing it in either #ifdef QUANTIFY or #ifdef PURIFY directive blocks. The track also sets special compiler options that force the compiler to generate a different code sequence for the switch statement and the ?: construct. These are areas in which the code generated by our internal compiler causes problems in the instrumentation engines for both products. Our compiler is forced to generate more traditional assembler code. During the execution phase, all invocation options that are needed in Purify or Quantify as well as any internal SAS options are set. The user never sees these options, as they are added "under the covers" by the standard SAS toolset used to execute the code. Finally, the SAS System is built nightly on the development platform. Once the tracks were in place for Purify and Quantify, the builds for the products were added to the nightly build process. This allows developers and testers to easily test the latest version of the code with Purify and Quantify. A Worthwhile Investment Integrating both Purify and Quantify with our SAS System was not an easy task, but SAS received help from the products' technical support team and developers along with developers from SAS. The implementation is now transparent to users but gives them the full functionality of Purify and Quantify. The benefits have been substantial. ● ● ● During development, Purify has saved untold time that we used to spend hunting down the source of problems. Our other tools could tell us that memory was being overwritten, but we couldn't pinpoint where. Debugging was a huge binary process that could take days; now it takes minutes or hours. Also, Purify finds problems we didn't know we had; it picks up errors that our internal memory system did not, such as Array Bound Reads (ABRs) and Array Bound Writes (ABWs). So we avoid debugging time later on, too. Ultimately, that means we can get our product to customers much faster. As they write code, developers use Quantify to test and comparison test various algorithms before making a permanent change. If they see big differences in performance, then they know to choose the more efficient option. Now that testers have ready access to Purify for checking new code, we can avoid passing on problems to our customers. Testers run