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

Commit 2c612f47 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "logwrapper: update benchmark and remove old functions" am: aa3160ab

am: ae72d8b2

Change-Id: Id48f4ac86eaaaf22661b251d0dd100e16fefe425
parents 2810d0f2 ae72d8b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -56,10 +56,10 @@ cc_binary {
// ========================================================

cc_benchmark {
    name: "android_fork_execvp_ext_benchmark",
    name: "logwrap_fork_execvp_benchmark",
    defaults: ["logwrapper_defaults"],
    srcs: [
        "android_fork_execvp_ext_benchmark.cpp",
        "logwrap_fork_execvp_benchmark.cpp",
    ],
    shared_libs: [
        "libbase",
+0 −21
Original line number Diff line number Diff line
@@ -59,24 +59,3 @@

int logwrap_fork_execvp(int argc, const char* const* argv, int* status, bool forward_signals,
                        int log_target, bool abbreviated, const char* file_path);

// TODO: Actually deprecate this and the below.
static inline int android_fork_execvp_ext(int argc, char* argv[], int* status, bool ignore_int_quit,
                                          int log_target, bool abbreviated, const char* file_path,
                                          void* unused_opts, int unused_opts_len) {
    (void)ignore_int_quit;
    (void)unused_opts;
    (void)unused_opts_len;
    return logwrap_fork_execvp(argc, argv, status, false, log_target, abbreviated, file_path);
}

/* Similar to above, except abbreviated logging is not available, and if logwrap
 * is true, logging is to the Android system log, and if false, there is no
 * logging.
 */
static inline int android_fork_execvp(int argc, char* argv[], int* status, bool ignore_int_quit,
                                      bool logwrap) {
    (void)ignore_int_quit;
    return logwrap_fork_execvp(argc, argv, status, false, (logwrap ? LOG_ALOG : LOG_NONE), false,
                               nullptr);
}
+1 −3
Original line number Diff line number Diff line
@@ -23,9 +23,7 @@ static void BM_android_fork_execvp_ext(benchmark::State& state) {
    const char* argv[] = {"/system/bin/echo", "hello", "world"};
    const int argc = 3;
    while (state.KeepRunning()) {
        int rc = android_fork_execvp_ext(
            argc, (char**)argv, NULL /* status */, false /* ignore_int_quit */, LOG_NONE,
            false /* abbreviated */, NULL /* file_path */, NULL /* opts */, 0 /* opts_len */);
        int rc = logwrap_fork_execvp(argc, argv, nullptr, false, LOG_NONE, false, nullptr);
        CHECK_EQ(0, rc);
    }
}