Patent attributes
Embodiments profile usage of memory and other resources. Stack traces have lifespans, resource impacts, and constituent call chains. Aggregation unifies shared call chains and sums resource impacts after assigning traces to snapshot sets based on trace lifespans and user-defined snapshot request timestamps. Traces are assigned using either active aggregation or precursor aggregation. Traces spanning a snapshot request may be split. A sampled resource trace lifespan begins when the resource is sampled and ends at the next snapshot request. An allocated resource trace lifespan begins when a portion of the resource is allocated and ends when the allocated portion is freed. Resource portions not yet freed are implicitly freed when program execution ends. Call chain interval resource impact aggregation performed with multiple snapshot requests and stack trace sets creates snapshot aggregations. Two aggregations are differenced by subtracting the summed call chain resource impacts of one aggregation from those of another aggregation.