Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp @ 1665:a93a9eda13f7
6962947: shared TaskQueue statistics
Reviewed-by: tonyp, ysr
author | jcoomes |
---|---|
date | Fri, 16 Jul 2010 21:33:21 -0700 |
parents | c18cbe5936b8 |
children | 9d7a8ab3736b |
comparison
equal
deleted
inserted
replaced
1657:1a1ce2076047 | 1665:a93a9eda13f7 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 2010, 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. |
146 int random_seed = 17; | 146 int random_seed = 17; |
147 if (pm->depth_first()) { | 147 if (pm->depth_first()) { |
148 while(true) { | 148 while(true) { |
149 StarTask p; | 149 StarTask p; |
150 if (PSPromotionManager::steal_depth(which, &random_seed, p)) { | 150 if (PSPromotionManager::steal_depth(which, &random_seed, p)) { |
151 #if PS_PM_STATS | 151 TASKQUEUE_STATS_ONLY(pm->record_steal(p)); |
152 pm->increment_steals(p); | |
153 #endif // PS_PM_STATS | |
154 pm->process_popped_location_depth(p); | 152 pm->process_popped_location_depth(p); |
155 pm->drain_stacks_depth(true); | 153 pm->drain_stacks_depth(true); |
156 } else { | 154 } else { |
157 if (terminator()->offer_termination()) { | 155 if (terminator()->offer_termination()) { |
158 break; | 156 break; |
161 } | 159 } |
162 } else { | 160 } else { |
163 while(true) { | 161 while(true) { |
164 oop obj; | 162 oop obj; |
165 if (PSPromotionManager::steal_breadth(which, &random_seed, obj)) { | 163 if (PSPromotionManager::steal_breadth(which, &random_seed, obj)) { |
166 #if PS_PM_STATS | |
167 pm->increment_steals(); | |
168 #endif // PS_PM_STATS | |
169 obj->copy_contents(pm); | 164 obj->copy_contents(pm); |
170 pm->drain_stacks_breadth(true); | 165 pm->drain_stacks_breadth(true); |
171 } else { | 166 } else { |
172 if (terminator()->offer_termination()) { | 167 if (terminator()->offer_termination()) { |
173 break; | 168 break; |