| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Since pids can belong to non hal processes as well, in theory.
Bug: 233130219
Test: build
Change-Id: I8ef6b2aaa871f6a8f992887a394d81c544e9cba4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
|
| |\
| |
| |
| |
| |
| |
| |
| | |
35a18b50c5 am: ddcab6fd21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11756603
Change-Id: I600de2a9a06834c454f29f6bfc0266a35b6600e4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The [&] capture does not handle smart pointers (unique_ptr, unique_fd
etc) well, which lead to leaked pointers. Fix by explicitly move the
smart pointers.
Bug: 158097879
Test: Build, flash and take an incident report. Verify no crash
Change-Id: I5150aa3dddf9d59c1c9d6d32370370e8cde23946
|
| |\|
| |
| |
| |
| |
| | |
of a reference." into rvc-dev am: ad24e49e2f am: 9d83125d4d
Change-Id: I129b61348e03980e0fa2372db3eb612fb3843f99
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
reference.
The referenced object could be destroyed and result in native crash when
mCallback is used.
Bug: 156536687
Test: manual test with registering a section from an app
Change-Id: Ie36c0e6e64be1246539f12999f037c24377686dd
|
| |/
|
|
|
|
|
|
| |
log/log.h is concerned with writing logs.
Bug: 78370064
Test: build
Change-Id: I3c7719bcbffc6809377e80292b00312b4598bfc2
|
| |
|
|
|
|
|
|
| |
Hold mLock when accessing mBatch and mHandlerLooper in ReportHandler.
Fixes: 147326028
Test: Take an incident report. Verify no race condition.
Change-Id: I9d6da0067731f253532f60e5abb12dfb238b5411
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EncodedBuffer is used a lot in incidentd. EncodedBuffer uses malloc
internally to acquire memory. Frequently creating and destroying
EncodedBuffer creates memory fragmentation, leading to high memory
usage after taking an incident report.
Also fixes a few other places with lots of malloc/free operations.
This change:
* Creates a pool of EncodedBuffer in incidentd. The saving is
significant. It reduces EncodedBuffer creation from 3 per section to
3 per report.
* Replaces malloc with mmap inside EncodedBuffer. mmap is guaranteed
to be mem page aligned, so there will be no mem fragmentation after
destroying EncodedBuffer.
* Replaces new with mmap inside TombstoneSection
* Forks a process to execute LogSection, because liblog malloc & free
significant amount of memory
Result:
PSS before taking a report: 1295 KB
PSS after taking a report: 1336 KB
Bug: 150311553
Test: heapprofd
Change-Id: I83bd9c969b751c80b2f42747020799bd85d8aae6
|
| |
|
|
|
|
|
|
|
|
| |
TextDumpsysSection used to inherent WorkerThreadSection, which
allocates 2x more memory than the dumped content. This change saves
the extra allocation by writing dumpsys content directly to FdBuffer.
Bug: 150311553
Test: Manually run "incident -p EXPLICIT 4000"
Change-Id: I9c0c0db75c8595822ee0711040e8865dd69378b6
|
| |
|
|
|
|
|
|
|
|
|
| |
The detached thread may live longer than the caller, and then "data"
goes out of scope. Fix it by managing data using a strong pointer.
Fixes: 151335416
Test: turn on hwasan, tweak WorkerThreadSection timeout, verify no
hwasan error
Change-Id: I179204b17c381e4e920b9aee07900150d9497639
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable Incidentd to dump any existing dumpsys section in plain text
(as dumpsys.proto), only in eng or userdebug build. This is for a
few dumpsys services that are prohibitively expensive to migrate to
protobuf dumpsys or will undergo a major rewrite (thus render the
previously defined proto completely useless).
Bug: 149816498
Bug: 146085372
Bug: 146086519
Test: $ incident -p EXPLICIT 4000 4001
Change-Id: I0693d9bace0055cfeb63d7c8d48995d57dc0b733
(cherry picked from commit 95ba73f9c9815da08cdb7015195939a3c1b250bd)
|
| |
|
|
|
|
|
|
|
|
|
| |
Add an API for priv and system app to register a dump callback with
Incident Service.
Bug: 145924375
Test: Register a callback dumping a string. Capture an incident report
and verify that the customized section exist.
Change-Id: I6fff6c1ee97e25963068d284ba37adce1bb5ec31
|
| |
|
|
|
|
|
| |
A recently added va_start() was missed its va_end(). We fix this.
Test: TreeHugger
Change-Id: I774da07096bee33bd91b78d734e8de946c87a87f
|
| |
|
|
|
|
| |
Bug: 142721354
Test: adb sehll incident -p EXPLICIT 1109
Change-Id: Iaee370310e36998e161955e0f12d98ac8cd8eb90
|
| |
|
|
|
|
|
| |
These are obsolete so we move all users to a single format.
Test: build, logging unit tests
Change-Id: I05ebb0b9135c61585ff103d24b785b9f21197257
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 crosshatch-userdebug
Merged-In: Iaaa312d2d9da73ca329807211227a8c7a049102c
Change-Id: Iaaa312d2d9da73ca329807211227a8c7a049102c
(cherry picked from commit 09a847902fa428f97841c3689b9f11243cc60460)
|
| |
|
|
|
|
|
|
|
| |
specifically mentioned in the IncidentReportArgs
Test: adb shell incident -p EXPLICIT -s com.google.android.incident.gts/.ReportReadyReceiver 3025
Test: adb shell incident -p EXPLICIT -s com.google.android.incident.gts/.ReportReadyReceiver
Bug: 123543706
Change-Id: I2c55831b73338f68196838ee529e595f566e657f
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, the decision to include or not include them was
done at runtime. This changes them to be behind a compile
time flag. It's just safer, because the code just isn't there
instead of being dependent on a system property.
Test: bit GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: If4e611914a7b0acd399ae27e55af8f718aee3ec8
|
| |
|
|
|
|
| |
Test: bit incident_test:* GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: I9f671dd5d8b2ad139f952a23e575c2be16120459
|
| |\
| |
| |
| |
| |
| |
| |
| | |
6af0e228f3 am: 78085ba0a3
am: ee844ad9a2
Change-Id: I53c2fd3886e565d824e2765671fb7965f07bd08d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add explicit to conversion constructors/operators
* Remove redundant explicit of copy constructors
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I26a11bb798d25605577269ed340e97afc8566960
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are cases where dumping Java traces times out and then later tries
to write to a closed pipe, causing incidentd to crash. This introduces a
handler for the SIGPIPE signal so it doesn't crash due to a closed pipe.
Bug: 111729299
Test: lower section timeout to 5 seconds and make sure incident service
doesn't crash
Change-Id: I868aba1ae21a50ae76977e0e09e782cf94198473
(cherry picked from commit 5b763c13472effa7df25cc53a44d5bdae9392410)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It will only print out a dump for userdebug or eng builds.
Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'
Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
|
| | |\
| | |
| | |
| | | |
found." into pi-dev
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a temporary solution to bypass failure of reading cpu info or
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.
Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added or changed some error messages and logging for easier debugging.
Log a few section errors to incident metadata in addition to logcat.
Also let incident reporting continue instead of failing when non-fatal
error occurs.
Bug: 119417232
Test: Take an incident report, and logcat.
Change-Id: Id18b7b690100923a8074d99b2312ee80c0bcd760
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are cases where dumping Java traces times out and then later tries
to write to a closed pipe, causing incidentd to crash. This introduces a
handler for the SIGPIPE signal so it doesn't crash due to a closed pipe.
Bug: 111729299
Test: lower section timeout to 5 seconds and make sure incident service
doesn't crash
Change-Id: I868aba1ae21a50ae76977e0e09e782cf94198473
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Arc++ devices don't have the /d/wakeup_sources file. There's a chance
other device won't have it either, and there may be other files that we
thought were standard but are actually not, so it's safer to just assume
that not every file will be available on every device and not treat a
missing file as an error.
Bug: 110109543
Test: atest incidentd_test
Change-Id: Ief09427f08d18aee611d057ddafdb9a3466744db
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It will only print out a dump for userdebug or eng builds.
This is the same change as the pi-dev one (http://ag/3909863), but due
to changes in master, that change has a merge conflict, so I have to
create a separate CL for master.
Bug: 77727638
Test: it builds
Change-Id: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
am: 193c893b01
Change-Id: Id32203ab069343410a02c03956a7c6135f8a1b33
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 78363774
Test: flash device, run 'adb shell incident', then check
'adb shell ps | grep incidentd'
Change-Id: I473894eb1c05ce8557da846d1ccdcbfa672356eb
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a temporary solution to bypass failure of reading cpu info or
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.
Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Each section's name will start with its type, e.g. file, gzip, cmd.
Bug: 77333635
Test: atest incidentd_test
Change-Id: I7c86f2682b1c2055c6063f6395fc7fe7fc7ffea5
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| | |
Bug: 78173836
Test: atest incidentd_test
Change-Id: I1e1b9f63d0e863c733c51efef432235eb94cdbab
|
| |/
|
|
|
|
|
|
|
| |
By moving the section stats collection before any return statements,
it won't missing stats collection.
Bug: 77962855
Test: atest incidentd_test
Change-Id: I0900556428c51636e24df48a407eb916ccff795c
|
| |
|
|
|
|
|
|
| |
This cl does not contain code logic changes.
Bug: 77333635
Test: manual and incidentd_test
Change-Id: Iea0a402b1051defd45159ca267e6dd705f9ffa49
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
FdBuffer won't take ownership of the `main` fd.
It only enforces transfer ownership in readProcessedDataInStream.
Bug: 74021345
Test: atest incidentd_test
Change-Id: I6182730241c81c34b3be865b827a2d3e8c10c21c
|
| |/
|
|
|
|
| |
Bug: 73354384, 76208934
Test: atest incidentd_test and manual as well
Change-Id: I074027f4d972686ae3e9415b50e4d3967f6a2355
|
| |\
| |
| |
| | |
it is ok to disable procrank since the information can be obtain via dumpsys meminfo" into pi-dev
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
But it is ok to disable procrank since the information can be obtain via
dumpsys meminfo
Optimize the code style a bit.
Bug: 72510307
Test: atest incidentd_test
Change-Id: If06201aa708461b569d9fb007f20d1e51342d5c2
|
| |/
|
|
|
|
| |
Bug: 76208934
Test: atest incidentd_test
Change-Id: Ibc101aa3c523398b1e9dd6cff3d6735b4d704667
|
| |
|
|
|
|
|
|
|
|
| |
a failure since it is used to signal EOF.
Additionally tag this message as auto so user_id won't become explicit.
Bug: 75017304
Test: atest incidentd_test
Change-Id: I151bab5a72a532e7c9f54ae0686561001730bdeb
|
| |
|
|
|
|
| |
Bug: 74021345
Test: manual and atest incidentd_test
Change-Id: Ib1000bfe6917c3d5cae7b9edce5b67d50897e10d
|
| |
|
|
|
|
|
|
|
| |
1. Remove dependency of libprotobuf-cpp-lite, saves .so mmap ~200KB
2. Don't use auto except iterator for readability.
Bug: 74254200
Test: adb shell dumpsys meminfo `pid incidentd`
Change-Id: If6198521c3b80929d6ea3f7ed466b5195991ccfd
|
| |
|
|
|
|
|
| |
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b9893c7892900148229cf19fa6268e7dc)
|
| |
|
|
|
|
| |
Bug: 74118023
Test: manual
Change-Id: Icd5f506c76d3a008a79cb6c9d2061962ca7fdd40
|
| |
|
|
|
|
|
|
|
|
|
| |
This section simply gzip a large file and stores result in GZippedFileProto
This greatly improves the size, before gzip, the last kmsg size ~500KB,
after gzip the proto size is ~60KB.
Bug: 73354384
Test: atest incidentd_test and manual on device test
Change-Id: I9bfc2cf07384487671edbffb5f0bd8495608fea6
|
| |
|
|
|
|
|
|
|
|
| |
The incidentd will accumulate the total size put into dropbox and once
it exceeds a threshold (currently 20MB) daily, it will stop further
requests. It allows collection again 24 hours later.
Bug: 64219725
Test: atest incidentd_test and manually flashed incidentd and test.
Change-Id: Iea21fbae40d5d01108797b190231d73e74eff213
|