Relates :
|
|
Relates :
|
|
Relates :
|
The work in JDK-8010862 consolidates counters into one optional structure. Further optimization is desirable. Since the lifetimes of MethodData and MethodCounters are similar, there should be a single pointer. Whichever structure is less frequent could be linked from the more frequent one, or they could be concatenated (which seems the likely thing to do). Please update the comment in the header file that documents the structure; it is currently inaccurate. Consider overloading a "warm-up counter" into the initially NULL _method_counters field. A value of (say) up to 256 could be stored into the pointer field, and instead of a null check, do a range check. That will make many cold yet active methods not create a counter. (Yes, I like this kind of stuff, even if the debuggers hate it. But a debugger will print a small integer pseudo-pointer easily enough.)
|