AudioFlinger: Add memory leak checking for HAL
$ adb shell setprop libc.debug.malloc.program android.hardware.audio.service
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell setenforce 0
$ adb shell pkill audioserver
$ adb shell dumpsys media.audio_flinger
Test: Check the audio flinger dumpsys as above.
Bug: 186054996
Bug: 187462632
Change-Id: I610e4b72af9dc1704864adc148e6d6bd23319a8b
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 08d2d93..09b950a 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2088,7 +2088,7 @@
write(fd, result.string(), result.size());
}
-void AudioFlinger::PlaybackThread::dumpInternals_l(int fd, const Vector<String16>& args __unused)
+void AudioFlinger::PlaybackThread::dumpInternals_l(int fd, const Vector<String16>& args)
{
dprintf(fd, " Master volume: %f\n", mMasterVolume);
dprintf(fd, " Master mute: %s\n", mMasterMute ? "on" : "off");
@@ -2117,7 +2117,7 @@
}
if (output != nullptr) {
dprintf(fd, " Hal stream dump:\n");
- (void)output->stream->dump(fd);
+ (void)output->stream->dump(fd, args);
}
}