TextDumpsysSection memory optimization
TextDumpsysSection used to inherent WorkerThreadSection, which
allocates 2x more memory than the dumped content. This change saves
the extra allocation by writing dumpsys content directly to FdBuffer.
Bug: 150311553
Test: Manually run "incident -p EXPLICIT 4000"
Change-Id: I9c0c0db75c8595822ee0711040e8865dd69378b6
diff --git a/cmds/incidentd/src/Section.h b/cmds/incidentd/src/Section.h
index 6162b3a..2ce45ed 100644
--- a/cmds/incidentd/src/Section.h
+++ b/cmds/incidentd/src/Section.h
@@ -130,12 +130,12 @@
/**
* Section that calls text dumpsys on a system service, usually "dumpsys [service_name]".
*/
-class TextDumpsysSection : public WorkerThreadSection {
+class TextDumpsysSection : public Section {
public:
TextDumpsysSection(int id, const char* service, ...);
virtual ~TextDumpsysSection();
- virtual status_t BlockingCall(unique_fd& pipeWriteFd) const;
+ virtual status_t Execute(ReportWriter* writer) const;
private:
String16 mService;