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

Marcus Hirt hirt at openjdk.org
Wed Sep 25 17:12:46 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.

Sorry about the delay! :)

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

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


More information about the jmc-dev mailing list