|
Bug ID:
|
6814552
|
|
Votes
|
0
|
|
Synopsis
|
par compact - some compilers fail to optimize bitmap code
|
|
Category
|
hotspot:garbage_collector
|
|
Reported Against
|
|
|
Release Fixed
|
hs16(b05),
7(b63) (Bug ID:2179584)
|
|
State
|
10-Fix Delivered,
request for enhancement
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
6849716
|
|
Submit Date
|
07-MAR-2009
|
|
Description
|
There is a fairly massive performance degradation on parallel old gc when
running on x86-64/linux. The performance degradation can also be seen in the
recently released 6u14 release from Sun.
The issue is the code that is generated for these functions in file
ParMarkBitMap.hpp:
inline size_t ParMarkBitMap::bits_to_words(idx_t bits) {
return bits * obj_granularity();
}
and
inline ParMarkBitMap::idx_t ParMarkBitMap::words_to_bits(size_t words) {
return words / obj_granularity();
}
In both cases, the value returned by obj_granularity() is 1. However gcc
decides to generate a div instruction when this function is called from
ParMarkBitMap::live_words_in_range().
See openjdk bugzilla bug https://bugs.openjdk.java.net/show_bug.cgi?id=100006
Posted Date : 2009-03-07 00:11:47.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
The g++ compiler failed to optimize away a divide by 1 in code that is important to GC performance. This code has been part of parallel compaction since it's initial release in jdk 5 update 6; it's possible that gcc changes resulted in the regression. Simple fix is to change the code to use explicit shifts.
Posted Date : 2009-06-10 21:55:36.0
Using shift instead of div helps performance, but the more likely cause of the regression is changes to the BitMap class which inadvertently enabled calls to empty verification methods in the product build; see 6849716.
Posted Date : 2009-06-10 21:55:36.0
http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/353ba4575581
Posted Date : 2009-06-14 08:23:52.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|