Merge "make dumpLogSection compatible to new structure" into udc-dev am: 700b5287f8
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/21489267 Change-Id: I1f3833955f2401f284d94d7f5e34981011324692 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
ac97a24942
3 changed files with 5 additions and 30 deletions
|
@ -26,6 +26,7 @@ include device/google/gs-common/storage/storage.mk
|
||||||
include device/google/gs-common/thermal/thermal.mk
|
include device/google/gs-common/thermal/thermal.mk
|
||||||
include device/google/gs-common/performance/perf.mk
|
include device/google/gs-common/performance/perf.mk
|
||||||
include device/google/gs-common/soc/freq.mk
|
include device/google/gs-common/soc/freq.mk
|
||||||
|
include device/google/gs-common/gps/dump/log.mk
|
||||||
|
|
||||||
include device/google/zuma/dumpstate/item.mk
|
include device/google/zuma/dumpstate/item.mk
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ cc_binary {
|
||||||
"libdumpstateutil",
|
"libdumpstateutil",
|
||||||
"liblog",
|
"liblog",
|
||||||
"libutils",
|
"libutils",
|
||||||
|
"libdump",
|
||||||
"android.hardware.dumpstate-V1-ndk",
|
"android.hardware.dumpstate-V1-ndk",
|
||||||
],
|
],
|
||||||
vendor: true,
|
vendor: true,
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include <android-base/unique_fd.h>
|
#include <android-base/unique_fd.h>
|
||||||
#include <log/log.h>
|
#include <log/log.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <dump/pixel_dump.h>
|
||||||
#include "Dumpstate.h"
|
#include "Dumpstate.h"
|
||||||
|
|
||||||
#include "DumpstateUtil.h"
|
#include "DumpstateUtil.h"
|
||||||
|
|
||||||
#define MODEM_LOG_DIRECTORY "/data/vendor/radio/logs/always-on"
|
|
||||||
#define MODEM_EXTENDED_LOG_DIRECTORY "/data/vendor/radio/extended_logs"
|
#define MODEM_EXTENDED_LOG_DIRECTORY "/data/vendor/radio/extended_logs"
|
||||||
#define RIL_LOG_DIRECTORY "/data/vendor/radio"
|
#define RIL_LOG_DIRECTORY "/data/vendor/radio"
|
||||||
#define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir"
|
#define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir"
|
||||||
|
@ -39,9 +38,6 @@
|
||||||
#define MODEM_LOGGING_STATUS_PROPERTY "vendor.sys.modem.logging.status"
|
#define MODEM_LOGGING_STATUS_PROPERTY "vendor.sys.modem.logging.status"
|
||||||
#define MODEM_LOGGING_NUMBER_BUGREPORT_PROPERTY "persist.vendor.sys.modem.logging.br_num"
|
#define MODEM_LOGGING_NUMBER_BUGREPORT_PROPERTY "persist.vendor.sys.modem.logging.br_num"
|
||||||
#define MODEM_LOGGING_PATH_PROPERTY "vendor.sys.modem.logging.log_path"
|
#define MODEM_LOGGING_PATH_PROPERTY "vendor.sys.modem.logging.log_path"
|
||||||
#define GPS_LOG_DIRECTORY "/data/vendor/gps/logs"
|
|
||||||
#define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
|
|
||||||
#define GPS_LOGGING_STATUS_PROPERTY "vendor.gps.aol.enabled"
|
|
||||||
|
|
||||||
#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"
|
||||||
|
@ -59,8 +55,6 @@ namespace android {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace dumpstate {
|
namespace dumpstate {
|
||||||
|
|
||||||
#define GPS_LOG_PREFIX "gl-"
|
|
||||||
#define GPS_MCU_LOG_PREFIX "esw-"
|
|
||||||
#define MODEM_LOG_PREFIX "sbuff_"
|
#define MODEM_LOG_PREFIX "sbuff_"
|
||||||
#define EXTENDED_LOG_PREFIX "extended_log_"
|
#define EXTENDED_LOG_PREFIX "extended_log_"
|
||||||
#define RIL_LOG_PREFIX "rild.log."
|
#define RIL_LOG_PREFIX "rild.log."
|
||||||
|
@ -216,7 +210,6 @@ Dumpstate::Dumpstate()
|
||||||
{ "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } },
|
{ "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } },
|
||||||
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } },
|
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } },
|
||||||
{ "camera", [this](int fd, const std::string &destDir) { dumpCameraLogs(fd, destDir); } },
|
{ "camera", [this](int fd, const std::string &destDir) { dumpCameraLogs(fd, destDir); } },
|
||||||
{ "gps", [this](int fd, const std::string &destDir) { dumpGpsLogs(fd, destDir); } },
|
|
||||||
{ "gxp", [this](int fd, const std::string &destDir) { dumpGxpLogs(fd, destDir); } },
|
{ "gxp", [this](int fd, const std::string &destDir) { dumpGxpLogs(fd, destDir); } },
|
||||||
} {
|
} {
|
||||||
}
|
}
|
||||||
|
@ -341,26 +334,6 @@ void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) {
|
||||||
dumpNetmgrLogs(destDir);
|
dumpNetmgrLogs(destDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dumpstate::dumpGpsLogs(int fd, const std::string &destDir) {
|
|
||||||
bool gpsLogEnabled = ::android::base::GetBoolProperty(GPS_LOGGING_STATUS_PROPERTY, false);
|
|
||||||
if (!gpsLogEnabled) {
|
|
||||||
ALOGD("gps logging is not running\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const std::string gpsLogDir = GPS_LOG_DIRECTORY;
|
|
||||||
const std::string gpsTmpLogDir = gpsLogDir + "/.tmp";
|
|
||||||
const std::string gpsDestDir = destDir + "/gps";
|
|
||||||
|
|
||||||
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
|
|
||||||
|
|
||||||
RunCommandToFd(fd, "MKDIR GPS LOG", {"/vendor/bin/mkdir", "-p", gpsDestDir.c_str()},
|
|
||||||
CommandOptions::WithTimeout(2).Build());
|
|
||||||
|
|
||||||
dumpLogs(fd, gpsTmpLogDir, gpsDestDir, 1, GPS_LOG_PREFIX);
|
|
||||||
dumpLogs(fd, gpsLogDir, gpsDestDir, 3, GPS_MCU_LOG_PREFIX);
|
|
||||||
dumpLogs(fd, gpsLogDir, gpsDestDir, maxFileNum, GPS_LOG_PREFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Dumpstate::dumpCameraLogs(int fd, const std::string &destDir) {
|
void Dumpstate::dumpCameraLogs(int fd, const std::string &destDir) {
|
||||||
bool cameraLogsEnabled = ::android::base::GetBoolProperty(
|
bool cameraLogsEnabled = ::android::base::GetBoolProperty(
|
||||||
"vendor.camera.debug.camera_performance_analyzer.attach_to_bugreport", true);
|
"vendor.camera.debug.camera_performance_analyzer.attach_to_bugreport", true);
|
||||||
|
@ -437,6 +410,8 @@ void Dumpstate::dumpLogSection(int fd, int fd_bin)
|
||||||
}
|
}
|
||||||
endSection(fd, sectionName, startTime);
|
endSection(fd, sectionName, startTime);
|
||||||
|
|
||||||
|
dumpTextSection(fd, kAllSections);
|
||||||
|
|
||||||
// Dump all module logs
|
// Dump all module logs
|
||||||
if (!PropertiesHelper::IsUserBuild()) {
|
if (!PropertiesHelper::IsUserBuild()) {
|
||||||
for (const auto §ion : mLogSections) {
|
for (const auto §ion : mLogSections) {
|
||||||
|
@ -503,8 +478,6 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
|
||||||
dumpLogSection(fd, fd_bin);
|
dumpLogSection(fd, fd_bin);
|
||||||
}
|
}
|
||||||
|
|
||||||
dumpTextSection(fd, kAllSections);
|
|
||||||
|
|
||||||
return ndk::ScopedAStatus::ok();
|
return ndk::ScopedAStatus::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue