Move cma dump to itself
Bug: 273380985 Test: adb bugreport Change-Id: I6732dd8dbbf0367f99e25b29f2a0dd526aaac9d4
This commit is contained in:
parent
bebd549851
commit
05082134e1
5 changed files with 24 additions and 15 deletions
|
@ -25,6 +25,7 @@ include device/google/gs-common/thermal/thermal.mk
|
|||
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
|
||||
include device/google/gs-common/performance/perf.mk
|
||||
include device/google/gs-common/display/dump.mk
|
||||
include device/google/gs101/dumpstate/item.mk
|
||||
|
||||
TARGET_BOARD_PLATFORM := gs101
|
||||
DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false)
|
||||
|
|
|
@ -2,6 +2,13 @@ package {
|
|||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
sh_binary {
|
||||
name: "dump_gs101.sh",
|
||||
src: "dump_gs101.sh",
|
||||
vendor: true,
|
||||
sub_dir: "dump",
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.dumpstate-service.gs101",
|
||||
srcs: [
|
||||
|
|
|
@ -241,7 +241,6 @@ void endSection(int fd, const std::string §ionName, timepoint_t startTime) {
|
|||
|
||||
Dumpstate::Dumpstate()
|
||||
: mTextSections{
|
||||
{ "memory", [this](int fd) { dumpMemorySection(fd); } },
|
||||
{ "power", [this](int fd) { dumpPowerSection(fd); } },
|
||||
{ "camera", [this](int fd) { dumpCameraSection(fd); } },
|
||||
} {
|
||||
|
@ -492,20 +491,6 @@ void Dumpstate::dumpPowerSection(int fd) {
|
|||
|
||||
}
|
||||
|
||||
// Dump items related to memory
|
||||
void Dumpstate::dumpMemorySection(int fd) {
|
||||
RunCommandToFd(fd, "Pixel CMA stat", {"/vendor/bin/sh", "-c",
|
||||
"for d in $(ls -d /sys/kernel/pixel_stat/mm/cma/*); do "
|
||||
"if [ -f $d ]; then "
|
||||
"echo --- $d; cat $d; "
|
||||
"else "
|
||||
"for f in $(ls $d); do "
|
||||
"echo --- $d/$f; cat $d/$f; "
|
||||
"done; "
|
||||
"fi; "
|
||||
"done"});
|
||||
}
|
||||
|
||||
// Dump essential camera debugging logs
|
||||
void Dumpstate::dumpCameraSection(int fd) {
|
||||
RunCommandToFd(fd, "Camera HAL Graph State Dump", {"/vendor/bin/sh", "-c",
|
||||
|
|
14
dumpstate/dump_gs101.sh
Normal file
14
dumpstate/dump_gs101.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/vendor/bin/sh
|
||||
echo "------ Pixel CMA stat ------"
|
||||
for d in $(ls -d /sys/kernel/pixel_stat/mm/cma/*); do
|
||||
if [ -f $d ]; then
|
||||
echo --- $d
|
||||
cat $d
|
||||
else
|
||||
for f in $(ls $d); do
|
||||
echo --- $d/$f
|
||||
cat $d/$f
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
2
dumpstate/item.mk
Normal file
2
dumpstate/item.mk
Normal file
|
@ -0,0 +1,2 @@
|
|||
PRODUCT_PACKAGES += dump_gs101.sh
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue