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

Commit dd09eb75 authored by Vishnu Nair's avatar Vishnu Nair Committed by Automerger Merge Worker
Browse files

Merge "Grab the tracing lock before calling the trace runner" into sc-dev am: c789c905

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id4298aefaffcdc2de0bae2ee88eb216a831985ec
parents 401a824e c789c905
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -71,12 +71,14 @@ status_t SurfaceTracing::writeToFile() {
}

void SurfaceTracing::notify(const char* where) {
    std::scoped_lock lock(mTraceLock);
    if (mEnabled) {
        runner->notify(where);
    }
}

void SurfaceTracing::notifyLocked(const char* where) {
    std::scoped_lock lock(mTraceLock);
    if (mEnabled) {
        runner->notifyLocked(where);
    }
+2 −2
Original line number Diff line number Diff line
@@ -81,8 +81,8 @@ private:

    SurfaceFlinger& mFlinger;
    mutable std::mutex mTraceLock;
    bool mEnabled = false;
    std::unique_ptr<Runner> runner;
    bool mEnabled GUARDED_BY(mTraceLock) = false;
    std::unique_ptr<Runner> runner GUARDED_BY(mTraceLock);

    struct Config {
        uint32_t flags = TRACE_CRITICAL | TRACE_INPUT | TRACE_SYNC;