RFR: 8249: Add support for the new allocation profiler in rules [v3]

duke duke at openjdk.org
Thu Sep 12 19:18:11 UTC 2024


On Tue, 10 Sep 2024 14:56:48 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.
>
> Carter Kozak has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - update JfrRuleBaseline.xml
>  - Remove dynamic profiling code in favor of matching existing tests
>    
>    This adds four new recordings to teh set of committed resources,
>    which include roughly equivalent recordings using allocation samples
>    and allocation in new tlab/outside of tlab events to ensure
>    consistency.

@carterkozak 
Your change (at version d3fe23e0c0098d1b37fb86c06d823596e17a50c7) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jmc/pull/579#issuecomment-2347055661


More information about the jmc-dev mailing list