Lines Matching refs:process

340     Process& process = it->second;  in ReadAllProcesses()  local
341 if (!ReadProcess(process, &debug_info)) { in ReadAllProcesses()
344 if (process.died) { in ReadAllProcesses()
345 LOG(DEBUG) << "Stop monitoring process " << process.pid; in ReadAllProcesses()
369 bool JITDebugReader::ReadProcess(Process& process, std::vector<JITDebugInfo>* debug_info) { in ReadProcess() argument
370 if (process.died || (!process.initialized && !InitializeProcess(process))) { in ReadProcess()
376 if (!ReadDescriptors(process, &jit_descriptor, &dex_descriptor)) { in ReadProcess()
380 if (jit_descriptor.action_seqlock == process.last_jit_descriptor.action_seqlock && in ReadProcess()
381 dex_descriptor.action_seqlock == process.last_dex_descriptor.action_seqlock) { in ReadProcess()
386 return ReadDebugInfo(process, jit_descriptor, debug_info) && in ReadProcess()
387 ReadDebugInfo(process, dex_descriptor, debug_info); in ReadProcess()
390 bool JITDebugReader::ReadDebugInfo(Process& process, Descriptor& new_descriptor, in ReadDebugInfo() argument
394 (type == DescriptorType::kJIT) ? &process.last_jit_descriptor : &process.last_dex_descriptor; in ReadDebugInfo()
398 LOG(DEBUG) << (type == DescriptorType::kJIT ? "JIT" : "Dex") << " symfiles of pid " << process.pid in ReadDebugInfo()
408 if (!ReadNewCodeEntries(process, new_descriptor, old_descriptor->action_timestamp, in ReadDebugInfo()
414 if (IsDescriptorChanged(process, new_descriptor)) { in ReadDebugInfo()
417 LOG(DEBUG) << (type == DescriptorType::kJIT ? "JIT" : "Dex") << " symfiles of pid " << process.pid in ReadDebugInfo()
422 if (!ReadJITCodeDebugInfo(process, new_entries, debug_info)) { in ReadDebugInfo()
426 ReadDexFileDebugInfo(process, new_entries, debug_info); in ReadDebugInfo()
433 bool JITDebugReader::IsDescriptorChanged(Process& process, Descriptor& prev_descriptor) { in IsDescriptorChanged() argument
436 if (!ReadDescriptors(process, &tmp_jit_descriptor, &tmp_dex_descriptor)) { in IsDescriptorChanged()
445 bool JITDebugReader::InitializeProcess(Process& process) { in InitializeProcess() argument
448 if (!GetThreadMmapsInProcess(process.pid, &thread_mmaps)) { in InitializeProcess()
449 process.died = true; in InitializeProcess()
464 process.is_64bit = art_lib_path.find("lib64") != std::string::npos; in InitializeProcess()
467 const DescriptorsLocation* location = GetDescriptorsLocation(art_lib_path, process.is_64bit); in InitializeProcess()
471 process.descriptors_addr = location->relative_addr + min_vaddr_in_memory; in InitializeProcess()
472 process.descriptors_size = location->size; in InitializeProcess()
473 process.jit_descriptor_offset = location->jit_descriptor_offset; in InitializeProcess()
474 process.dex_descriptor_offset = location->dex_descriptor_offset; in InitializeProcess()
475 process.initialized = true; in InitializeProcess()
530 bool JITDebugReader::ReadRemoteMem(Process& process, uint64_t remote_addr, uint64_t size, in ReadRemoteMem() argument
538 ssize_t result = process_vm_readv(process.pid, &local_iov, 1, &remote_iov, 1, 0); in ReadRemoteMem()
540 PLOG(DEBUG) << "ReadRemoteMem(" << " pid " << process.pid << ", addr " << std::hex in ReadRemoteMem()
542 process.died = true; in ReadRemoteMem()
548 bool JITDebugReader::ReadDescriptors(Process& process, Descriptor* jit_descriptor, in ReadDescriptors() argument
550 if (!ReadRemoteMem(process, process.descriptors_addr, process.descriptors_size, in ReadDescriptors()
554 if (!LoadDescriptor(process.is_64bit, &descriptors_buf_[process.jit_descriptor_offset], in ReadDescriptors()
556 !LoadDescriptor(process.is_64bit, &descriptors_buf_[process.dex_descriptor_offset], in ReadDescriptors()
589 bool JITDebugReader::ReadNewCodeEntries(Process& process, const Descriptor& descriptor, in ReadNewCodeEntries() argument
593 if (process.is_64bit) { in ReadNewCodeEntries()
595 process, descriptor, last_action_timestamp, read_entry_limit, new_code_entries); in ReadNewCodeEntries()
598 process, descriptor, last_action_timestamp, read_entry_limit, new_code_entries); in ReadNewCodeEntries()
601 if (process.is_64bit) { in ReadNewCodeEntries()
603 process, descriptor, last_action_timestamp, read_entry_limit, new_code_entries); in ReadNewCodeEntries()
606 process, descriptor, last_action_timestamp, read_entry_limit, new_code_entries); in ReadNewCodeEntries()
612 bool JITDebugReader::ReadNewCodeEntriesImpl(Process& process, const Descriptor& descriptor, in ReadNewCodeEntriesImpl() argument
625 if (!ReadRemoteMem(process, current_entry_addr, sizeof(entry), &entry)) { in ReadNewCodeEntriesImpl()
652 bool JITDebugReader::ReadJITCodeDebugInfo(Process& process, in ReadJITCodeDebugInfo() argument
665 if (!ReadRemoteMem(process, jit_entry.symfile_addr, jit_entry.symfile_size, data.data())) { in ReadJITCodeDebugInfo()
695 debug_info->emplace_back(process.pid, jit_entry.timestamp, symbol.vaddr, symbol.len, in ReadJITCodeDebugInfo()
713 void JITDebugReader::ReadDexFileDebugInfo(Process& process, in ReadDexFileDebugInfo() argument
717 if (!GetThreadMmapsInProcess(process.pid, &thread_mmaps)) { in ReadDexFileDebugInfo()
718 process.died = true; in ReadDexFileDebugInfo()
750 debug_info->emplace_back(process.pid, dex_entry.timestamp, dex_file_offset, file_path, in ReadDexFileDebugInfo()