The page block order is an independent variable from the free
page order table in the kernel, so the parser should not error
out if they do not match.
Bug: 110559361
Test: incident_helper_test
Change-Id: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
Merged-In: I08ad9c8f9b29cc15b80a89929f3a1fb6886852e6
(cherry picked from commit 3abb43991685d0ba40e70dd5f81abe044f65b891)
And implement a file section which reads from event-log-tags for
decoding binary logs.
Bug: 70936599
Test: atest incidentd_test && atest incident_helper_test and flush on
device and test log sections and event_log_tag_map
Change-Id: Ib3d35e317f355de69f01ded012482486e9a43da6
Also changing from execv to execvp so that we don't have to specify the full command path.
Bug: 65750831
Test: atest incident_helper_test
Change-Id: I92191afff4e7f9a6d08ea22ecfc2de5623d3bde5
recursively for all its submessages.
Also fix the wrong prefix for ro.build.version.XXX in proto.
It is safe to adjust proto number for now since it is not used yet.
Bug: 68774852
Test: atest incident_helper_test
Change-Id: I46e43a407da6efc393eb3c39733aaf25a5cceb13
defines http://go/treble-sysprop-compatibility.
Also refactored system properties proto to have nested proto
definitions. The reason to do it is to have flat proto definition makes
it super hard to manage its field numbers as well as hard to use.
Since we have a predefined list. Support parsing nested proto here.
Bug: 68774852
Test: unit tested and on device test
$ out/host/linux-x86/bin/incident_report -w system_properties
Change-Id: Icfc7cdcae184fb204c81e6434d21399aa84a1285
When poll from sysfs, revents return POLLERR by default, handles
this edge case in this cl.
Bug: 68774444
Test: unit tested + on device tests
Change-Id: I23540299c026d3e7676497f56690e9f8646a47bd
Support carriage return in Read class, and add a new way to parse lines
which is not able to split purly by delimiters
Bug: 65642861
Test: unit test and on device test
Change-Id: Ib82dd4e458bb7d2fa33462b23fbe11b828325916
By default, WriteStringToFile will not follow link, the 'false'
parameter is unnecessary.
Test: build
Change-Id: Ied6dcbf2a85533108dc2f6d71a4571b44684e800
1. Split the parsers to its own file to prevent all the parsers in one
gaint file.
2. Completely get rid of protobuf-cpp-full in incident_helper, use
ProtoOutputStream and cppstream instead, the incident_helper binary is
reduced from ~500K to ~113K.
3. Write data to protobuf even its values are zero/default, the reason
is for example we have a repeated int32 orders = 1; and people
explicitly append 0 so the total repeated field has 10 values, if zero
is not written to serialized data, this repeated field will only have 9
values which is not what we want at first place. This also aligns with
the default protobuf serialization behavior in incident_helper_test.
4. Use Android.bp for protoutil lib since it is not able to depend on
libs compiled by .mk file, it works the other way.
5. Add a new custom message option for streaming_proto, if specified,
the cppstream will create extra metadata to get field ids by field name.
A Table class is created in incident_helper to use it.
Bug: 67860303
Test: unit tested as well as on device test
Change-Id: I8e136fd15f343a4a623d20910ec64b622b478a3e
Implement EncodedBuffer that strip pii based on given privacy request.
The reason to implement another buffer is the length-delimited field's
size could change when its submessage gets stripped. It also intends to
keep the orignal data around for other requests to consume it.
In addition, the section implementation has adapted EncodedBuffer so
write out to each request's fd could be request-specific. The next step
is allow requests to set its privacy spec.
Notice the current design set the privacy spec of dropbox to AUTOMATIC,
this behavior might change in the future.
Bug: 64687253
Test: unit tests are writtern, see README.md for how to run unit tests.
Change-Id: I7ac236b8265ba9289dc6e17a8a5bf7f67ffb6bf5
Previously, the machinery that detected these was only enabled in
optimized builds. We're expanding it to work in code built with -O0, as
well. Thus, we now get compile-time warnings about these calls (which
get turned into errors by -Werror).
Bug: 12231437
Test: Builds without warnings about useless mode bits in calls to open()
Change-Id: Icb1bc5f0a7941bb90d8581d6c3bde7cc076f3e01
Bug: 63863444
Test: manual - create gtests for CommandSection and Procrank Parser following
instructions in the README.md of incidentd and incident_helper on how to
run them.
Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
0) Implements a skeleton of incident_helper
1) Implements FileSection class which calls incident_helper to parse
file content to protobuf
2) Adds Kernel Wake Sources to incident.proto and makes it parsed by
FileSection
3) Adds basic gtests to test FdBuffer, io_utils, FileSection
implementation
Bug: 62923266
Bug: 62926061
Test: manual - push incidentd, incident_helper and incident to my device
and verify kernel wakeup sources file is able to be parsed.
Change-Id: I2aa6b6158d962ce70e6fa6c8a9c42213a45ff41c