344 bool avoid_promotion_undo() { return _avoid_promotion_undo; } 345 void set_avoid_promotion_undo(bool v) { _avoid_promotion_undo = v; } 346 347 bool survivor_overflow() { return _survivor_overflow; } 348 void set_survivor_overflow(bool v) { _survivor_overflow = v; } 349 350 // Adjust the tenuring threshold. See the implementation for 351 // the details of the policy. 352 virtual void adjust_desired_tenuring_threshold(); 353 354 public: 355 ParNewGeneration(ReservedSpace rs, size_t initial_byte_size, int level); 356 357 ~ParNewGeneration() { 358 for (uint i = 0; i < ParallelGCThreads; i++) 359 delete _task_queues->queue(i); 360 361 delete _task_queues; 362 } 363 364 static bool in_use(); 365 366 virtual void ref_processor_init(); 367 virtual Generation::Name kind() { return Generation::ParNew; } 368 virtual const char* name() const; 369 virtual const char* short_name() const { return "ParNew"; } 370 371 // override 372 virtual bool refs_discovery_is_mt() const { 373 assert(UseParNewGC, "ParNewGeneration only when UseParNewGC"); 374 return ParallelGCThreads > 1; 375 } 376 377 // Make the collection virtual. 378 virtual void collect(bool full, 379 bool clear_all_soft_refs, 380 size_t size, 381 bool is_tlab); 382 383 // This needs to be visible to the closure function. 384 // "obj" is the object to be copied, "m" is a recent value of its mark 385 // that must not contain a forwarding pointer (though one might be | 344 bool avoid_promotion_undo() { return _avoid_promotion_undo; } 345 void set_avoid_promotion_undo(bool v) { _avoid_promotion_undo = v; } 346 347 bool survivor_overflow() { return _survivor_overflow; } 348 void set_survivor_overflow(bool v) { _survivor_overflow = v; } 349 350 // Adjust the tenuring threshold. See the implementation for 351 // the details of the policy. 352 virtual void adjust_desired_tenuring_threshold(); 353 354 public: 355 ParNewGeneration(ReservedSpace rs, size_t initial_byte_size, int level); 356 357 ~ParNewGeneration() { 358 for (uint i = 0; i < ParallelGCThreads; i++) 359 delete _task_queues->queue(i); 360 361 delete _task_queues; 362 } 363 364 virtual void ref_processor_init(); 365 virtual Generation::Name kind() { return Generation::ParNew; } 366 virtual const char* name() const; 367 virtual const char* short_name() const { return "ParNew"; } 368 369 // override 370 virtual bool refs_discovery_is_mt() const { 371 assert(UseParNewGC, "ParNewGeneration only when UseParNewGC"); 372 return ParallelGCThreads > 1; 373 } 374 375 // Make the collection virtual. 376 virtual void collect(bool full, 377 bool clear_all_soft_refs, 378 size_t size, 379 bool is_tlab); 380 381 // This needs to be visible to the closure function. 382 // "obj" is the object to be copied, "m" is a recent value of its mark 383 // that must not contain a forwarding pointer (though one might be |