Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ae1d426 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "MediaUtils: Dump HAL pids in Timecheck abort message" into tm-dev am: d705d89e

parents a7eafc41 d705d89e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -189,15 +189,18 @@ void TimeCheck::TimeCheckHandler::onTimeout() const
    // Generate audio HAL processes tombstones and allow time to complete
    // Generate audio HAL processes tombstones and allow time to complete
    // before forcing restart
    // before forcing restart
    std::vector<pid_t> pids = TimeCheck::getAudioHalPids();
    std::vector<pid_t> pids = TimeCheck::getAudioHalPids();
    std::string halPids = "HAL pids [ ";
    if (pids.size() != 0) {
    if (pids.size() != 0) {
        for (const auto& pid : pids) {
        for (const auto& pid : pids) {
            ALOGI("requesting tombstone for pid: %d", pid);
            ALOGI("requesting tombstone for pid: %d", pid);
            halPids.append(std::to_string(pid)).append(" ");
            sigqueue(pid, DEBUGGER_SIGNAL, {.sival_int = 0});
            sigqueue(pid, DEBUGGER_SIGNAL, {.sival_int = 0});
        }
        }
        sleep(1);
        sleep(1);
    } else {
    } else {
        ALOGI("No HAL process pid available, skipping tombstones");
        ALOGI("No HAL process pid available, skipping tombstones");
    }
    }
    halPids.append("]");


    LOG_EVENT_STRING(LOGTAG_AUDIO_BINDER_TIMEOUT, tag.c_str());
    LOG_EVENT_STRING(LOGTAG_AUDIO_BINDER_TIMEOUT, tag.c_str());


@@ -206,6 +209,7 @@ void TimeCheck::TimeCheckHandler::onTimeout() const
            .append(tag)
            .append(tag)
            .append(" scheduled ").append(formatTime(startTime))
            .append(" scheduled ").append(formatTime(startTime))
            .append(" on thread ").append(std::to_string(tid)).append("\n")
            .append(" on thread ").append(std::to_string(tid)).append("\n")
            .append(halPids).append("\n")
            .append(summary);
            .append(summary);


    // Note: LOG_ALWAYS_FATAL limits the size of the string - per log/log.h:
    // Note: LOG_ALWAYS_FATAL limits the size of the string - per log/log.h: