Abstract
Performance bugs, characterized by pathological slowdowns on specific inputs, are notoriously difficult to diagnose using traditional debugging tools. We present DPDEBUGGER, a tool that automates the identification of these bugs by comparing program traces. DPDEBUGGER utilizes a novel structure called Discriminant Regression Trees (DRTs), which decouple the functional clustering of execution behaviors from the classification of internal program states. This approach allows for the generation of concise, human-readable explanations of performance anomalies. Our evaluation on real-world Java applications demonstrates that DPDEBUGGER identifies known bugs with high accuracy and significantly lower computational overhead than existing regression tree methods.
Introduction
Performance debugging addresses the "differential performance problem": why does one set of inputs cause a program to run significantly slower than another, even when input sizes are comparable? Standard tools like static analyzers and dynamic profilers are often insufficient. Static analysis focuses on logic, while profilers analyze individual traces without comparing them to identify diverging performance trends. Traditional regression trees, while capable of modeling performance, often produce overly complex trees that are difficult for developers to interpret.
Methodology: Discriminant Regression Trees
DPDEBUGGER introduces Discriminant Regression Trees (DRTs) to provide clear explanations of performance bugs. The construction of a DRT involves two primary steps: functional clustering and decision tree learning.
Functional Clustering
The core innovation lies in grouping execution traces based on their functional relationship rather than simple point proximity. The goal is to identify clusters of traces that follow similar performance trends (e.g., linear vs. exponential). To achieve this, the authors developed a novel alignment kernel for spectral clustering.
As shown in Figure 4, the alignment kernel considers two points similar if the line passing through them captures many other data points. This approach effectively detects linear trends amidst noise, allowing the system to distinguish between "fast" and "slow" execution paths based on their asymptotic behavior.
Decision Tree Learning
Once traces are clustered into performance classes (e.g., "the fast group" and "the slow group"), DPDEBUGGER uses standard decision tree learners (like CART) to identify "auxiliary variables"—such as function call counts or internal state changes—that best separate these clusters. By separating the clustering (finding the performance classes) from the classification (explaining them), the tool avoids the high computational cost of traditional regression tree algorithms while ensuring the resulting tree nodes correspond to meaningful program internals.
Experimental Evaluation
The researchers evaluated DPDEBUGGER using synthetic microbenchmarks and eight popular open-source Java projects, including Apache FOP, JFreeChart, Apache POI, and Ode4j.
Results and Interpretability
DPDEBUGGER demonstrated remarkable efficiency. On large benchmarks where traditional algorithms like "GUIDE" took over 9 hours, DPDEBUGGER completed the analysis in under 5 minutes. Furthermore, the resulting trees are highly interpretable. For a known bug in Apache FOP, while standard tools generated trees with thousands of nodes, DPDEBUGGER produced a tree with only two internal nodes, accurately pinpointing the slowdown to a specific color profile deflation step and image dimension overflows.
As illustrated in Figure 6, the tool consistently identified distinct performance clusters across various applications and provided concise DRTs that explain the divergence in execution time based on internal function calls. Classification accuracies across these real-world apps ranged between 85% and 100%.
Discussion and Limitations
DPDEBUGGER's success stems from its prioritization of human-readable explanations and the realization that performance debugging is about identifying trend lines rather than individual data points. However, the current implementation has limitations, such as a bias toward linear relationships and an assumption of deterministic internal states. Future work may involve extending the framework to handle non-linear algorithmic complexities and non-deterministic systems, as well as applying these techniques to other resources like memory usage over time.
Summary updated