diff options
author | Ryan Savitski <rsavitski@google.com> | 2019-06-03 23:57:09 +0100 |
---|---|---|
committer | Ryan Savitski <rsavitski@google.com> | 2019-06-05 22:56:08 +0100 |
commit | 09a847902fa428f97841c3689b9f11243cc60460 (patch) | |
tree | debef863dcc0f70e459159b09bbd2ee0a59f4042 /tools/incident_section_gen/main.cpp | |
parent | 277082c2d8bc4905701a7f610fc741d5451d479b (diff) |
userdebug: support perfetto traces as a section in incident reports
This set of patches adds a way for the perfetto command line client to
save a trace to a hardcoded location,
/data/misc/perfetto-traces/incident-trace, and call into incidentd to
start a report, which will include said trace in a new section.
This is not a long-term solution, and is structured to minimize changes
to perfetto and incidentd. The latter is currently architected in a way
where it can only pull pre-defined information out of the system, so
we're resorting to persisting the intermediate results in a hardcoded
location.
This will introduce at most two more linked files at the same time.
Bug: 130543265
Tested: manually on blueline-userdebug
Change-Id: Iaaa312d2d9da73ca329807211227a8c7a049102c
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r-- | tools/incident_section_gen/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp index c9c0edc59585..91f875ed9918 100644 --- a/tools/incident_section_gen/main.cpp +++ b/tools/incident_section_gen/main.cpp @@ -408,9 +408,10 @@ static bool generateSectionListCpp(Descriptor const* descriptor) { for (int i=0; i<descriptor->field_count(); i++) { const FieldDescriptor* field = descriptor->field(i); - if (field->type() != FieldDescriptor::TYPE_MESSAGE - && field->type() != FieldDescriptor::TYPE_STRING) { - continue; + if (field->type() != FieldDescriptor::TYPE_MESSAGE && + field->type() != FieldDescriptor::TYPE_STRING && + field->type() != FieldDescriptor::TYPE_BYTES) { + continue; } const SectionFlags s = getSectionFlags(field); |