Mercurial > hg > graal-compiler
diff src/share/vm/compiler/compileBroker.cpp @ 13969:fe034af88233
Acquire proper locks before calling assign_compile_id
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 18 Feb 2014 10:47:13 -0800 |
parents | 9161ed8ce796 |
children | 800057208a2c |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Mon Feb 17 23:18:00 2014 +0100 +++ b/src/share/vm/compiler/compileBroker.cpp Tue Feb 18 10:47:13 2014 -0800 @@ -1472,6 +1472,16 @@ // ------------------------------------------------------------------ +// CompileBroker::assign_compile_id_unlocked +// +// Public wrapper for assign_compile_id that acquires the needed locks +uint CompileBroker::assign_compile_id_unlocked(Thread* thread, methodHandle method, int osr_bci) { + MutexLocker locker(MethodCompileQueue_lock, thread); + return assign_compile_id(method, osr_bci); +} + + +// ------------------------------------------------------------------ // CompileBroker::is_compile_blocking // // Should the current thread be blocked until this compilation request