Merge "userdebug: support perfetto traces as a section in incident reports" into qt-dev
am: cfff472c8e
Change-Id: I98dcfaf8b40f2715c881023d41234508e37db238
This commit is contained in:
@@ -72,6 +72,8 @@ static TextParserBase* selectParser(int section) {
|
|||||||
return new PsParser();
|
return new PsParser();
|
||||||
case 2006:
|
case 2006:
|
||||||
return new BatteryTypeParser();
|
return new BatteryTypeParser();
|
||||||
|
case 3026: // system_trace is already a serialized protobuf
|
||||||
|
return new NoopParser();
|
||||||
default:
|
default:
|
||||||
// Return no op parser when no specific ones are implemented.
|
// Return no op parser when no specific ones are implemented.
|
||||||
return new NoopParser();
|
return new NoopParser();
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ bool section_requires_specific_mention(int sectionId) {
|
|||||||
switch (sectionId) {
|
switch (sectionId) {
|
||||||
case 3025: // restricted_images
|
case 3025: // restricted_images
|
||||||
return true;
|
return true;
|
||||||
|
case 3026: // system_trace
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,6 +321,14 @@ message IncidentProto {
|
|||||||
(section).args = "incidentcompanion --restricted_image"
|
(section).args = "incidentcompanion --restricted_image"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// System trace as a serialized protobuf.
|
||||||
|
optional bytes system_trace = 3026 [
|
||||||
|
(section).type = SECTION_FILE,
|
||||||
|
(section).args = "/data/misc/perfetto-traces/incident-trace",
|
||||||
|
(privacy).dest = DEST_AUTOMATIC,
|
||||||
|
(section).userdebug_and_eng_only = true
|
||||||
|
];
|
||||||
|
|
||||||
// Reserved for OEMs.
|
// Reserved for OEMs.
|
||||||
extensions 50000 to 100000;
|
extensions 50000 to 100000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,9 +408,10 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
|
|||||||
for (int i=0; i<descriptor->field_count(); i++) {
|
for (int i=0; i<descriptor->field_count(); i++) {
|
||||||
const FieldDescriptor* field = descriptor->field(i);
|
const FieldDescriptor* field = descriptor->field(i);
|
||||||
|
|
||||||
if (field->type() != FieldDescriptor::TYPE_MESSAGE
|
if (field->type() != FieldDescriptor::TYPE_MESSAGE &&
|
||||||
&& field->type() != FieldDescriptor::TYPE_STRING) {
|
field->type() != FieldDescriptor::TYPE_STRING &&
|
||||||
continue;
|
field->type() != FieldDescriptor::TYPE_BYTES) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SectionFlags s = getSectionFlags(field);
|
const SectionFlags s = getSectionFlags(field);
|
||||||
|
|||||||
Reference in New Issue
Block a user