From ef02dd1eed6dab29c135b7aa07c05b448b72d7ff Mon Sep 17 00:00:00 2001 From: Adithya R Date: Sun, 28 Jan 2024 21:14:48 +0530 Subject: [PATCH] Spacewar: 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. --- device.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/device.mk b/device.mk index d16e501..a4f8fb9 100644 --- a/device.mk +++ b/device.mk @@ -31,6 +31,27 @@ PRODUCT_PACKAGES += \ PRODUCT_ENFORCE_RRO_TARGETS := * +# 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 + # Soong namespaces PRODUCT_SOONG_NAMESPACES += \ $(LOCAL_PATH) \