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

Commit ce201c11 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6029552 from a3c5d232 to rvc-release

Change-Id: I48df6023e7f01e466587a79b5a06ab23635c8b32
parents a3edf950 a3c5d232
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -933,6 +933,31 @@ static void DumpIncidentReport() {
    unlink(path.c_str());
}

static void DumpVisibleWindowViews() {
    if (!ds.IsZipping()) {
        MYLOGD("Not dumping visible views because it's not a zipped bugreport\n");
        return;
    }
    DurationReporter duration_reporter("VISIBLE WINDOW VIEWS");
    const std::string path = ds.bugreport_internal_dir_ + "/tmp_visible_window_views";
    auto fd = android::base::unique_fd(TEMP_FAILURE_RETRY(open(path.c_str(),
                O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW,
                S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)));
    if (fd < 0) {
        MYLOGE("Could not open %s to dump visible views.\n", path.c_str());
        return;
    }
    RunCommandToFd(fd, "", {"cmd", "window", "dump-visible-window-views"},
                   CommandOptions::WithTimeout(120).Build());
    bool empty = 0 == lseek(fd, 0, SEEK_END);
    if (!empty) {
        ds.AddZipEntry("visible_windows.zip", path);
    } else {
        MYLOGW("Failed to dump visible windows\n");
    }
    unlink(path.c_str());
}

static void DumpIpTablesAsRoot() {
    RunCommand("IPTABLES", {"iptables", "-L", "-nvx"});
    RunCommand("IP6TABLES", {"ip6tables", "-L", "-nvx"});
@@ -1317,6 +1342,8 @@ static Dumpstate::RunStatus dumpstate() {

    RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "PROCRANK", {"procrank"}, AS_ROOT_20);

    RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(DumpVisibleWindowViews);

    DumpFile("VIRTUAL MEMORY STATS", "/proc/vmstat");
    DumpFile("VMALLOC INFO", "/proc/vmallocinfo");
    DumpFile("SLAB INFO", "/proc/slabinfo");
+54 −0
Original line number Diff line number Diff line
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library {
    name: "libgralloctypes",
    defaults: ["libbinder_ndk_host_user"],
    cflags: [
        "-Wall",
        "-Werror",
        "-Wno-enum-compare",
    ],
    host_supported: true,

    vendor_available: true,
    vndk: {
        enabled: true,
        support_system_process: true,
    },

    srcs: [
        "Gralloc4.cpp"
    ],

    shared_libs: [
        "android.hardware.graphics.mapper@4.0",
        "libhidlbase",
        "liblog",
        "vintf-graphics-common-ndk_platform",
    ],

    export_shared_lib_headers: [
        "android.hardware.graphics.mapper@4.0",
        "vintf-graphics-common-ndk_platform",
    ],

    export_include_dirs: [
        "include",
    ],

    sanitize: {
        misc_undefined: ["integer"],
    },
}
+637 −0

File added.

Preview size limit exceeded, changes collapsed.

+279 −0

File added.

Preview size limit exceeded, changes collapsed.

+48 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading