From 1dc09189a23be00a7f8cf2d57b1c4692755bd193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 30 Apr 2024 10:16:56 +0000 Subject: [PATCH] NetBpfLoad: reduce logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move most spamy logs from ALOGD to ALOGV. Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: I04d472c363ab77de438ffb9b1227c69aa161f613 --- netbpfload/loader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/netbpfload/loader.cpp b/netbpfload/loader.cpp index 52428a3776..2b5f5c7c5b 100644 --- a/netbpfload/loader.cpp +++ b/netbpfload/loader.cpp @@ -512,7 +512,7 @@ static int readCodeSections(ifstream& elfFile, vector& cs, size_t s ret = readSectionByIdx(elfFile, i, cs_temp.data); if (ret) return ret; - ALOGD("Loaded code section %d (%s)", i, name.c_str()); + ALOGV("Loaded code section %d (%s)", i, name.c_str()); vector csSymNames; ret = getSectionSymNames(elfFile, oldName, csSymNames, STT_FUNC); @@ -532,13 +532,13 @@ static int readCodeSections(ifstream& elfFile, vector& cs, size_t s if (name == (".rel" + oldName)) { ret = readSectionByIdx(elfFile, i + 1, cs_temp.rel_data); if (ret) return ret; - ALOGD("Loaded relo section %d (%s)", i, name.c_str()); + ALOGV("Loaded relo section %d (%s)", i, name.c_str()); } } if (cs_temp.data.size() > 0) { cs.push_back(std::move(cs_temp)); - ALOGD("Adding section %d to cs list", i); + ALOGV("Adding section %d to cs list", i); } } return 0; @@ -869,7 +869,7 @@ static void applyRelo(void* insnsPtr, Elf64_Addr offset, int fd) { // Occasionally might be useful for relocation debugging, but pretty spammy if (0) { - ALOGD("applying relo to instruction at byte offset: %llu, " + ALOGV("applying relo to instruction at byte offset: %llu, " "insn offset %d, insn %llx", (unsigned long long)offset, insnIndex, *(unsigned long long*)insn); } @@ -1177,7 +1177,7 @@ int loadProg(const char* const elfPath, bool* const isCritical, const unsigned i } for (int i = 0; i < (int)mapFds.size(); i++) - ALOGD("map_fd found at %d is %d in %s", i, mapFds[i].get(), elfPath); + ALOGV("map_fd found at %d is %d in %s", i, mapFds[i].get(), elfPath); applyMapRelo(elfFile, mapFds, cs);