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

Commit e23d8bb5 authored by Connor O'Brien's avatar Connor O'Brien Committed by Automerger Merge Worker
Browse files

Merge "libtimeinstate: improve error handling in single-UID functions" am:...

Merge "libtimeinstate: improve error handling in single-UID functions" am: 5be652db am: e3092453 am: 6b35867b am: dee8b739 am: 149b19d9

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1401471

Change-Id: I5274b9f6dce0202c1d643fea094eee56425ee87c
parents 7b9a157c 149b19d9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ std::optional<std::vector<std::vector<uint64_t>>> getUidCpuFreqTimes(uint32_t ui
    for (uint32_t i = 0; i <= (maxFreqCount - 1) / FREQS_PER_ENTRY; ++i) {
        key.bucket = i;
        if (findMapEntry(gTisMapFd, &key, vals.data())) {
            if (errno != ENOENT) return {};
            if (errno != ENOENT || getFirstMapKey(gTisMapFd, &key)) return {};
            continue;
        }

@@ -362,7 +362,7 @@ std::optional<concurrent_time_t> getUidConcurrentTimes(uint32_t uid, bool retry)
    time_key_t key = {.uid = uid};
    for (key.bucket = 0; key.bucket <= (gNCpus - 1) / CPUS_PER_ENTRY; ++key.bucket) {
        if (findMapEntry(gConcurrentMapFd, &key, vals.data())) {
            if (errno != ENOENT) return {};
            if (errno != ENOENT || getFirstMapKey(gConcurrentMapFd, &key)) return {};
            continue;
        }
        auto offset = key.bucket * CPUS_PER_ENTRY;