AudioFlinger: Log Record and MMap thread events

Also update track dump for better grouping and consistency.

Test: adb shell dumpsys media.audio_flinger
Bug: 62700410
Bug: 62701585
Change-Id: I3a6e76eac871cb08ff14d45f7d3992a6e7fba045
diff --git a/services/audioflinger/MmapTracks.h b/services/audioflinger/MmapTracks.h
index 2a27dfd..366a164 100644
--- a/services/audioflinger/MmapTracks.h
+++ b/services/audioflinger/MmapTracks.h
@@ -28,6 +28,7 @@
                             audio_channel_mask_t channelMask,
                             audio_session_t sessionId,
                             uid_t uid,
+                            pid_t pid,
                             audio_port_handle_t portId = AUDIO_PORT_HANDLE_NONE);
     virtual             ~MmapTrack();
 
@@ -39,7 +40,7 @@
     virtual bool        isFastTrack() const { return false; }
 
      static void        appendDumpHeader(String8& result);
-            void        dump(char* buffer, size_t size);
+            void        appendDump(String8& result, bool active);
 
 private:
     friend class MmapThread;
@@ -55,5 +56,6 @@
     virtual int64_t framesReleased() const;
     virtual void onTimestamp(const ExtendedTimestamp &timestamp);
 
+    pid_t mPid;
 };  // end of Track