From e8f300c3f50f70638ad58d9b47a53e2a5d40fa78 Mon Sep 17 00:00:00 2001 From: Adithya R Date: Sun, 28 Jan 2024 21:14:48 +0530 Subject: [PATCH] sdm660-common: Silence some spammy logging HWC and cit sensor logspam is so intense it bumps up logd's idle CPU usage up to over 3%. With this change, logs are much cleaner and logd idle CPU usage is reduced to under 1%, while still allowing error logs to pass through. - Do this only in user/debug builds (except eng). - Add wifi and cnss too while we're at it, they can get noisy at times. --- sdm660.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sdm660.mk b/sdm660.mk index 3ba567dc..60b4053e 100644 --- a/sdm660.mk +++ b/sdm660.mk @@ -323,6 +323,27 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.light-service.xiaomi +# Logging +SPAMMY_LOG_TAGS := \ + MiStcImpl \ + SDM \ + SDM-histogram \ + SRE \ + WifiHAL \ + cnss-daemon \ + libcitsensorservice@2.0-impl \ + libsensor-displayalgo \ + libsensor-parseRGB \ + libsensor-ssccalapi \ + sensors \ + vendor.qti.hardware.display.composer-service \ + vendor.xiaomi.sensor.citsensorservice@2.0-service + +ifneq ($(TARGET_BUILD_VARIANT),eng) +PRODUCT_VENDOR_PROPERTIES += \ + $(foreach tag,$(SPAMMY_LOG_TAGS),log.tag.$(tag)=E) +endif + # Media PRODUCT_PACKAGES += \ libgui_vendor