Mercurial > hg > truffle
comparison src/share/vm/memory/cardTableModRefBS.hpp @ 3256:c69b1043dfb1
7036482: clear argument is redundant and unused in cardtable methods
Summary: Removed the unused clear argument to various cardtbale methods and unused mod_oop_in_space_iterate method. Unrelated to synopsis, added a pair of clarifying parens in AllocationStats constructor.
Reviewed-by: brutisso, jcoomes
author | ysr |
---|---|
date | Thu, 14 Apr 2011 12:10:15 -0700 |
parents | abdfc822206f |
children | c48ad6ab8bdf |
comparison
equal
deleted
inserted
replaced
3254:59766fd005ff | 3256:c69b1043dfb1 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2011, 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. |
169 // wrap dcto_cl. Both are required - neither may be NULL. Also, dcto_cl | 169 // wrap dcto_cl. Both are required - neither may be NULL. Also, dcto_cl |
170 // may be modified. Note that this function will operate in a parallel | 170 // may be modified. Note that this function will operate in a parallel |
171 // mode if worker threads are available. | 171 // mode if worker threads are available. |
172 void non_clean_card_iterate(Space* sp, MemRegion mr, | 172 void non_clean_card_iterate(Space* sp, MemRegion mr, |
173 DirtyCardToOopClosure* dcto_cl, | 173 DirtyCardToOopClosure* dcto_cl, |
174 MemRegionClosure* cl, | 174 MemRegionClosure* cl); |
175 bool clear); | |
176 | 175 |
177 // Utility function used to implement the other versions below. | 176 // Utility function used to implement the other versions below. |
178 void non_clean_card_iterate_work(MemRegion mr, MemRegionClosure* cl, | 177 void non_clean_card_iterate_work(MemRegion mr, MemRegionClosure* cl); |
179 bool clear); | |
180 | 178 |
181 void par_non_clean_card_iterate_work(Space* sp, MemRegion mr, | 179 void par_non_clean_card_iterate_work(Space* sp, MemRegion mr, |
182 DirtyCardToOopClosure* dcto_cl, | 180 DirtyCardToOopClosure* dcto_cl, |
183 MemRegionClosure* cl, | 181 MemRegionClosure* cl, |
184 bool clear, | |
185 int n_threads); | 182 int n_threads); |
186 | 183 |
187 // Dirty the bytes corresponding to "mr" (not all of which must be | 184 // Dirty the bytes corresponding to "mr" (not all of which must be |
188 // covered.) | 185 // covered.) |
189 void dirty_MemRegion(MemRegion mr); | 186 void dirty_MemRegion(MemRegion mr); |
239 void process_stride(Space* sp, | 236 void process_stride(Space* sp, |
240 MemRegion used, | 237 MemRegion used, |
241 jint stride, int n_strides, | 238 jint stride, int n_strides, |
242 DirtyCardToOopClosure* dcto_cl, | 239 DirtyCardToOopClosure* dcto_cl, |
243 MemRegionClosure* cl, | 240 MemRegionClosure* cl, |
244 bool clear, | |
245 jbyte** lowest_non_clean, | 241 jbyte** lowest_non_clean, |
246 uintptr_t lowest_non_clean_base_chunk_index, | 242 uintptr_t lowest_non_clean_base_chunk_index, |
247 size_t lowest_non_clean_chunk_size); | 243 size_t lowest_non_clean_chunk_size); |
248 | 244 |
249 // Makes sure that chunk boundaries are handled appropriately, by | 245 // Makes sure that chunk boundaries are handled appropriately, by |
400 | 396 |
401 // ModRefBS functions. | 397 // ModRefBS functions. |
402 virtual void invalidate(MemRegion mr, bool whole_heap = false); | 398 virtual void invalidate(MemRegion mr, bool whole_heap = false); |
403 void clear(MemRegion mr); | 399 void clear(MemRegion mr); |
404 void dirty(MemRegion mr); | 400 void dirty(MemRegion mr); |
405 void mod_oop_in_space_iterate(Space* sp, OopClosure* cl, | |
406 bool clear = false, | |
407 bool before_save_marks = false); | |
408 | 401 |
409 // *** Card-table-RemSet-specific things. | 402 // *** Card-table-RemSet-specific things. |
410 | 403 |
411 // Invoke "cl.do_MemRegion" on a set of MemRegions that collectively | 404 // Invoke "cl.do_MemRegion" on a set of MemRegions that collectively |
412 // includes all the modified cards (expressing each card as a | 405 // includes all the modified cards (expressing each card as a |
413 // MemRegion). Thus, several modified cards may be lumped into one | 406 // MemRegion). Thus, several modified cards may be lumped into one |
414 // region. The regions are non-overlapping, and are visited in | 407 // region. The regions are non-overlapping, and are visited in |
415 // *decreasing* address order. (This order aids with imprecise card | 408 // *decreasing* address order. (This order aids with imprecise card |
416 // marking, where a dirty card may cause scanning, and summarization | 409 // marking, where a dirty card may cause scanning, and summarization |
417 // marking, of objects that extend onto subsequent cards.) | 410 // marking, of objects that extend onto subsequent cards.) |
418 // If "clear" is true, the card is (conceptually) marked unmodified before | 411 void mod_card_iterate(MemRegionClosure* cl) { |
419 // applying the closure. | 412 non_clean_card_iterate_work(_whole_heap, cl); |
420 void mod_card_iterate(MemRegionClosure* cl, bool clear = false) { | |
421 non_clean_card_iterate_work(_whole_heap, cl, clear); | |
422 } | 413 } |
423 | 414 |
424 // Like the "mod_cards_iterate" above, except only invokes the closure | 415 // Like the "mod_cards_iterate" above, except only invokes the closure |
425 // for cards within the MemRegion "mr" (which is required to be | 416 // for cards within the MemRegion "mr" (which is required to be |
426 // card-aligned and sized.) | 417 // card-aligned and sized.) |
427 void mod_card_iterate(MemRegion mr, MemRegionClosure* cl, | 418 void mod_card_iterate(MemRegion mr, MemRegionClosure* cl) { |
428 bool clear = false) { | 419 non_clean_card_iterate_work(mr, cl); |
429 non_clean_card_iterate_work(mr, cl, clear); | |
430 } | 420 } |
431 | 421 |
432 static uintx ct_max_alignment_constraint(); | 422 static uintx ct_max_alignment_constraint(); |
433 | 423 |
434 // Apply closure "cl" to the dirty cards containing some part of | 424 // Apply closure "cl" to the dirty cards containing some part of |