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. |
50 // either the CompiledIC_lock must be set or we must be at a safe point. |
50 // either the CompiledIC_lock must be set or we must be at a safe point. |
51 |
51 |
52 CompiledICLocker::CompiledICLocker(CompiledMethod* method) |
52 CompiledICLocker::CompiledICLocker(CompiledMethod* method) |
53 : _method(method), |
53 : _method(method), |
54 _behaviour(CompiledICProtectionBehaviour::current()), |
54 _behaviour(CompiledICProtectionBehaviour::current()), |
55 _locked(_behaviour->lock(_method)), |
55 _locked(_behaviour->lock(_method)) { |
56 _nsv(true, !SafepointSynchronize::is_at_safepoint()) { |
|
57 } |
56 } |
58 |
57 |
59 CompiledICLocker::~CompiledICLocker() { |
58 CompiledICLocker::~CompiledICLocker() { |
60 if (_locked) { |
59 if (_locked) { |
61 _behaviour->unlock(_method); |
60 _behaviour->unlock(_method); |