equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2017, 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. |
163 _unused = 0; |
163 _unused = 0; |
164 } |
164 } |
165 |
165 |
166 virtual void log_plab_allocation(); |
166 virtual void log_plab_allocation(); |
167 virtual void log_sizing(size_t calculated, size_t net_desired); |
167 virtual void log_sizing(size_t calculated, size_t net_desired); |
|
168 |
|
169 // helper for adjust_desired_plab_sz(). |
|
170 virtual size_t compute_desired_plab_sz(); |
|
171 |
168 public: |
172 public: |
169 PLABStats(const char* description, size_t desired_net_plab_sz_, unsigned wt) : |
173 PLABStats(const char* description, size_t desired_net_plab_sz_, unsigned wt) : |
170 _description(description), |
174 _description(description), |
171 _allocated(0), |
175 _allocated(0), |
172 _wasted(0), |
176 _wasted(0), |
195 // Calculates plab size for current number of gc worker threads. |
199 // Calculates plab size for current number of gc worker threads. |
196 size_t desired_plab_sz(uint no_of_gc_workers); |
200 size_t desired_plab_sz(uint no_of_gc_workers); |
197 |
201 |
198 // Updates the current desired PLAB size. Computes the new desired PLAB size with one gc worker thread, |
202 // Updates the current desired PLAB size. Computes the new desired PLAB size with one gc worker thread, |
199 // updates _desired_plab_sz and clears sensor accumulators. |
203 // updates _desired_plab_sz and clears sensor accumulators. |
200 virtual void adjust_desired_plab_sz(); |
204 void adjust_desired_plab_sz(); |
201 |
205 |
202 inline void add_allocated(size_t v); |
206 inline void add_allocated(size_t v); |
203 |
207 |
204 inline void add_unused(size_t v); |
208 inline void add_unused(size_t v); |
205 |
209 |