Integrated: 8249: Add support for the new allocation profiler in rules

Carter Kozak duke at openjdk.org
Wed Sep 25 17:12:46 UTC 2024


On Thu, 22 Aug 2024 20:50:58 GMT, Carter Kozak <duke at openjdk.org> wrote:

> ## Allocation Rules may use ObjectAllocationSample
> 
> The allocation profiling rules (`AllocationByClassRule`, `AllocationByThreadRule`, `AutoBoxingRule`) were developed prior to the introduction of the newer and less invasive ObjectAllocationSample event. I've updated these rules to prefer the more precise events, but when those are unavailable, use the new ObjectAllocationSample events instead. This proved a bit tricky because the rules are scored based on number of events sampled, where the new events may not be emitted for every tlab based on a rate limit, so we must take into account the sample weight and estimate the number of samples as best we can.
> 
> The `IRule#getRequiredEvents` API doesn't provide a way to declare _either_ dependencies, so I opted to remove the dependencies in favor of a similar check in the `getResult` implementation.

This pull request has now been integrated.

Changeset: 4590de6e
Author:    Carter Kozak <ckozak at palantir.com>
Committer: Marcus Hirt <hirt at openjdk.org>
URL:       https://git.openjdk.org/jmc/commit/4590de6ed7081b1de800d03e413ef1843f8c2613
Stats:     1342 lines in 11 files changed: 1252 ins; 42 del; 48 mod

8249: Add support for the new allocation profiler in rules

Reviewed-by: hirt

-------------

PR: https://git.openjdk.org/jmc/pull/579


More information about the jmc-dev mailing list