Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @ 20190:0982ec23da03
8043607: Add a GC id as a log decoration similar to PrintGCTimeStamps
Reviewed-by: jwilhelm, ehelin, tschatzl
author | brutisso |
---|---|
date | Thu, 19 Jun 2014 13:31:14 +0200 |
parents | 8e20ef014b08 |
children | 7848fc12602b f74dbdd45754 |
comparison
equal
deleted
inserted
replaced
20189:5d855d021755 | 20190:0982ec23da03 |
---|---|
329 ResourceMark rm; | 329 ResourceMark rm; |
330 HandleMark hm; | 330 HandleMark hm; |
331 | 331 |
332 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); | 332 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); |
333 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); | 333 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); |
334 GCTraceTime t1(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, NULL); | 334 GCTraceTime t1(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id()); |
335 TraceCollectorStats tcs(counters()); | 335 TraceCollectorStats tcs(counters()); |
336 TraceMemoryManagerStats tms(false /* not full GC */,gc_cause); | 336 TraceMemoryManagerStats tms(false /* not full GC */,gc_cause); |
337 | 337 |
338 if (TraceGen0Time) accumulated_time()->start(); | 338 if (TraceGen0Time) accumulated_time()->start(); |
339 | 339 |
395 PSPromotionManager::pre_scavenge(); | 395 PSPromotionManager::pre_scavenge(); |
396 | 396 |
397 // We'll use the promotion manager again later. | 397 // We'll use the promotion manager again later. |
398 PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager(); | 398 PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager(); |
399 { | 399 { |
400 GCTraceTime tm("Scavenge", false, false, &_gc_timer); | 400 GCTraceTime tm("Scavenge", false, false, &_gc_timer, _gc_tracer.gc_id()); |
401 ParallelScavengeHeap::ParStrongRootsScope psrs; | 401 ParallelScavengeHeap::ParStrongRootsScope psrs; |
402 | 402 |
403 GCTaskQueue* q = GCTaskQueue::create(); | 403 GCTaskQueue* q = GCTaskQueue::create(); |
404 | 404 |
405 if (!old_gen->object_space()->is_empty()) { | 405 if (!old_gen->object_space()->is_empty()) { |
437 | 437 |
438 scavenge_midpoint.update(); | 438 scavenge_midpoint.update(); |
439 | 439 |
440 // Process reference objects discovered during scavenge | 440 // Process reference objects discovered during scavenge |
441 { | 441 { |
442 GCTraceTime tm("References", false, false, &_gc_timer); | 442 GCTraceTime tm("References", false, false, &_gc_timer, _gc_tracer.gc_id()); |
443 | 443 |
444 reference_processor()->setup_policy(false); // not always_clear | 444 reference_processor()->setup_policy(false); // not always_clear |
445 reference_processor()->set_active_mt_degree(active_workers); | 445 reference_processor()->set_active_mt_degree(active_workers); |
446 PSKeepAliveClosure keep_alive(promotion_manager); | 446 PSKeepAliveClosure keep_alive(promotion_manager); |
447 PSEvacuateFollowersClosure evac_followers(promotion_manager); | 447 PSEvacuateFollowersClosure evac_followers(promotion_manager); |
448 ReferenceProcessorStats stats; | 448 ReferenceProcessorStats stats; |
449 if (reference_processor()->processing_is_mt()) { | 449 if (reference_processor()->processing_is_mt()) { |
450 PSRefProcTaskExecutor task_executor; | 450 PSRefProcTaskExecutor task_executor; |
451 stats = reference_processor()->process_discovered_references( | 451 stats = reference_processor()->process_discovered_references( |
452 &_is_alive_closure, &keep_alive, &evac_followers, &task_executor, | 452 &_is_alive_closure, &keep_alive, &evac_followers, &task_executor, |
453 &_gc_timer); | 453 &_gc_timer, _gc_tracer.gc_id()); |
454 } else { | 454 } else { |
455 stats = reference_processor()->process_discovered_references( | 455 stats = reference_processor()->process_discovered_references( |
456 &_is_alive_closure, &keep_alive, &evac_followers, NULL, &_gc_timer); | 456 &_is_alive_closure, &keep_alive, &evac_followers, NULL, &_gc_timer, _gc_tracer.gc_id()); |
457 } | 457 } |
458 | 458 |
459 _gc_tracer.report_gc_reference_stats(stats); | 459 _gc_tracer.report_gc_reference_stats(stats); |
460 | 460 |
461 // Enqueue reference objects discovered during scavenge. | 461 // Enqueue reference objects discovered during scavenge. |
466 reference_processor()->enqueue_discovered_references(NULL); | 466 reference_processor()->enqueue_discovered_references(NULL); |
467 } | 467 } |
468 } | 468 } |
469 | 469 |
470 { | 470 { |
471 GCTraceTime tm("StringTable", false, false, &_gc_timer); | 471 GCTraceTime tm("StringTable", false, false, &_gc_timer, _gc_tracer.gc_id()); |
472 // Unlink any dead interned Strings and process the remaining live ones. | 472 // Unlink any dead interned Strings and process the remaining live ones. |
473 PSScavengeRootsClosure root_closure(promotion_manager); | 473 PSScavengeRootsClosure root_closure(promotion_manager); |
474 StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure); | 474 StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure); |
475 } | 475 } |
476 | 476 |
636 COMPILER2_PRESENT(DerivedPointerTable::update_pointers()); | 636 COMPILER2_PRESENT(DerivedPointerTable::update_pointers()); |
637 | 637 |
638 NOT_PRODUCT(reference_processor()->verify_no_references_recorded()); | 638 NOT_PRODUCT(reference_processor()->verify_no_references_recorded()); |
639 | 639 |
640 { | 640 { |
641 GCTraceTime tm("Prune Scavenge Root Methods", false, false, &_gc_timer); | 641 GCTraceTime tm("Prune Scavenge Root Methods", false, false, &_gc_timer, _gc_tracer.gc_id()); |
642 | 642 |
643 CodeCache::prune_scavenge_root_nmethods(); | 643 CodeCache::prune_scavenge_root_nmethods(); |
644 } | 644 } |
645 | 645 |
646 // Re-verify object start arrays | 646 // Re-verify object start arrays |