Skip to main content
Open Access Publications from the University of California

Characterizing Memory Usage Behavior in Memory-related Code Changes

  • Author(s): Wong, Howard Wah
  • Advisor(s): Gaudiot, Jean-Luc
  • et al.

With the heavy memory pressure produced by multi-core systems and with memory per- formance trailing processor performance, today’s application developers need to consider the memory subsystem during software development. In particular, optimizing software re- quires a deep understanding of how the software uses the memory and how the hardware satisfies the memory requests. In order to accelerate development, programmers rely on soft- ware tools such as profilers for insightful analysis. However, current software tools generate analytical results with respect to the lines of code rather than the memory, which hides prevalent memory-related bottlenecks. Thus, there is a need for developing more data- and memory-centric tools that ease the identification of memory-related issues during software development and testing.

In this work, we have sought to ease the process of organizing the information into hints about how the execution affects the memory. Specifically, we have partitioned the execution into contiguous groups of instructions called phases, which represent sequence of instructions that maintains intrinsic characteristics. Previous works on phase detection used Basic Block Vectors (BBVs) to track the frequency of execution of each basic block. These BBVs mainly focused on processor-centric characteristics such as instructions per cycle, cache miss rate, etc. Our work introduces Memory Vectors (MVs), a type of histogram that counts the access frequency of each memory location. Our MVs shift attention towards memory-centric characteristics like locality, working sets, and memory usage patterns. Using these memory vectors, analytical tools would be capable of showcasing the types of behavior modes within the code and also help explain the impact of the programmer’s code changes.

Using Automatically Tuned Linear Algebra Software (ATLAS) as our target application, we explored the effectiveness of using Memory Vectors to examine memory-based program behaviors. We vary the parameters of ATLAS’s basic linear algebra subprograms (BLAS) kernels to mimic memory-based code modifications performed by a programmer. Using 3D projections of the Memory Vector data, we qualitatively check the sensitivity at the routine level of behavioral detection and sensitivity to memory-related changes between MVs and BBVs. To complement the qualitative analysis, we further quantitatively measure the correlation factor between BBV-based clusters with MV-based clusters. By varying the available parameters in ATLAS, we show the potential for the use of MVs to isolate interesting memory-related behaviors during software development.

Main Content
Current View