-
Enhancement
-
Resolution: Fixed
-
P4
-
hs25, 8
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045233 | 8u25 | Thomas Schatzl | P4 | Resolved | Fixed | b01 |
JDK-8035639 | 8u20 | Thomas Schatzl | P4 | Resolved | Fixed | b04 |
JDK-8053237 | emb-8u26 | Thomas Schatzl | P4 | Resolved | Fixed | b17 |
G1 closures are relatively heavyweight; VTune indicates high I-cache misses and DSB switches (DSB is an instruction predecode cache, see also http://software.intel.com/sites/products/documentation/doclib/iss/2013/amplifier/lin/ug_docs/GUID-143D1B76-D97F-454F-9B4B-91F2D791B66D.htm) that indicate that the hot loops are too large.
On the other hand, G1ParCopyClosure::do_oop_work is heavily templatized, and for this reason relatively generic.
Maybe little performance (and the use of templates, i.e. code size!) can be saved by manually extracting duplicate code without destroying maintainability too much. This following patterns have been noticed (inlining some levels for completeness) during a short look:
(1)
oop obj = load_decode_oop(p)
if (...)
store_encode_oop(obj, p)
if (...) {
if (G1DeferredUpdate) {
oop obj = load_decode_oop(p)
[...]
} else {
oop obj = load_decode_oop(p)
}
} else {
}
} else {
}
if (...) {
oop obj = load_decode_oop(p)
}
(2) repeated use of is_in_reserved() and !is_in_reserved() with possibly the intention of a NULL check.
(3) especially the changes in (1) could result in removal of unnecessary template instantiations.
Look and see if anything can be done in particular in this method about that.
On the other hand, G1ParCopyClosure::do_oop_work is heavily templatized, and for this reason relatively generic.
Maybe little performance (and the use of templates, i.e. code size!) can be saved by manually extracting duplicate code without destroying maintainability too much. This following patterns have been noticed (inlining some levels for completeness) during a short look:
(1)
oop obj = load_decode_oop(p)
if (...)
store_encode_oop(obj, p)
if (...) {
if (G1DeferredUpdate) {
oop obj = load_decode_oop(p)
[...]
} else {
oop obj = load_decode_oop(p)
}
} else {
}
} else {
}
if (...) {
oop obj = load_decode_oop(p)
}
(2) repeated use of is_in_reserved() and !is_in_reserved() with possibly the intention of a NULL check.
(3) especially the changes in (1) could result in removal of unnecessary template instantiations.
Look and see if anything can be done in particular in this method about that.
- backported by
-
JDK-8035639 Decrease code size and templatizing in G1ParCopyClosure::do_oop_work
-
- Resolved
-
-
JDK-8045233 Decrease code size and templatizing in G1ParCopyClosure::do_oop_work
-
- Resolved
-
-
JDK-8053237 Decrease code size and templatizing in G1ParCopyClosure::do_oop_work
-
- Resolved
-