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

Commit 7fb1756e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11920703 from e43ad598 to 24Q3-release

Change-Id: Ie0ffc5e6184c722477f49273ad68b6b43f875f9c
parents 951f9dc7 e43ad598
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ bool ParseFile(std::istream& input_stream, Func parse) {
}

template<typename Func>
bool ParseFile(std::string_view str_file, Func parse) {
bool ParseFile(const std::string& str_file, Func parse) {
  std::ifstream ifs(str_file);
  if (!ifs.is_open()) {
    return false;
+4 −10
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */

#define LOG_TAG "BpBinder"
#define ATRACE_TAG ATRACE_TAG_AIDL
//#define LOG_NDEBUG 0

#include <binder/BpBinder.h>
@@ -24,15 +23,10 @@
#include <binder/IResultReceiver.h>
#include <binder/RpcSession.h>
#include <binder/Stability.h>
#include <binder/Trace.h>

#include <stdio.h>

#ifndef __TRUSTY__
#include <cutils/trace.h>
#else
#define ATRACE_INT(...)
#endif

#include "BuildFlags.h"
#include "file.h"

@@ -216,7 +210,7 @@ sp<BpBinder> BpBinder::create(int32_t handle) {
        sTrackingMap[trackedUid]++;
    }
    uint32_t numProxies = sBinderProxyCount.fetch_add(1, std::memory_order_relaxed);
    ATRACE_INT("binder_proxies", numProxies);
    binder::os::trace_int(ATRACE_TAG_AIDL, "binder_proxies", numProxies);
    uint32_t numLastWarned = sBinderProxyCountWarned.load(std::memory_order_relaxed);
    uint32_t numNextWarn = numLastWarned + kBinderProxyCountWarnInterval;
    if (numProxies >= numNextWarn) {
@@ -640,8 +634,8 @@ BpBinder::~BpBinder() {
            }
        }
    }
    [[maybe_unused]] uint32_t numProxies = --sBinderProxyCount;
    ATRACE_INT("binder_proxies", numProxies);
    uint32_t numProxies = --sBinderProxyCount;
    binder::os::trace_int(ATRACE_TAG_AIDL, "binder_proxies", numProxies);
    if (ipc) {
        ipc->expungeHandle(binderHandle(), this);
        ipc->decWeakHandle(binderHandle());
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ namespace android::binder::os {

LIBBINDER_EXPORTED void trace_begin(uint64_t tag, const char* name);
LIBBINDER_EXPORTED void trace_end(uint64_t tag);
LIBBINDER_EXPORTED void trace_int(uint64_t tag, const char* name, int32_t value);

status_t setNonBlocking(borrowed_fd fd);

+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ void trace_end(uint64_t tag) {
    atrace_end(tag);
}

void trace_int(uint64_t tag, const char* name, int32_t value) {
    atrace_int(tag, name, value);
}

} // namespace os

// Legacy trace symbol. To be removed once all of downstream rebuilds.
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ void trace_begin(uint64_t, const char*) {}

void trace_end(uint64_t) {}

void trace_int(uint64_t, const char*, int32_t) {}

uint64_t GetThreadId() {
    return syscall(__NR_gettid);
}
Loading