equal
deleted
inserted
replaced
333 } |
333 } |
334 } else { |
334 } else { |
335 VM_MarkActiveNMethods op; |
335 VM_MarkActiveNMethods op; |
336 VMThread::execute(&op); |
336 VMThread::execute(&op); |
337 } |
337 } |
338 _should_sweep = true; |
|
339 } |
338 } |
340 } |
339 } |
341 |
340 |
342 void NMethodSweeper::sweeper_loop() { |
341 void NMethodSweeper::sweeper_loop() { |
343 bool timeout; |
342 bool timeout; |
450 // Force stack scanning if there is only 10% free space in the code cache. |
449 // Force stack scanning if there is only 10% free space in the code cache. |
451 // We force stack scanning only if the non-profiled code heap gets full, since critical |
450 // We force stack scanning only if the non-profiled code heap gets full, since critical |
452 // allocations go to the non-profiled heap and we must be make sure that there is |
451 // allocations go to the non-profiled heap and we must be make sure that there is |
453 // enough space. |
452 // enough space. |
454 double free_percent = 1 / CodeCache::reverse_free_ratio(CodeBlobType::MethodNonProfiled) * 100; |
453 double free_percent = 1 / CodeCache::reverse_free_ratio(CodeBlobType::MethodNonProfiled) * 100; |
455 if (free_percent <= StartAggressiveSweepingAt) { |
454 if (free_percent <= StartAggressiveSweepingAt || forced || _should_sweep) { |
456 do_stack_scanning(); |
455 do_stack_scanning(); |
457 } |
456 } |
458 |
457 |
459 if (_should_sweep || forced) { |
458 if (_should_sweep || forced) { |
460 init_sweeper_log(); |
459 init_sweeper_log(); |