104 105 stat.mark_exec(); 106 107 // Process the queue 108 for (;;) { 109 oop java_string = G1StringDedupQueue::pop(); 110 if (java_string == NULL) { 111 break; 112 } 113 114 G1StringDedupTable::deduplicate(java_string, stat); 115 116 // Safepoint this thread if needed 117 if (sts_join.should_yield()) { 118 stat.mark_block(); 119 sts_join.yield(); 120 stat.mark_unblock(); 121 } 122 } 123 124 G1StringDedupTable::trim_entry_cache(); 125 126 stat.mark_done(); 127 128 // Print statistics 129 total_stat.add(stat); 130 print(stat, total_stat); 131 } 132 } 133 134 } 135 136 void G1StringDedupThread::stop_service() { 137 G1StringDedupQueue::cancel_wait(); 138 } 139 140 void G1StringDedupThread::print(const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat) { 141 if (log_is_enabled(Info, gc, stringdedup)) { 142 G1StringDedupStat::print_summary(last_stat, total_stat); 143 if (log_is_enabled(Debug, gc, stringdedup)) { 144 G1StringDedupStat::print_statistics(last_stat, false); 145 G1StringDedupStat::print_statistics(total_stat, true); 146 G1StringDedupTable::print_statistics(); 147 G1StringDedupQueue::print_statistics(); 148 } 149 } 150 } | 104 105 stat.mark_exec(); 106 107 // Process the queue 108 for (;;) { 109 oop java_string = G1StringDedupQueue::pop(); 110 if (java_string == NULL) { 111 break; 112 } 113 114 G1StringDedupTable::deduplicate(java_string, stat); 115 116 // Safepoint this thread if needed 117 if (sts_join.should_yield()) { 118 stat.mark_block(); 119 sts_join.yield(); 120 stat.mark_unblock(); 121 } 122 } 123 124 stat.mark_done(); 125 126 // Print statistics 127 total_stat.add(stat); 128 print(stat, total_stat); 129 } 130 131 G1StringDedupTable::clean_entry_cache(); 132 } 133 } 134 135 void G1StringDedupThread::stop_service() { 136 G1StringDedupQueue::cancel_wait(); 137 } 138 139 void G1StringDedupThread::print(const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat) { 140 if (log_is_enabled(Info, gc, stringdedup)) { 141 G1StringDedupStat::print_summary(last_stat, total_stat); 142 if (log_is_enabled(Debug, gc, stringdedup)) { 143 G1StringDedupStat::print_statistics(last_stat, false); 144 G1StringDedupStat::print_statistics(total_stat, true); 145 G1StringDedupTable::print_statistics(); 146 G1StringDedupQueue::print_statistics(); 147 } 148 } 149 } |