Audience
Researchers, practitioners, and students interested in performace analysis and tuning.
Overview
Complex code bases with several layers of abstractions have abundant inefficiencies that affect the execution time. Inefficiencies arise from myriad causes such as developer's inattention to performance, inappropriate choice of abstractions, algorithms and data structures, ineffective or detrimental compiler optimizations, among others. Not all inefficiencies are easy to detect or eliminate with compiler optimization; compilers have inherent limitations of static analysis and optimization scope. Classical "hotspot" performance analysis tools are also incapable of identifying many kinds of software inefficiencies. Microscopic observation of whole executions at instruction- and operand-level granularity breaks down abstractions and helps recognize inefficiencies that masquerade in complex programs.
Intel's Pin is a dynamic binary-instrumentation tool widely used in microscopic program introspection such as performance analysis, debugging, software security, among others. Delivering deep insights about executions requires attributing runtime measurements to execution contexts--primarily the calling context. A detailed call path attribution of execution measurements enhances a tool's capability and usability. Pin, however, lacks a native API to collect calling context on an event of interest. Moreover, fine-grain tools such as a data-race detector may require storing call paths on every instruction, which can result in a deluge of call paths.
In this tutorial, we will introduce CCTLib, a library for efficiently collecting execution-wide call paths and associating execution metrics with call paths in any Pin tool. CCTLib is simple to use and effective in improving a Pin-tool's diagnostic capabilities. We introduce simple, yet effective, CCTLib APIs that offer rich calling context capabilities for Pin tools. We will introduce advanced CCTlib features for attributing every memory access to the corresponding data object in the program. We will introduce CCTLib internals for advanced users. We will show example Pin tools for detecting certain classes of software inefficiencies such as dead stores and redundant computations. Using CCTLib for these clients, we will show how one can pinpoint software inefficiencies in large, complex code bases and show how one can gain a superior understanding of execution profiles. Using CCTLib's pinpointing capabilities we show how one can tune their code to eliminate inefficiencies and obtain significant performance improvements. Finally, we will show an emerging GUI for CCTLib, which facilitates intuitive visualization of huge amounts of data obtained from fine-grained analysis.
Organizers
Questions
For questions about this tutorial please contact Xu Liu and Milind Chabbi.
Related Publications
Program
Start from 8:30 AM
2017
College of William and Mary