• Home
  • Raw
  • Download

Lines Matching refs:crash

97   static CrashQueue* for_crash(const Crash* crash) {  in for_crash()  argument
98 return (crash->crash_type == kDebuggerdJavaBacktrace) ? for_anrs() : for_tombstones(); in for_crash()
140 bool maybe_enqueue_crash(Crash* crash) { in maybe_enqueue_crash() argument
142 queued_requests_.push_back(crash); in maybe_enqueue_crash()
149 void maybe_dequeue_crashes(void (*handler)(Crash* crash)) { in maybe_dequeue_crashes() argument
212 static void perform_request(Crash* crash) { in perform_request() argument
215 intercept_manager->GetIntercept(crash->crash_pid, crash->crash_type, &output_fd); in perform_request()
217 if (crash->crash_type == kDebuggerdNativeBacktrace) { in perform_request()
221 std::tie(crash->crash_tombstone_path, output_fd) = CrashQueue::for_crash(crash)->get_output(); in perform_request()
222 crash->crash_tombstone_fd.reset(dup(output_fd.get())); in perform_request()
230 SendFileDescriptors(crash->crash_socket_fd, &response, sizeof(response), output_fd.get()); in perform_request()
243 event_base* base = event_get_base(crash->crash_event); in perform_request()
244 event_assign(crash->crash_event, base, crash->crash_socket_fd, EV_TIMEOUT | EV_READ, in perform_request()
245 crash_completed_cb, crash); in perform_request()
246 event_add(crash->crash_event, &timeout); in perform_request()
249 CrashQueue::for_crash(crash)->on_crash_started(); in perform_request()
253 delete crash; in perform_request()
259 Crash* crash = new Crash(); in crash_accept_cb() local
264 event* crash_event = event_new(base, sockfd, EV_TIMEOUT | EV_READ, crash_request_cb, crash); in crash_accept_cb()
265 crash->crash_socket_fd.reset(sockfd); in crash_accept_cb()
266 crash->crash_event = crash_event; in crash_accept_cb()
272 Crash* crash = static_cast<Crash*>(arg); in crash_request_cb() local
300 crash->crash_type = request.packet.dump_request.dump_type; in crash_request_cb()
301 if (crash->crash_type < 0 || crash->crash_type > kDebuggerdAnyIntercept) { in crash_request_cb()
302 LOG(WARNING) << "unexpected crash dump type: " << crash->crash_type; in crash_request_cb()
306 if (crash->crash_type != kDebuggerdJavaBacktrace) { in crash_request_cb()
307 crash->crash_pid = request.packet.dump_request.pid; in crash_request_cb()
320 crash->crash_pid = cr.pid; in crash_request_cb()
323 LOG(INFO) << "received crash request for pid " << crash->crash_pid; in crash_request_cb()
325 if (CrashQueue::for_crash(crash)->maybe_enqueue_crash(crash)) { in crash_request_cb()
326 LOG(INFO) << "enqueueing crash request for pid " << crash->crash_pid; in crash_request_cb()
328 perform_request(crash); in crash_request_cb()
334 delete crash; in crash_request_cb()
339 Crash* crash = static_cast<Crash*>(arg); in crash_completed_cb() local
342 CrashQueue::for_crash(crash)->on_crash_completed(); in crash_completed_cb()
364 if (crash->crash_tombstone_fd != -1) { in crash_completed_cb()
365 std::string fd_path = StringPrintf("/proc/self/fd/%d", crash->crash_tombstone_fd.get()); in crash_completed_cb()
366 std::string tombstone_path = CrashQueue::for_crash(crash)->get_next_artifact_path(); in crash_completed_cb()
379 if (crash->crash_type == kDebuggerdJavaBacktrace) { in crash_completed_cb()
380 LOG(ERROR) << "Traces for pid " << crash->crash_pid << " written to: " << tombstone_path; in crash_completed_cb()
390 if (!crash->crash_tombstone_path.empty()) { in crash_completed_cb()
391 rc = unlink(crash->crash_tombstone_path.c_str()); in crash_completed_cb()
393 PLOG(ERROR) << "failed to unlink temporary tombstone at " << crash->crash_tombstone_path; in crash_completed_cb()
399 CrashQueue* queue = CrashQueue::for_crash(crash); in crash_completed_cb()
400 delete crash; in crash_completed_cb()