hotspot/src/share/vm/gc/parallel/psScavenge.cpp
changeset 46795 623a5e42deb6
parent 40096 246c62cd9180
child 46968 9119841280f4
equal deleted inserted replaced
46794:aa0b86e09f9a 46795:623a5e42deb6
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   413       reference_processor()->setup_policy(false); // not always_clear
   413       reference_processor()->setup_policy(false); // not always_clear
   414       reference_processor()->set_active_mt_degree(active_workers);
   414       reference_processor()->set_active_mt_degree(active_workers);
   415       PSKeepAliveClosure keep_alive(promotion_manager);
   415       PSKeepAliveClosure keep_alive(promotion_manager);
   416       PSEvacuateFollowersClosure evac_followers(promotion_manager);
   416       PSEvacuateFollowersClosure evac_followers(promotion_manager);
   417       ReferenceProcessorStats stats;
   417       ReferenceProcessorStats stats;
       
   418       ReferenceProcessorPhaseTimes pt(&_gc_timer, reference_processor()->num_q());
   418       if (reference_processor()->processing_is_mt()) {
   419       if (reference_processor()->processing_is_mt()) {
   419         PSRefProcTaskExecutor task_executor;
   420         PSRefProcTaskExecutor task_executor;
   420         stats = reference_processor()->process_discovered_references(
   421         stats = reference_processor()->process_discovered_references(
   421           &_is_alive_closure, &keep_alive, &evac_followers, &task_executor,
   422           &_is_alive_closure, &keep_alive, &evac_followers, &task_executor,
   422           &_gc_timer);
   423           &pt);
   423       } else {
   424       } else {
   424         stats = reference_processor()->process_discovered_references(
   425         stats = reference_processor()->process_discovered_references(
   425           &_is_alive_closure, &keep_alive, &evac_followers, NULL, &_gc_timer);
   426           &_is_alive_closure, &keep_alive, &evac_followers, NULL, &pt);
   426       }
   427       }
   427 
   428 
   428       _gc_tracer.report_gc_reference_stats(stats);
   429       _gc_tracer.report_gc_reference_stats(stats);
       
   430       pt.print_all_references();
   429 
   431 
   430       // Enqueue reference objects discovered during scavenge.
   432       // Enqueue reference objects discovered during scavenge.
   431       if (reference_processor()->processing_is_mt()) {
   433       if (reference_processor()->processing_is_mt()) {
   432         PSRefProcTaskExecutor task_executor;
   434         PSRefProcTaskExecutor task_executor;
   433         reference_processor()->enqueue_discovered_references(&task_executor);
   435         reference_processor()->enqueue_discovered_references(&task_executor, &pt);
   434       } else {
   436       } else {
   435         reference_processor()->enqueue_discovered_references(NULL);
   437         reference_processor()->enqueue_discovered_references(NULL, &pt);
   436       }
   438       }
       
   439 
       
   440       pt.print_enqueue_phase();
   437     }
   441     }
   438 
   442 
   439     {
   443     {
   440       GCTraceTime(Debug, gc, phases) tm("Scrub String Table", &_gc_timer);
   444       GCTraceTime(Debug, gc, phases) tm("Scrub String Table", &_gc_timer);
   441       // Unlink any dead interned Strings and process the remaining live ones.
   445       // Unlink any dead interned Strings and process the remaining live ones.