RFR: 8249: Add support for the new allocation profiler in rules [v3]
Carter Kozak
duke at openjdk.org
Tue Sep 10 14:56:48 UTC 2024
> ## 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.
-------------
Changes:
- all: https://git.openjdk.org/jmc/pull/579/files
- new: https://git.openjdk.org/jmc/pull/579/files/c525ec90..d3fe23e0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jmc&pr=579&range=02
- incr: https://webrevs.openjdk.org/?repo=jmc&pr=579&range=01-02
Stats: 1445 lines in 8 files changed: 1101 ins; 314 del; 30 mod
Patch: https://git.openjdk.org/jmc/pull/579.diff
Fetch: git fetch https://git.openjdk.org/jmc.git pull/579/head:pull/579
PR: https://git.openjdk.org/jmc/pull/579
More information about the jmc-dev
mailing list