src/share/vm/gc_implementation/g1/ptrQueue.hpp

changeset 2469
7e37af9d69ef
parent 2314
f95d63e2154a
child 3416
2ace1c4ee8da
     1.1 --- a/src/share/vm/gc_implementation/g1/ptrQueue.hpp	Thu Jan 13 17:19:21 2011 -0800
     1.2 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.hpp	Wed Jan 19 09:35:17 2011 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -68,7 +68,7 @@
    1.11  public:
    1.12    // Initialize this queue to contain a null buffer, and be part of the
    1.13    // given PtrQueueSet.
    1.14 -  PtrQueue(PtrQueueSet*, bool perm = false, bool active = false);
    1.15 +  PtrQueue(PtrQueueSet* qset, bool perm = false, bool active = false);
    1.16    // Release any contained resources.
    1.17    void flush();
    1.18    // Calls flush() when destroyed.
    1.19 @@ -85,6 +85,14 @@
    1.20      else enqueue_known_active(ptr);
    1.21    }
    1.22  
    1.23 +  // This method is called when we're doing the zero index handling
    1.24 +  // and gives a chance to the queues to do any pre-enqueueing
    1.25 +  // processing they might want to do on the buffer. It should return
    1.26 +  // true if the buffer should be enqueued, or false if enough
    1.27 +  // entries were cleared from it so that it can be re-used. It should
    1.28 +  // not return false if the buffer is still full (otherwise we can
    1.29 +  // get into an infinite loop).
    1.30 +  virtual bool should_enqueue_buffer() { return true; }
    1.31    void handle_zero_index();
    1.32    void locking_enqueue_completed_buffer(void** buf);
    1.33  

mercurial