equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Red Hat, Inc. All rights reserved. |
2 * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. |
3 * |
3 * |
4 * This code is free software; you can redistribute it and/or modify it |
4 * This code is free software; you can redistribute it and/or modify it |
5 * under the terms of the GNU General Public License version 2 only, as |
5 * under the terms of the GNU General Public License version 2 only, as |
6 * published by the Free Software Foundation. |
6 * published by the Free Software Foundation. |
7 * |
7 * |
120 return data(thread)->_force_satb_flush; |
120 return data(thread)->_force_satb_flush; |
121 } |
121 } |
122 |
122 |
123 static void initialize_gclab(Thread* thread) { |
123 static void initialize_gclab(Thread* thread) { |
124 assert (thread->is_Java_thread() || thread->is_Worker_thread(), "Only Java and GC worker threads are allowed to get GCLABs"); |
124 assert (thread->is_Java_thread() || thread->is_Worker_thread(), "Only Java and GC worker threads are allowed to get GCLABs"); |
|
125 assert(data(thread)->_gclab == NULL, "Only initialize once"); |
125 data(thread)->_gclab = new PLAB(PLAB::min_size()); |
126 data(thread)->_gclab = new PLAB(PLAB::min_size()); |
126 data(thread)->_gclab_size = 0; |
127 data(thread)->_gclab_size = 0; |
127 } |
128 } |
128 |
129 |
129 static PLAB* gclab(Thread* thread) { |
130 static PLAB* gclab(Thread* thread) { |