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

Commit 98fa9375 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Log when bootcharting ends." am: cd368c64 am: 62fd68bb am: 2f01ec4d

am: bcfa7599

Change-Id: I565faf40434efe1cfaaa321bfdd83a66ee3b9a3c
parents dbbc635c bcfa7599
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ static void bootchart_finish() {
    fclose(log_disks);
    fclose(log_procs);
    acct(NULL);
    LOG(INFO) << "Bootcharting finished";
}

void bootchart_sample(int* timeout) {
@@ -253,12 +254,12 @@ void bootchart_sample(int* timeout) {
    int elapsed_time = current_time - g_last_bootchart_time;

    if (elapsed_time >= BOOTCHART_POLLING_MS) {
        /* count missed samples */
        // Count missed samples.
        while (elapsed_time >= BOOTCHART_POLLING_MS) {
            elapsed_time -= BOOTCHART_POLLING_MS;
            g_remaining_samples--;
        }
        /* count may be negative, take a sample anyway */
        // Count may be negative, take a sample anyway.
        g_last_bootchart_time = current_time;
        if (bootchart_step() < 0 || g_remaining_samples <= 0) {
            bootchart_finish();