equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2019, 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. |
256 |
256 |
257 // Enqueue this icholder for release during the next safepoint. It's |
257 // Enqueue this icholder for release during the next safepoint. It's |
258 // not safe to free them until them since they might be visible to |
258 // not safe to free them until them since they might be visible to |
259 // another thread. |
259 // another thread. |
260 void InlineCacheBuffer::queue_for_release(CompiledICHolder* icholder) { |
260 void InlineCacheBuffer::queue_for_release(CompiledICHolder* icholder) { |
261 MutexLockerEx mex(InlineCacheBuffer_lock, Mutex::_no_safepoint_check_flag); |
261 MutexLocker mex(InlineCacheBuffer_lock, Mutex::_no_safepoint_check_flag); |
262 icholder->set_next(_pending_released); |
262 icholder->set_next(_pending_released); |
263 _pending_released = icholder; |
263 _pending_released = icholder; |
264 _pending_count++; |
264 _pending_count++; |
265 if (TraceICBuffer) { |
265 if (TraceICBuffer) { |
266 tty->print_cr("enqueueing icholder " INTPTR_FORMAT " to be freed", p2i(icholder)); |
266 tty->print_cr("enqueueing icholder " INTPTR_FORMAT " to be freed", p2i(icholder)); |