hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
changeset 6247 00e5cc407d03
parent 5547 f4b087cbb361
child 6768 71338ecb7813
equal deleted inserted replaced
6246:2b94114ccaa4 6247:00e5cc407d03
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 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.
   121   // is returned to the completed buffer set, and this call returns false.
   121   // is returned to the completed buffer set, and this call returns false.
   122   bool apply_closure_to_completed_buffer(int worker_i = 0,
   122   bool apply_closure_to_completed_buffer(int worker_i = 0,
   123                                          int stop_at = 0,
   123                                          int stop_at = 0,
   124                                          bool during_pause = false);
   124                                          bool during_pause = false);
   125 
   125 
   126   bool apply_closure_to_completed_buffer_helper(int worker_i,
   126   // If there exists some completed buffer, pop it, then apply the
       
   127   // specified closure to all its elements, nulling out those elements
       
   128   // processed.  If all elements are processed, returns "true".  If no
       
   129   // completed buffers exist, returns false.  If a completed buffer exists,
       
   130   // but is only partially completed before a "yield" happens, the
       
   131   // partially completed buffer (with its processed elements set to NULL)
       
   132   // is returned to the completed buffer set, and this call returns false.
       
   133   bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
       
   134                                          int worker_i = 0,
       
   135                                          int stop_at = 0,
       
   136                                          bool during_pause = false);
       
   137 
       
   138   // Helper routine for the above.
       
   139   bool apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
       
   140                                                 int worker_i,
   127                                                 BufferNode* nd);
   141                                                 BufferNode* nd);
   128 
   142 
   129   BufferNode* get_completed_buffer(int stop_at);
   143   BufferNode* get_completed_buffer(int stop_at);
   130 
   144 
   131   // Applies the current closure to all completed buffers,
   145   // Applies the current closure to all completed buffers,
   133   void apply_closure_to_all_completed_buffers();
   147   void apply_closure_to_all_completed_buffers();
   134 
   148 
   135   DirtyCardQueue* shared_dirty_card_queue() {
   149   DirtyCardQueue* shared_dirty_card_queue() {
   136     return &_shared_dirty_card_queue;
   150     return &_shared_dirty_card_queue;
   137   }
   151   }
       
   152 
       
   153   // Deallocate any completed log buffers
       
   154   void clear();
   138 
   155 
   139   // If a full collection is happening, reset partial logs, and ignore
   156   // If a full collection is happening, reset partial logs, and ignore
   140   // completed ones: the full collection will make them all irrelevant.
   157   // completed ones: the full collection will make them all irrelevant.
   141   void abandon_logs();
   158   void abandon_logs();
   142 
   159