From 22cf3d361695ff1d585a8a412ebeade69749811f Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 2 Nov 2015 11:57:11 +0000 Subject: Fix tests flakiness with jit when using Proxy classes. We cannot copy the entry point between ArtMethod when the entry point has been JITted. We put the interpreter bridge instead. bug:25334878 Change-Id: I65a50cc1f10a5a152733807f8c85fb3ed81c5829 --- compiler/jit/jit_compiler.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/jit/jit_compiler.cc') diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index c1b87c9cd0..d520208d32 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -192,7 +192,10 @@ bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method) { CompiledMethod* compiled_method = nullptr; { TimingLogger::ScopedTiming t2("Compiling", &logger); - compiled_method = compiler_driver_->CompileArtMethod(self, method); + // If we get a request to compile a proxy method, we pass the actual Java method + // of that proxy method, as the compiler does not expect a proxy method. + ArtMethod* method_to_compile = method->GetInterfaceMethodIfProxy(sizeof(void*)); + compiled_method = compiler_driver_->CompileArtMethod(self, method_to_compile); } // Trim maps to reduce memory usage. -- cgit v1.2.3-59-g8ed1b