1 /* |
1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 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. |
749 CompileTask* task; |
749 CompileTask* task; |
750 { |
750 { |
751 No_Safepoint_Verifier nsv; |
751 No_Safepoint_Verifier nsv; |
752 task = CompilationPolicy::policy()->select_task(this); |
752 task = CompilationPolicy::policy()->select_task(this); |
753 } |
753 } |
754 remove(task); |
754 if (task != NULL) { |
755 purge_stale_tasks(); // may temporarily release MCQ lock |
755 remove(task); |
|
756 purge_stale_tasks(); // may temporarily release MCQ lock |
|
757 } |
756 return task; |
758 return task; |
757 } |
759 } |
758 |
760 |
759 // Clean & deallocate stale compile tasks. |
761 // Clean & deallocate stale compile tasks. |
760 // Temporarily releases MethodCompileQueue lock. |
762 // Temporarily releases MethodCompileQueue lock. |