Lines Matching refs:method
68 // With 'perf', we want a 1-1 mapping between an address and a method.
71 // We need to have 32 bit offsets from method headers in code cache which point to things
182 bool JitCodeCache::ContainsMethod(ArtMethod* method) {
185 if (it.second == method) {
218 ArtMethod* method,
233 method,
251 method,
381 // TODO: Do not use IsMarked for j.l.Class, and adjust once we move this method
441 // We do not check if a code cache GC is in progress, as this method comes
516 // this method has already ensured the inline cache will not be deleted.
528 ArtMethod* method,
602 method->ClearCounter();
617 single_impl, method, method_header);
622 // but below we still make the compiled code valid for the method.
635 method_code_map_.Put(code_ptr, method);
638 osr_code_map_.Put(method, code_ptr);
641 method, method_header->GetEntryPoint());
651 << ArtMethod::PrettyMethod(method) << "@" << method
662 << ArtMethod::PrettyMethod(method);
674 // This notifies the code cache that the given method has been redefined and that it should remove
675 // any cached information it has on the method. All threads must be suspended before calling this
676 // method. The compiled code for the method (if there is any) must not be in any threads call stack.
677 void JitCodeCache::NotifyMethodRedefined(ArtMethod* method) {
679 if (method->IsNative()) {
682 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
688 method->SetProfilingInfo(nullptr);
691 if (code_iter->second == method) {
698 auto code_map = osr_code_map_.find(method);
709 // TODO We should add DCHECKS that validate that the JIT is paused when this method is entered.
727 // Update method_code_map_ to point to the new method.
733 // Update osr_code_map_ to point to the new method.
766 ArtMethod* method,
796 << ArtMethod::PrettyMethod(method);
854 // its stack frame, it is not the method owning return_pc_. We just pass null to
855 // LookupMethodHeader: the method is only checked against in debug builds.
1010 // point of those methods to the interpreter. If the method is invoked, the
1017 // class of the method. We may be concurrently running a GC which makes accessing
1069 // We are going to move this method back to interpreter. Clear the counter now to
1086 ArtMethod* method = it.second;
1089 if (method_header->GetEntryPoint() == method->GetEntryPointFromQuickCompiledCode()) {
1094 // Empty osr method map, as osr compiled code will be deleted (except the ones
1117 // a method has compiled code but no ProfilingInfo.
1140 ArtMethod* method = it.second;
1141 if (method->GetProfilingInfo(kRuntimePointerSize) == nullptr) {
1144 if (method_header->GetEntryPoint() == method->GetEntryPointFromQuickCompiledCode()) {
1155 OatQuickMethodHeader* JitCodeCache::LookupMethodHeader(uintptr_t pc, ArtMethod* method) {
1177 if (kIsDebugBuild && method != nullptr) {
1179 // possible that we might have updated the method_code_map by making this method obsolete in a
1180 // previous frame. Therefore we should just check that the non-obsolete version of this method
1182 // obsolete version of the method might not be fully initialized yet. This situation can only
1184 // method and it->second should be identical. (See runtime/openjdkjvmti/ti_redefine.cc for more
1186 DCHECK_EQ(it->second->GetNonObsoleteMethod(), method->GetNonObsoleteMethod())
1187 << ArtMethod::PrettyMethod(method->GetNonObsoleteMethod()) << " "
1194 OatQuickMethodHeader* JitCodeCache::LookupOsrMethodHeader(ArtMethod* method) {
1196 auto it = osr_code_map_.find(method);
1204 ArtMethod* method,
1214 method, entries);
1220 info = AddProfilingInfoInternal(self, method, entries);
1226 info = AddProfilingInfoInternal(self, method, entries);
1233 ArtMethod* method,
1240 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
1249 info = new (data) ProfilingInfo(method, entries);
1255 method->SetProfilingInfo(info);
1282 ArtMethod* method = info->GetMethod();
1283 const DexFile* dex_file = method->GetDexFile();
1290 // If the method didn't reach the compilation threshold don't save the inline caches.
1293 if (method->GetCounter() < jit_compile_threshold) {
1295 dex_file, method->GetDexMethodIndex(), inline_caches);
1324 // Make a best effort to find the type index in the method's dex file.
1352 dex_file, method->GetDexMethodIndex(), inline_caches);
1360 bool JitCodeCache::IsOsrCompiled(ArtMethod* method) {
1362 return osr_code_map_.find(method) != osr_code_map_.end();
1365 bool JitCodeCache::NotifyCompilationOf(ArtMethod* method, Thread* self, bool osr) {
1366 if (!osr && ContainsPc(method->GetEntryPointFromQuickCompiledCode())) {
1371 if (osr && (osr_code_map_.find(method) != osr_code_map_.end())) {
1375 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
1377 VLOG(jit) << method->PrettyMethod() << " needs a ProfilingInfo to be compiled";
1381 method->ClearCounter();
1393 ProfilingInfo* JitCodeCache::NotifyCompilerUse(ArtMethod* method, Thread* self) {
1395 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
1405 void JitCodeCache::DoneCompilerUse(ArtMethod* method, Thread* self) {
1407 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
1412 void JitCodeCache::DoneCompiling(ArtMethod* method, Thread* self ATTRIBUTE_UNUSED, bool osr) {
1413 ProfilingInfo* info = method->GetProfilingInfo(kRuntimePointerSize);
1423 void JitCodeCache::InvalidateCompiledCodeFor(ArtMethod* method,
1425 ProfilingInfo* profiling_info = method->GetProfilingInfo(kRuntimePointerSize);
1432 if (method->GetEntryPointFromQuickCompiledCode() == header->GetEntryPoint()) {
1434 // it to the interpreter entry point and clear the counter to get the method
1437 method, GetQuickToInterpreterBridge());
1438 method->ClearCounter();
1441 auto it = osr_code_map_.find(method);
1443 // Remove the OSR method, to avoid using it again.