<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/bootstat, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>Report non-empty system boot reason when bootloader reason is empty</title>
<updated>2019-05-22T16:46:02+00:00</updated>
<author>
<name>Wei Wang</name>
<email>wvw@google.com</email>
</author>
<published>2019-05-22T16:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=699e342b3d77c4e2b7e856621e1ce1150859582f'/>
<id>699e342b3d77c4e2b7e856621e1ce1150859582f</id>
<content type='text'>
Bug: 133321647
Test: build
Change-Id: Icd3ea4b69ef2ad040926e2b0e121a8f5f1c1b658
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 133321647
Test: build
Change-Id: Icd3ea4b69ef2ad040926e2b0e121a8f5f1c1b658
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: add 3 pmic off reasons to known set</title>
<updated>2019-05-03T14:41:21+00:00</updated>
<author>
<name>Jone Chou</name>
<email>jonechou@google.com</email>
</author>
<published>2019-04-18T07:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=edf4682cae1cf34172faa5542b6f63c57742b627'/>
<id>edf4682cae1cf34172faa5542b6f63c57742b627</id>
<content type='text'>
regular expression:
- "reboot,pmic_off_fault,.*" (175)
- "reboot,pmic_off_s3rst,.*" (176)
- "reboot,pmic_off_other,.*" (177)

regex is dependent on:
https://android-review.googlesource.com/947976

Test: none
Bug: 116838876
Bug: 128929506
Change-Id: I7fae9ecee536f790c8f493c3f5e5f75b03efb1d6
Signed-off-by: Jone Chou &lt;jonechou@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
regular expression:
- "reboot,pmic_off_fault,.*" (175)
- "reboot,pmic_off_s3rst,.*" (176)
- "reboot,pmic_off_other,.*" (177)

regex is dependent on:
https://android-review.googlesource.com/947976

Test: none
Bug: 116838876
Bug: 128929506
Change-Id: I7fae9ecee536f790c8f493c3f5e5f75b03efb1d6
Signed-off-by: Jone Chou &lt;jonechou@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: Allow regex matches for boot reasons</title>
<updated>2019-05-01T18:17:04+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2019-04-18T19:41:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=c805a48b116a0b5879f524fa34411d5f91fef6ff'/>
<id>c805a48b116a0b5879f524fa34411d5f91fef6ff</id>
<content type='text'>
If the matching string contains a [, \ or *, then it is also checked
with a regex match.  Exact match is always tried firsts.  If we do
not find an exact string match, switch to iterate through the entire
list for regex strings to find a match.

This allows us to scale with details without consuming a large
number of enums, permitting details that we do not necessarily want
resolution on to propagate to TRON.  The hierarchical nature of the
boot reason &lt;reason&gt;,&lt;subreason&gt;,&lt;detail&gt;... can cause scenarios
where the &lt;detail&gt; does not matter to TRON, but does matter to
bugreport collection.

Add a bootstat --boot_reason_enum function to expose and test the
kBootReasonMap matchihg algorithm.

Add a kBootReasonMap test that exhaustively tests all built-in
entries, and an example of one regex entry.  New regex entries added
to bootstat.cpp will need a series of exact match examples added into
filter_kBootReasonMap() function.

Test: boot_reason_test.sh kBootReasonMap (or all tests)
Bug: 116838876
Bug: 128929506
Change-Id: I3f7b5de22f99195b7ce99672a212174365960b3f
Merged-In: I3f7b5de22f99195b7ce99672a212174365960b3f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the matching string contains a [, \ or *, then it is also checked
with a regex match.  Exact match is always tried firsts.  If we do
not find an exact string match, switch to iterate through the entire
list for regex strings to find a match.

This allows us to scale with details without consuming a large
number of enums, permitting details that we do not necessarily want
resolution on to propagate to TRON.  The hierarchical nature of the
boot reason &lt;reason&gt;,&lt;subreason&gt;,&lt;detail&gt;... can cause scenarios
where the &lt;detail&gt; does not matter to TRON, but does matter to
bugreport collection.

Add a bootstat --boot_reason_enum function to expose and test the
kBootReasonMap matchihg algorithm.

Add a kBootReasonMap test that exhaustively tests all built-in
entries, and an example of one regex entry.  New regex entries added
to bootstat.cpp will need a series of exact match examples added into
filter_kBootReasonMap() function.

Test: boot_reason_test.sh kBootReasonMap (or all tests)
Bug: 116838876
Bug: 128929506
Change-Id: I3f7b5de22f99195b7ce99672a212174365960b3f
Merged-In: I3f7b5de22f99195b7ce99672a212174365960b3f
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: add 4 reboot reasons to known set</title>
<updated>2019-03-20T11:44:20+00:00</updated>
<author>
<name>Jone Chou</name>
<email>jonechou@google.com</email>
</author>
<published>2019-03-20T11:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=508e615b8e55c6f0fae6b538c7fa2a92390b4b84'/>
<id>508e615b8e55c6f0fae6b538c7fa2a92390b4b84</id>
<content type='text'>
- reboot,rtc
- reboot,dm-verity_device_corrupted
- reboot,dm-verity_enforcing
- reboot,keys_clear

Test: none
Bug: 128929506
Bug: 128929604
Change-Id: I5438c236abb67b74c7b9d717930c0ea69f70540d
Signed-off-by: Jone Chou &lt;jonechou@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- reboot,rtc
- reboot,dm-verity_device_corrupted
- reboot,dm-verity_enforcing
- reboot,keys_clear

Test: none
Bug: 128929506
Bug: 128929604
Change-Id: I5438c236abb67b74c7b9d717930c0ea69f70540d
Signed-off-by: Jone Chou &lt;jonechou@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: add recovery,quiescent and reboot,quiescent to known set</title>
<updated>2019-03-11T17:08:05+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2019-03-11T17:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=6fc0829c5af3d3f03882bb3b67ae384c181c82e8'/>
<id>6fc0829c5af3d3f03882bb3b67ae384c181c82e8</id>
<content type='text'>
Reserve recovery,quiescent and reboot,quiescent to known reboot
reasons.

Test: none
Bug: 120624642
Change-Id: I78c52f6db447c9d3980a3f2007471bc7aa60e25f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reserve recovery,quiescent and reboot,quiescent to known reboot
reasons.

Test: none
Bug: 120624642
Change-Id: I78c52f6db447c9d3980a3f2007471bc7aa60e25f
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: add salyzyn as owner</title>
<updated>2019-02-28T22:10:34+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2019-02-28T22:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=fe85df1c0d048658be29a3e60c77fb00eb922055'/>
<id>fe85df1c0d048658be29a3e60c77fb00eb922055</id>
<content type='text'>
Test: none
Change-Id: I1d8874dfb5cc9efaed5ad85702a054f1c2a7766f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: none
Change-Id: I1d8874dfb5cc9efaed5ad85702a054f1c2a7766f
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: local GetProperty use libbase</title>
<updated>2019-02-11T21:16:59+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2019-02-08T18:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=88d308d7864a201d2f8994370efd2c391b521c20'/>
<id>88d308d7864a201d2f8994370efd2c391b521c20</id>
<content type='text'>
libbase GetProperty collects the properties properly, which also
allow for content greater than 128 bytes in length.

Replace internal GetProperty and SetProperty helpers with libbase
version.

Test: unit tests
Bug: 121161069
Bug: 124114707
Change-Id: Ic0829955705ebaa19d747bb3f6942f4b9786316a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libbase GetProperty collects the properties properly, which also
allow for content greater than 128 bytes in length.

Replace internal GetProperty and SetProperty helpers with libbase
version.

Test: unit tests
Bug: 121161069
Bug: 124114707
Change-Id: Ic0829955705ebaa19d747bb3f6942f4b9786316a
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: crash when parsing ro.boot.boottime</title>
<updated>2019-02-08T19:54:41+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2019-02-08T18:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=7c72116c4313889e1008b247ea5c167f7aeb2f04'/>
<id>7c72116c4313889e1008b247ea5c167f7aeb2f04</id>
<content type='text'>
If ro.boot.boottime is malformed or truncated, it will crash
bootstat operations.

Test: compile
Bug: 121161069
Bug: 124114707
Change-Id: Ie2edcffb6d54a8e0c7f2e9a89ae4b29cce246d75
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If ro.boot.boottime is malformed or truncated, it will crash
bootstat operations.

Test: compile
Bug: 121161069
Bug: 124114707
Change-Id: Ie2edcffb6d54a8e0c7f2e9a89ae4b29cce246d75
</pre>
</div>
</content>
</entry>
<entry>
<title>bootstat: Update boot reason property earlier</title>
<updated>2019-02-08T02:55:06+00:00</updated>
<author>
<name>Wei Wang</name>
<email>wvw@google.com</email>
</author>
<published>2019-02-07T18:05:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=4e9c653c932cf2dc7638ab2de58b5bb85a1c0c47'/>
<id>4e9c653c932cf2dc7638ab2de58b5bb85a1c0c47</id>
<content type='text'>
bootstat updates boot reason upon boot_complete, however users of the
updated properties e.g. getLastShutdownReason from PowerManager could
be called before boot_complete. This introduces a inconsistency and
racing for those APIs.

In this CL, we change boot reason to be updated at the same time when
zygote starts where persist properties have been loaded already. Also
the initialization of bootloader's boot reason is pulled into post-fs
where all kernel command line arguments have been parsed in init already.

Bug: 122696730
Bug: 119509425
Test: trigger thermal shutdown and see warnings
Test: verify boot reason properties updated correctly post boot
Change-Id: Ia393b98ea072bc0ae6e4110d111393b34be0ee5d
Signed-off-by: Wei Wang &lt;wvw@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bootstat updates boot reason upon boot_complete, however users of the
updated properties e.g. getLastShutdownReason from PowerManager could
be called before boot_complete. This introduces a inconsistency and
racing for those APIs.

In this CL, we change boot reason to be updated at the same time when
zygote starts where persist properties have been loaded already. Also
the initialization of bootloader's boot reason is pulled into post-fs
where all kernel command line arguments have been parsed in init already.

Bug: 122696730
Bug: 119509425
Test: trigger thermal shutdown and see warnings
Test: verify boot reason properties updated correctly post boot
Change-Id: Ia393b98ea072bc0ae6e4110d111393b34be0ee5d
Signed-off-by: Wei Wang &lt;wvw@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switch to using android-base/file.h instead of android-base/test_utils.h</title>
<updated>2018-11-14T17:35:34+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2018-11-12T20:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=9f1cf25332e33247b1b036ce07b32d09e076c346'/>
<id>9f1cf25332e33247b1b036ce07b32d09e076c346</id>
<content type='text'>
Test: compile
Bug: 119313545
Change-Id: I4f7ad84743e974b4b4d1d7256088f6c8b749a237
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: compile
Bug: 119313545
Change-Id: I4f7ad84743e974b4b4d1d7256088f6c8b749a237
</pre>
</div>
</content>
</entry>
</feed>
