Home | History | Annotate | Download | only in runtime

Lines Matching defs:method

104 uint32_t Trace::EncodeTraceMethod(ArtMethod* method) {
107 auto it = art_method_id_map_.find(method);
111 unique_methods_.push_back(method);
113 art_method_id_map_.emplace(method, idx);
116 DCHECK_EQ(unique_methods_[idx], method);
120 uint32_t Trace::EncodeTraceMethodAndAction(ArtMethod* method, TraceAction action) {
121 uint32_t tmid = (EncodeTraceMethod(method) << TraceActionBits) | action;
122 DCHECK_EQ(method, DecodeTraceMethod(tmid));
630 ArtMethod* method = DecodeTraceMethod(tmid);
632 LOG(INFO) << PrettyMethod(method) << " " << static_cast<int>(action);
657 // Write the secondary file with all the method names.
687 os << StringPrintf("num-method-calls=%zd\n", num_records);
744 ArtMethod* method, uint32_t new_dex_pc) {
745 UNUSED(thread, this_object, method, new_dex_pc);
747 LOG(ERROR) << "Unexpected dex PC event in tracing " << PrettyMethod(method) << " " << new_dex_pc;
751 ArtMethod* method, uint32_t dex_pc, ArtField* field)
753 UNUSED(thread, this_object, method, dex_pc, field);
755 LOG(ERROR) << "Unexpected field read event in tracing " << PrettyMethod(method) << " " << dex_pc;
759 ArtMethod* method, uint32_t dex_pc, ArtField* field,
762 UNUSED(thread, this_object, method, dex_pc, field, field_value);
764 LOG(ERROR) << "Unexpected field write event in tracing " << PrettyMethod(method) << " " << dex_pc;
768 ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED) {
772 LogMethodTraceEvent(thread, method, instrumentation::Instrumentation::kMethodEntered,
777 ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED,
782 LogMethodTraceEvent(thread, method, instrumentation::Instrumentation::kMethodExited,
787 ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED) {
791 LogMethodTraceEvent(thread, method, instrumentation::Instrumentation::kMethodUnwind,
801 void Trace::BackwardBranch(Thread* /*thread*/, ArtMethod* method,
804 LOG(ERROR) << "Unexpected backward branch event in tracing" << PrettyMethod(method);
823 bool Trace::RegisterMethod(ArtMethod* method) {
824 mirror::DexCache* dex_cache = method->GetDexCache();
826 auto* resolved_method = dex_cache->GetResolvedMethod(method->GetDexMethodIndex(), sizeof(void*));
827 if (resolved_method != method) {
829 dex_cache->SetResolvedMethod(method->GetDexMethodIndex(), method, sizeof(void*));
835 if (!(*bit_set)[method->GetDexMethodIndex()]) {
836 bit_set->set(method->GetDexMethodIndex());
854 std::string Trace::GetMethodLine(ArtMethod* method) {
855 method = method->GetInterfaceMethodIfProxy(sizeof(void*));
857 reinterpret_cast<void*>((EncodeTraceMethod(method) << TraceActionBits)),
858 PrettyDescriptor(method->GetDeclaringClassDescriptor()).c_str(), method->GetName(),
859 method->GetSignature().ToString().c_str(), method->GetDeclaringClassSourceFile());
888 void Trace::LogMethodTraceEvent(Thread* thread, ArtMethod* method,
922 uint32_t method_value = EncodeTraceMethodAndAction(method, action);
949 if (RegisterMethod(method)) {
951 std::string method_line(GetMethodLine(method));
982 ArtMethod* method = DecodeTraceMethod(tmid);
983 visited_methods->insert(method);
989 for (const auto& method : visited_methods) {
990 os << GetMethodLine(method);