comparison src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp @ 1090:fa357420e7d2

6899058: G1: Internal error in ptrQueue.cpp:201 in nightly tests Summary: Fixes a race on the dirty card queue completed buffer list between worker thread(s) performing a flush of a deferred store barrier (enqueueing a newly completed buffer) and worker thread(s) in the RSet updating code claiming completed buffers. Removed the routine that removes elements from the completed update buffer queue using a CAS. Reviewed-by: ysr, tonyp
author johnc
date Tue, 24 Nov 2009 15:19:30 -0800
parents 4f360ec815ba
children 44f61c24ddab
comparison
equal deleted inserted replaced
1089:db0d5eba9d20 1090:fa357420e7d2
1 /* 1 /*
2 * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2001-2009 Sun Microsystems, Inc. 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.
118 // but is only partially completed before a "yield" happens, the 118 // but is only partially completed before a "yield" happens, the
119 // partially completed buffer (with its processed elements set to NULL) 119 // partially completed buffer (with its processed elements set to NULL)
120 // is returned to the completed buffer set, and this call returns false. 120 // is returned to the completed buffer set, and this call returns false.
121 bool apply_closure_to_completed_buffer(int worker_i = 0, 121 bool apply_closure_to_completed_buffer(int worker_i = 0,
122 int stop_at = 0, 122 int stop_at = 0,
123 bool with_CAS = false); 123 bool during_pause = false);
124
124 bool apply_closure_to_completed_buffer_helper(int worker_i, 125 bool apply_closure_to_completed_buffer_helper(int worker_i,
125 CompletedBufferNode* nd); 126 CompletedBufferNode* nd);
126 127
127 CompletedBufferNode* get_completed_buffer_CAS(); 128 CompletedBufferNode* get_completed_buffer(int stop_at);
128 CompletedBufferNode* get_completed_buffer_lock(int stop_at); 129
129 // Applies the current closure to all completed buffers, 130 // Applies the current closure to all completed buffers,
130 // non-consumptively. 131 // non-consumptively.
131 void apply_closure_to_all_completed_buffers(); 132 void apply_closure_to_all_completed_buffers();
132 133
133 DirtyCardQueue* shared_dirty_card_queue() { 134 DirtyCardQueue* shared_dirty_card_queue() {