383 if (now < _time_of_last_gc) { 384 log_warning(gc)("time warp: " JLONG_FORMAT " to " JLONG_FORMAT, _time_of_last_gc, now); 385 } 386 ) 387 return _time_of_last_gc; 388 } 389 390 virtual void update_time_of_last_gc(jlong now) { 391 _time_of_last_gc = now; 392 } 393 394 // Generations may keep statistics about collection. This method 395 // updates those statistics. current_generation is the generation 396 // that was most recently collected. This allows the generation to 397 // decide what statistics are valid to collect. For example, the 398 // generation can decide to gather the amount of promoted data if 399 // the collection of the young generation has completed. 400 GCStats* gc_stats() const { return _gc_stats; } 401 virtual void update_gc_stats(Generation* current_generation, bool full) {} 402 403 // Mark sweep support phase2 404 virtual void prepare_for_compaction(CompactPoint* cp); 405 // Mark sweep support phase3 406 virtual void adjust_pointers(); 407 // Mark sweep support phase4 408 virtual void compact(); 409 virtual void post_compact() { ShouldNotReachHere(); } 410 411 // Support for CMS's rescan. In this general form we return a pointer 412 // to an abstract object that can be used, based on specific previously 413 // decided protocols, to exchange information between generations, 414 // information that may be useful for speeding up certain types of 415 // garbage collectors. A NULL value indicates to the client that 416 // no data recording is expected by the provider. The data-recorder is 417 // expected to be GC worker thread-local, with the worker index 418 // indicated by "thr_num". 419 virtual void* get_data_recorder(int thr_num) { return NULL; } 420 virtual void sample_eden_chunk() {} 421 422 // Some generations may require some cleanup actions before allowing 423 // a verification. 424 virtual void prepare_for_verify() {} 425 426 // Accessing "marks". 427 428 // This function gives a generation a chance to note a point between 429 // collections. For example, a contiguous generation might note the | 383 if (now < _time_of_last_gc) { 384 log_warning(gc)("time warp: " JLONG_FORMAT " to " JLONG_FORMAT, _time_of_last_gc, now); 385 } 386 ) 387 return _time_of_last_gc; 388 } 389 390 virtual void update_time_of_last_gc(jlong now) { 391 _time_of_last_gc = now; 392 } 393 394 // Generations may keep statistics about collection. This method 395 // updates those statistics. current_generation is the generation 396 // that was most recently collected. This allows the generation to 397 // decide what statistics are valid to collect. For example, the 398 // generation can decide to gather the amount of promoted data if 399 // the collection of the young generation has completed. 400 GCStats* gc_stats() const { return _gc_stats; } 401 virtual void update_gc_stats(Generation* current_generation, bool full) {} 402 403 #if INCLUDE_SERIALGC 404 // Mark sweep support phase2 405 virtual void prepare_for_compaction(CompactPoint* cp); 406 // Mark sweep support phase3 407 virtual void adjust_pointers(); 408 // Mark sweep support phase4 409 virtual void compact(); 410 virtual void post_compact() { ShouldNotReachHere(); } 411 #endif 412 413 // Support for CMS's rescan. In this general form we return a pointer 414 // to an abstract object that can be used, based on specific previously 415 // decided protocols, to exchange information between generations, 416 // information that may be useful for speeding up certain types of 417 // garbage collectors. A NULL value indicates to the client that 418 // no data recording is expected by the provider. The data-recorder is 419 // expected to be GC worker thread-local, with the worker index 420 // indicated by "thr_num". 421 virtual void* get_data_recorder(int thr_num) { return NULL; } 422 virtual void sample_eden_chunk() {} 423 424 // Some generations may require some cleanup actions before allowing 425 // a verification. 426 virtual void prepare_for_verify() {} 427 428 // Accessing "marks". 429 430 // This function gives a generation a chance to note a point between 431 // collections. For example, a contiguous generation might note the |