RFR: 8290834: Improve potentially confusing documentation on collection of profiling information

Dean Long dlong at openjdk.org
Fri Jul 22 01:16:10 UTC 2022


On Thu, 21 Jul 2022 18:36:43 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> Documentation on the MethodData object incorrectly states that it is used when profiling in tiers 0 and 1, when it only does so for tier 0 (Interpreter), while tier 1 (Fully optimizing C1) does not collect any profile data at all. Additionally, the description for the different execution tiers is slightly misleading, as it seems to imply that MethodData is used in tier 3 as well, when profiling with C1 is done through ciMethodData instead. This cleanup attempts to slightly better clarify how profiling is tied together between the Interpreter and C1, explain what MDO is an abbreviation for (MethodData object), and corrects the documentation for MethodData as well.

src/hotspot/share/compiler/compilationPolicy.hpp line 48:

> 46:  * all data from the MDO will be loaded into the ciMethodData when it is first created.
> 47:  * (See ciMethod::method_data() in ciMethod.cpp for more details)
> 48:  *

The ciMethodData is just a temporary snapshot.  Updates to the profiling data is still done through the MethodData.

src/hotspot/share/oops/methodData.hpp line 41:

> 39: 
> 40: // The MethodData object collects counts and other profile information
> 41: // during zeroth-tier (interpreter) execution.

This should probably say levels 0 and 3.

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

PR: https://git.openjdk.org/jdk/pull/9598


More information about the hotspot-dev mailing list