--- old/src/share/vm/gc/shared/genOopClosures.hpp 2015-10-21 17:28:36.000000000 +0200 +++ new/src/share/vm/gc/shared/genOopClosures.hpp 2015-10-21 17:28:36.000000000 +0200 @@ -42,7 +42,6 @@ class OopsInGenClosure : public ExtendedOopClosure { private: - Generation* _orig_gen; // generation originally set in ctor Generation* _gen; // generation being scanned protected: @@ -63,22 +62,16 @@ public: OopsInGenClosure() : ExtendedOopClosure(NULL), - _orig_gen(NULL), _gen(NULL), _gen_boundary(NULL), _rs(NULL) {}; + _gen(NULL), _gen_boundary(NULL), _rs(NULL) {}; OopsInGenClosure(Generation* gen); - void set_generation(Generation* gen); - - void reset_generation() { _gen = _orig_gen; } // Problem with static closures: must have _gen_boundary set at some point, // but cannot do this until after the heap is initialized. - void set_orig_generation(Generation* gen) { - _orig_gen = gen; - set_generation(gen); - } + void set_generation(Generation* gen); + void assert_generation(Generation* gen); HeapWord* gen_boundary() { return _gen_boundary; } - }; // Super class for scan closures. It contains code to dirty scanned Klasses.