OSDN Git Service

Dumpstate: Add tombstone filtering
authorAndreas Gampe <agampe@google.com>
Tue, 22 Aug 2017 20:08:37 +0000 (13:08 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 22 Aug 2017 22:33:39 +0000 (15:33 -0700)
commitd0d7695ecbfd12aaecc8aec66aacb487b116ac0b
tree65e830755f6dd3a3b54a8104529adbfc53331f39
parent58854c2a55b3375dd1af8346f427c02eed78444c
Dumpstate: Add tombstone filtering

Only package the ten latest tombstones. This recovers the old behavior
when tombstones were limited to ten by tombstoned, and ensures that
bugreports stay small in size.

It is future work to optimize this, e.g., by packaging as many as possible.

Bug: 64290162
Test: m
Test: adb root && for ((i=0;i<50;i++)) ; do adb shell touch /data/tombstones/tombstone_$i ; done ; adb bugreport test.zip ; unzip -l test.zip | grep tomb
Change-Id: I4072b5fbcf1e0314aa3eebeefbadc61d5ec10787
cmds/dumpstate/dumpstate.cpp