Skip to content


Browse files Browse the repository at this point in the history
8254015: copy_to_survivor_space should use in-hand klass for scanning
Reviewed-by: tschatzl, sjohanss, ayang
  • Loading branch information
Kim Barrett committed Oct 8, 2020
1 parent 76a5852 commit 66f27b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
Expand Up @@ -524,7 +524,7 @@ oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const regio

G1ScanInYoungSetter x(&_scanner, dest_attr.is_young());
obj->oop_iterate_backwards(&_scanner, klass);
return obj;

} else {
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/share/oops/oop.hpp
Expand Up @@ -277,6 +277,9 @@ class oopDesc {
template <typename OopClosureType>
inline void oop_iterate_backwards(OopClosureType* cl);

template <typename OopClosureType>
inline void oop_iterate_backwards(OopClosureType* cl, Klass* klass);

inline static bool is_instanceof_or_null(oop obj, Klass* klass);

// identity hash; returns the identity hash key (computes it if necessary)
Expand Down
8 changes: 7 additions & 1 deletion src/hotspot/share/oops/oop.inline.hpp
Expand Up @@ -357,7 +357,13 @@ int oopDesc::oop_iterate_size(OopClosureType* cl, MemRegion mr) {

template <typename OopClosureType>
void oopDesc::oop_iterate_backwards(OopClosureType* cl) {
OopIteratorClosureDispatch::oop_oop_iterate_backwards(cl, this, klass());
oop_iterate_backwards(cl, klass());

template <typename OopClosureType>
void oopDesc::oop_iterate_backwards(OopClosureType* cl, Klass* k) {
assert(k == klass(), "wrong klass");
OopIteratorClosureDispatch::oop_oop_iterate_backwards(cl, this, k);

bool oopDesc::is_instanceof_or_null(oop obj, Klass* klass) {
Expand Down

1 comment on commit 66f27b5

Copy link

@bridgekeeper bridgekeeper bot commented on 66f27b5 Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.