Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp @ 20762:c2844108a708
Merge
author | asaha |
---|---|
date | Thu, 23 Oct 2014 12:02:08 -0700 |
parents | 570cb6369f17 42c091d63c72 |
children |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp Wed Oct 22 11:18:17 2014 -0700 +++ b/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp Thu Oct 23 12:02:08 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,13 @@ // active field set to true. PtrQueue(qset_, perm, true /* active */) { } + // Flush before destroying; queue may be used to capture pending work while + // doing something else, with auto-flush on completion. + ~DirtyCardQueue() { if (!is_permanent()) flush(); } + + // Process queue entries and release resources. + void flush() { flush_impl(); } + // Apply the closure to all elements, and reset the index to make the // buffer empty. If a closure application returns "false", return // "false" immediately, halting the iteration. If "consume" is true,