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

Commit 8b45759f authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge changes I09a60e61,I2b898e72 am: df35dfbc am: 54abed3a

Change-Id: I89a9a43f38146ace5e40de53eced2259455af23f
parents 9371aabe 54abed3a
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -348,7 +348,7 @@ int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap)
    return 0;
    return 0;
  }
  }


  char buf[LOG_BUF_SIZE];
  __attribute__((uninitialized)) char buf[LOG_BUF_SIZE];


  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);


@@ -366,7 +366,7 @@ int __android_log_print(int prio, const char* tag, const char* fmt, ...) {
  }
  }


  va_list ap;
  va_list ap;
  char buf[LOG_BUF_SIZE];
  __attribute__((uninitialized)) char buf[LOG_BUF_SIZE];


  va_start(ap, fmt);
  va_start(ap, fmt);
  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
@@ -386,7 +386,7 @@ int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fm
  }
  }


  va_list ap;
  va_list ap;
  char buf[LOG_BUF_SIZE];
  __attribute__((uninitialized)) char buf[LOG_BUF_SIZE];


  va_start(ap, fmt);
  va_start(ap, fmt);
  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
  vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
@@ -398,7 +398,7 @@ int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fm
}
}


void __android_log_assert(const char* cond, const char* tag, const char* fmt, ...) {
void __android_log_assert(const char* cond, const char* tag, const char* fmt, ...) {
  char buf[LOG_BUF_SIZE];
  __attribute__((uninitialized)) char buf[LOG_BUF_SIZE];


  if (fmt) {
  if (fmt) {
    va_list ap;
    va_list ap;
+12 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@
#include <unordered_set>
#include <unordered_set>


#include <android-base/file.h>
#include <android-base/file.h>
#include <android-base/properties.h>
#include <benchmark/benchmark.h>
#include <benchmark/benchmark.h>
#include <cutils/sockets.h>
#include <cutils/sockets.h>
#include <log/event_tag_map.h>
#include <log/event_tag_map.h>
@@ -1025,3 +1026,14 @@ static void BM_lookupEventTagNum_logd_existing(benchmark::State& state) {
  }
  }
}
}
BENCHMARK(BM_lookupEventTagNum_logd_existing);
BENCHMARK(BM_lookupEventTagNum_logd_existing);

static void BM_log_verbose_overhead(benchmark::State& state) {
  std::string test_log_tag = "liblog_verbose_tag";
  android::base::SetProperty("log.tag." + test_log_tag, "I");
  for (auto _ : state) {
    __android_log_print(ANDROID_LOG_VERBOSE, test_log_tag.c_str(), "%s test log message %d %d",
                        "test test", 123, 456);
  }
  android::base::SetProperty("log.tag." + test_log_tag, "");
}
BENCHMARK(BM_log_verbose_overhead);