| Other |
|---|
| tbdUnresolved |
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
In https://bugs.openjdk.org/browse/JDK-8348270?focusedId=14818136&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14818136 some investigation about the costs of clearing the card table (JDK-8367992) and doing batched commits (JDK-8071277) some methods show up in a perf profile:
- 11.10% universe_init() ▒
- 7.03% G1CollectedHeap::initialize() ▒
+ 2.53% G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap*, G1RegionToSpaceMapper*) ▒
+ 1.56% G1CollectedHeap::expand(unsigned long, WorkerThreads*) ▒
+ 0.88% WorkerThreads::initialize_workers() ▒
+ 0.76% ConcurrentGCThread::create_and_start(ThreadPriority) ▒
I.e. concurrent mark initialization (particularly the allocation and resetting of the per-thread mark stats), marking thread initialization shows up.
A nice reproducer would be:
$ java -XX:+UseG1GC -Xms2g -Xmx2g HelloWorld
(or higher heap sizes)
Ideally, initialization of ConcurrentMark should be moved to the first gc starting concurrent mark.