Dumping stack traces to proto.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b9893c7892900148229cf19fa6268e7dc)
diff --git a/cmds/incidentd/src/Section.h b/cmds/incidentd/src/Section.h
index 8294be1..19ef7ee 100644
--- a/cmds/incidentd/src/Section.h
+++ b/cmds/incidentd/src/Section.h
@@ -103,7 +103,7 @@
*/
class WorkerThreadSection : public Section {
public:
- WorkerThreadSection(int id);
+ WorkerThreadSection(int id, const int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
virtual ~WorkerThreadSection();
virtual status_t Execute(ReportRequestSet* requests) const;
@@ -161,4 +161,18 @@
bool mBinary;
};
+/**
+ * Section that gets data from tombstoned.
+ */
+class TombstoneSection : public WorkerThreadSection {
+public:
+ TombstoneSection(int id, const char* type, const int64_t timeoutMs = 30000 /* 30 seconds */);
+ virtual ~TombstoneSection();
+
+ virtual status_t BlockingCall(int pipeWriteFd) const;
+
+private:
+ std::string mType;
+};
+
#endif // SECTIONS_H