Skip to content

Commit 0ca5cb1

Browse files
TheShermanTankerdean-long
authored andcommitted
8290834: Improve potentially confusing documentation on collection of profiling information
Reviewed-by: thartmann, kvn, dlong
1 parent 7c3cfd1 commit 0ca5cb1

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

src/hotspot/share/c1/c1_globals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
"Use CHA and exact type results at call sites when updating MDOs")\
315315
\
316316
product(bool, C1UpdateMethodData, true, \
317-
"Update MethodData*s in Tier1-generated code") \
317+
"Update MethodData*s in Tier 3 C1 generated code") \
318318
\
319319
develop(bool, PrintCFGToFile, false, \
320320
"print control flow graph to a separate file during compilation")

src/hotspot/share/compiler/compilationPolicy.hpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,20 @@ class CompileTask;
3434
class CompileQueue;
3535
/*
3636
* The system supports 5 execution levels:
37-
* * level 0 - interpreter
37+
* * level 0 - interpreter (Profiling is tracked by a MethodData object, or MDO in short)
3838
* * level 1 - C1 with full optimization (no profiling)
3939
* * level 2 - C1 with invocation and backedge counters
40-
* * level 3 - C1 with full profiling (level 2 + MDO)
41-
* * level 4 - C2
40+
* * level 3 - C1 with full profiling (level 2 + All other MDO profiling information)
41+
* * level 4 - C2 with full profile guided optimization
42+
*
43+
* The MethodData object is created by both the interpreter or either compiler to store any
44+
* profiling information collected on a method (ciMethod::ensure_method_data() for C1 and C2
45+
* and CompilationPolicy::create_mdo() for the interpreter). Both the interpreter and code
46+
* compiled by C1 at level 3 will constantly update profiling information in the MDO during
47+
* execution. The information in the MDO is then used by C1 and C2 during compilation, via
48+
* the compiler interface (ciMethodXXX).
49+
* See ciMethod.cpp and ciMethodData.cpp for information transfer from an MDO to the compilers
50+
* through the compiler interface.
4251
*
4352
* Levels 0, 2 and 3 periodically notify the runtime about the current value of the counters
4453
* (invocation counters and backedge counters). The frequency of these notifications is

src/hotspot/share/oops/methodData.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
class BytecodeStream;
3939

4040
// The MethodData object collects counts and other profile information
41-
// during zeroth-tier (interpretive) and first-tier execution.
41+
// during zeroth-tier (interpreter) and third-tier (C1 with full profiling)
42+
// execution.
43+
//
4244
// The profile is used later by compilation heuristics. Some heuristics
4345
// enable use of aggressive (or "heroic") optimizations. An aggressive
4446
// optimization often has a down-side, a corner case that it handles

0 commit comments

Comments
 (0)