comparison src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp @ 24178:ab892d05b029

8161993: G1 crashes if active_processor_count changes during startup Summary: Use the initial active processor count for memory initialization instead of the current active one. Reviewed-by: dholmes, mgerdin
author tschatzl
date Thu, 15 Dec 2016 20:00:01 -0500
parents 570cb6369f17
children
comparison
equal deleted inserted replaced
24177:ca765f57fe3c 24178:ab892d05b029
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2016, 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.
78 _all_active = true; 78 _all_active = true;
79 } 79 }
80 80
81 // Determines how many mutator threads can process the buffers in parallel. 81 // Determines how many mutator threads can process the buffers in parallel.
82 uint DirtyCardQueueSet::num_par_ids() { 82 uint DirtyCardQueueSet::num_par_ids() {
83 return (uint)os::processor_count(); 83 return (uint)os::initial_active_processor_count();
84 } 84 }
85 85
86 void DirtyCardQueueSet::initialize(CardTableEntryClosure* cl, Monitor* cbl_mon, Mutex* fl_lock, 86 void DirtyCardQueueSet::initialize(CardTableEntryClosure* cl, Monitor* cbl_mon, Mutex* fl_lock,
87 int process_completed_threshold, 87 int process_completed_threshold,
88 int max_completed_queue, 88 int max_completed_queue,