Snap for 9121979 from ef1e8e11b9 to udc-release

Change-Id: Ie991c833d47e23fed76959e79e1fdfc34cc2a5f1
This commit is contained in:
Android Build Coastguard Worker 2022-09-30 01:03:04 +00:00
commit 20334c0d84
5 changed files with 17 additions and 60 deletions

View file

@ -15,6 +15,7 @@
# #
include device/google/gs-common/device.mk include device/google/gs-common/device.mk
include device/google/gs-common/gs_watchdogd/watchdog.mk
TARGET_BOARD_PLATFORM := gs101 TARGET_BOARD_PLATFORM := gs101
DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false) DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false)

View file

@ -72,6 +72,14 @@
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> </hal>
<hal format="aidl" optional="true">
<name>com.google.edgetpu.dba</name>
<version>1</version>
<interface>
<name>IDevice</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>com.google.hardware.pixel.display</name> <name>com.google.hardware.pixel.display</name>
<version>6</version> <version>6</version>

View file

@ -45,8 +45,6 @@
#define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num" #define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
#define GPS_LOGGING_STATUS_PROPERTY "vendor.gps.aol.enabled" #define GPS_LOGGING_STATUS_PROPERTY "vendor.gps.aol.enabled"
#define UFS_BOOTDEVICE "ro.boot.bootdevice"
#define TCPDUMP_LOG_DIRECTORY "/data/vendor/tcpdump_logger/logs" #define TCPDUMP_LOG_DIRECTORY "/data/vendor/tcpdump_logger/logs"
#define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num" #define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num"
#define TCPDUMP_PERSIST_PROPERTY "persist.vendor.tcpdump.log.alwayson" #define TCPDUMP_PERSIST_PROPERTY "persist.vendor.tcpdump.log.alwayson"
@ -254,7 +252,6 @@ DumpstateDevice::DumpstateDevice()
{ "pre-touch", [this](int fd) { dumpPreTouchSection(fd); } }, { "pre-touch", [this](int fd) { dumpPreTouchSection(fd); } },
{ "wlan", [this](int fd) { dumpWlanSection(fd); } }, { "wlan", [this](int fd) { dumpWlanSection(fd); } },
{ "soc", [this](int fd) { dumpSocSection(fd); } }, { "soc", [this](int fd) { dumpSocSection(fd); } },
{ "storage", [this](int fd) { dumpStorageSection(fd); } },
{ "memory", [this](int fd) { dumpMemorySection(fd); } }, { "memory", [this](int fd) { dumpMemorySection(fd); } },
{ "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } }, { "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } },
{ "cpu", [this](int fd) { dumpCpuSection(fd); } }, { "cpu", [this](int fd) { dumpCpuSection(fd); } },
@ -900,62 +897,6 @@ void DumpstateDevice::dumpMemorySection(int fd) {
"done"}); "done"});
} }
static void DumpUFS(int fd) {
DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model");
DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev");
DumpFileToFd(fd, "UFS size", "/sys/block/sda/size");
DumpFileToFd(fd, "UFS Slow IO Read", "/dev/sys/block/bootdevice/slowio_read_cnt");
DumpFileToFd(fd, "UFS Slow IO Write", "/dev/sys/block/bootdevice/slowio_write_cnt");
DumpFileToFd(fd, "UFS Slow IO Unmap", "/dev/sys/block/bootdevice/slowio_unmap_cnt");
DumpFileToFd(fd, "UFS Slow IO Sync", "/dev/sys/block/bootdevice/slowio_sync_cnt");
RunCommandToFd(fd, "UFS err_stats", {"/vendor/bin/sh", "-c",
"path=\"/dev/sys/block/bootdevice/err_stats\"; "
"for node in `ls $path/* | grep -v reset_err_status`; do "
"printf \"%s:%d\\n\" $(basename $node) $(cat $node); done;"});
RunCommandToFd(fd, "UFS io_stats", {"/vendor/bin/sh", "-c",
"path=\"/dev/sys/block/bootdevice/io_stats\"; "
"printf \"\\t\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"ReadCnt ReadBytes WriteCnt WriteBytes RWCnt RWBytes; "
"str=$(cat $path/*_start); arr=($str); "
"printf \"Started: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; "
"str=$(cat $path/*_complete); arr=($str); "
"printf \"Completed: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; "
"str=$(cat $path/*_maxdiff); arr=($str); "
"printf \"MaxDiff: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\\n\" "
"${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; "});
RunCommandToFd(fd, "UFS req_stats", {"/vendor/bin/sh", "-c",
"path=\"/dev/sys/block/bootdevice/req_stats\"; "
"printf \"\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"All Write Read Security Flush Discard; "
"str=$(cat $path/*_min); arr=($str); "
"printf \"Min:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; "
"str=$(cat $path/*_max); arr=($str); "
"printf \"Max:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; "
"str=$(cat $path/*_avg); arr=($str); "
"printf \"Avg.:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "
"${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; "
"str=$(cat $path/*_sum); arr=($str); "
"printf \"Count:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\\n\" "
"${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]};"});
std::string ufs_health = "for f in $(find /dev/sys/block/bootdevice/health_descriptor -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; echo ''; fi; done";
RunCommandToFd(fd, "UFS health", {"/vendor/bin/sh", "-c", ufs_health.c_str()});
}
// Dump items related to storage
void DumpstateDevice::dumpStorageSection(int fd) {
DumpUFS(fd);
}
// Dump items related to display // Dump items related to display
void DumpstateDevice::dumpDisplaySection(int fd) { void DumpstateDevice::dumpDisplaySection(int fd) {
DumpFileToFd(fd, "CRTC-0 underrun count", "/sys/kernel/debug/dri/0/crtc-0/underrun_cnt"); DumpFileToFd(fd, "CRTC-0 underrun count", "/sys/kernel/debug/dri/0/crtc-0/underrun_cnt");

View file

@ -70,7 +70,6 @@ struct DumpstateDevice : public IDumpstateDevice {
void dumpCpuSection(int fd); void dumpCpuSection(int fd);
void dumpDevfreqSection(int fd); void dumpDevfreqSection(int fd);
void dumpMemorySection(int fd); void dumpMemorySection(int fd);
void dumpStorageSection(int fd);
void dumpDisplaySection(int fd); void dumpDisplaySection(int fd);
void dumpSensorsUSFSection(int fd); void dumpSensorsUSFSection(int fd);
void dumpAoCSection(int fd); void dumpAoCSection(int fd);

View file

@ -29,4 +29,12 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
libmetrics_logger libmetrics_logger
# TPU DBA AIDL HAL service
PRODUCT_PACKAGES += \
com.google.edgetpu.dba-service
# TPU DBA HAL C API library
PRODUCT_PACKAGES += \
libedgetpu_dba_hal
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101-sepolicy/edgetpu/ BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs101-sepolicy/edgetpu/