equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 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. |
84 int hot_count, |
84 int hot_count, |
85 CompileTask::CompileReason compile_reason, |
85 CompileTask::CompileReason compile_reason, |
86 bool is_blocking) { |
86 bool is_blocking) { |
87 assert(!_lock->is_locked(), "bad locking"); |
87 assert(!_lock->is_locked(), "bad locking"); |
88 |
88 |
|
89 Thread* thread = Thread::current(); |
89 _compile_id = compile_id; |
90 _compile_id = compile_id; |
90 _method = method(); |
91 _method = method(); |
91 _method_holder = JNIHandles::make_global(method->method_holder()->klass_holder()); |
92 _method_holder = JNIHandles::make_global(Handle(thread, method->method_holder()->klass_holder())); |
92 _osr_bci = osr_bci; |
93 _osr_bci = osr_bci; |
93 _is_blocking = is_blocking; |
94 _is_blocking = is_blocking; |
94 JVMCI_ONLY(_has_waiter = CompileBroker::compiler(comp_level)->is_jvmci();) |
95 JVMCI_ONLY(_has_waiter = CompileBroker::compiler(comp_level)->is_jvmci();) |
95 JVMCI_ONLY(_jvmci_compiler_thread = NULL;) |
96 JVMCI_ONLY(_jvmci_compiler_thread = NULL;) |
96 _comp_level = comp_level; |
97 _comp_level = comp_level; |
113 if (hot_method == method) { |
114 if (hot_method == method) { |
114 _hot_method = _method; |
115 _hot_method = _method; |
115 } else { |
116 } else { |
116 _hot_method = hot_method(); |
117 _hot_method = hot_method(); |
117 // only add loader or mirror if different from _method_holder |
118 // only add loader or mirror if different from _method_holder |
118 _hot_method_holder = JNIHandles::make_global(hot_method->method_holder()->klass_holder()); |
119 _hot_method_holder = JNIHandles::make_global(Handle(thread, hot_method->method_holder()->klass_holder())); |
119 } |
120 } |
120 } |
121 } |
121 } |
122 } |
122 |
123 |
123 _next = NULL; |
124 _next = NULL; |