Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f28bcf5c authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Use property for local log lines

dumpsys lines can be increased up to 256 (kLogSize) by

adb shell setprop persist.audio.locallog.lines 256

Test: Run piano app and check audioflinger dumpsys
Bug: 30572472
Change-Id: Ie27812b15732432856452e4c46d81abf860aaee2
parent 5b4051af
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include <limits.h>

#include <cutils/compiler.h>
#include <cutils/properties.h>

#include <media/IAudioFlinger.h>
#include <media/IAudioFlingerClient.h>
+6 −2
Original line number Diff line number Diff line
@@ -994,8 +994,12 @@ private:

                dprintf(fd, "Local Log:\n");
                auto it = mLog.begin();
                if (!dumpAll && mLog.size() > kLogPrint) {
                    it += (mLog.size() - kLogPrint);
                if (!dumpAll) {
                    const size_t lines =
                            (size_t)property_get_int32("audio.locallog.lines", kLogPrint);
                    if (mLog.size() > lines) {
                        it += (mLog.size() - lines);
                    }
                }
                for (; it != mLog.end(); ++it) {
                    const int64_t ns = it->first;