Commit graph

19115 commits

Author SHA1 Message Date
James Hawkins
17bcba1631 Merge "bootstat: Followup cleanups from the initial bootstat checkin." 2016-01-20 22:59:44 +00:00
Alex Vakulenko
4ef51c348e Merge "crash_reporter/metricsd: Update libchrome APIs to r369476" 2016-01-20 22:43:45 +00:00
Steve Fung
78fcf66c17 crash_reporter: Fix unit tests to use ScopedTempDir
Some of the unit tests manually create their own temp
directories from a relative path.  This creates a temp folder
in the folder that the test is run from.  This is a problem
when using test_droid or a non-interactive ADB shell command,
since the root directory is not writable.  Instead use a
ScopedTempDir to handle temporary folders.

Bug: 26671657
Change-Id: Iaf71d345565dcb4393e80426784a864f7f8b5929
Test: Unit tests pass when running brillo_WhitelistedGtests
2016-01-20 14:23:13 -08:00
Mark Salyzyn
7cc8013e37 liblog: fix android_log_printLogLine empty event string
Allow _one_ empty line to get through before evaluating
further. Add __android_log_bswrite testing for content
and contentless cases; checking for propagation and for
expected printing. As for printing which is fixed here,
security variants cover the same code paths as the events.

Bug: 26646213
Change-Id: I484718aa604e0a00afde4c34a00e87468ea93aa5
2016-01-20 14:15:19 -08:00
Alex Vakulenko
ea05ff9229 crash_reporter/metricsd: Update libchrome APIs to r369476
The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: I9e45975cdef43913270b82e3fca2c027e614a464
2016-01-20 13:43:30 -08:00
James Hawkins
6d0d12a9d8 bootstat: Followup cleanups from the initial bootstat checkin.
* Clarify the README.md that the logs data may be utilized by anyone.
* Fix a whitespace issue.

Bug: 21724738
Change-Id: Id472485f505afb14588ccd645844a3f4a728abc2
2016-01-20 13:17:02 -08:00
Josh Gao
fb494eb40d Merge "adbd: don't leave zombies when subprocess creation fails." 2016-01-20 20:44:40 +00:00
Josh Gao
c65fae9ef5 adbd: don't leave zombies when subprocess creation fails.
Bug: http://b/26660675
Change-Id: I8e65d51af73f409c30be47575f76bc6b0f227c54
2016-01-20 11:40:31 -08:00
Steve Fung
333fc5c19d crash_reporter: Add unit tests to debug builds
Add crash_reporter_tests to debug builds, so that they can be
run by test_droid.

Bug: 26663796
Change-Id: Iddaa14ab55474875a45b0e8482bac310fbe8cff2
Test: /data/nativetest/crash_reporter_tests exists on eng build
2016-01-20 01:15:20 -08:00
Calin Juravle
312532252a Merge "nativebrige: log code_cache access errors to stderr as well" 2016-01-20 02:31:47 +00:00
Bertrand Simonnet
7fbe8b9285 Merge "metricsd: Add tests to the default debug build." 2016-01-20 02:18:33 +00:00
Bertrand SIMONNET
30c174b7f9 metricsd: Add tests to the default debug build.
This will allow the tests to be run by the continuous builder.

Bug: 26571398
Change-Id: I7eae2761603e83e3d1f003cb3b06582abc4ed24f
Test: Build an eng build. The tests are installed.
2016-01-19 17:58:40 -08:00
Elliott Hughes
d320cbf5ba Merge "bootstat: Fix the base includes to be AOSP-friendly." 2016-01-20 01:29:12 +00:00
James Hawkins
eabe08b55e bootstat: Fix the base includes to be AOSP-friendly.
Change-Id: I625cc55b41f5258addf3bb74bcef42063c565465
Bug: 21724738
2016-01-20 01:28:48 +00:00
Bertrand Simonnet
195bbc718b Merge "metricsd: Persist metrics on shutdown." 2016-01-20 00:58:37 +00:00
Mark Salyzyn
390100305b Merge "logd: prune maintain per-id watermark (part deux)" 2016-01-20 00:50:10 +00:00
Mark Salyzyn
7fd6c5c6f5 logd: prune maintain per-id watermark (part deux)
iterator corruption as we allow mLast to slip through the FIFO

Bug: 23685592
Bug: 26646087
Change-Id: Ifcbaecf390ee47b195c3d823d080c66c15db4530
2016-01-19 16:14:39 -08:00
James Hawkins
d0009911de Merge "system/core: Add initial implementation of the bootstat command." 2016-01-19 23:23:48 +00:00
James Hawkins
abd73e6179 system/core: Add initial implementation of the bootstat command.
The bootstat command enables the measurement and logging of boot time
metrics
for GMS devices.

BUG:21724738
Change-Id: I331456dd38a60fb4ef24a4d5320909dbad30db66
2016-01-19 15:10:38 -08:00
Josh Gao
6a27196516 Merge "fastboot: show progress when sending sparse images." 2016-01-19 23:02:14 +00:00
Josh Gao
d8ecde09c7 Merge "fastboot: add .clang-format." 2016-01-19 22:58:38 +00:00
Josh Gao
9da9ac5b2a fastboot: show progress when sending sparse images.
Bug: http://b/25443220
Change-Id: Ica0c88aea2a0661f39ff1415ebba464c037651da
2016-01-19 14:50:18 -08:00
Josh Gao
cb73db7cd8 fastboot: add .clang-format.
Change-Id: Iacad00adfa3948118543d680651814b3c8c42858
2016-01-19 14:49:45 -08:00
Christopher Ferris
ad12df20e9 Merge "Allow setting an arbitrary alignment for an entry." 2016-01-19 22:28:02 +00:00
Bertrand SIMONNET
d6862317a6 metricsd: Persist metrics on shutdown.
When metricsd receives a SIGTERM signal (on system shutdown for
example), save the metrics to disk before exiting.

Bug: 26184202
Test: Start metricsd. Log a metric sample. Stop metricsd. The metric is
saved to disk.

Change-Id: Ib224efa8837130393fac5d06fa80d320263cfc84
2016-01-19 14:04:25 -08:00
Christopher Ferris
5e9f3d44a3 Allow setting an arbitrary alignment for an entry.
The current code only allows the creation of an entry that is 32 bit
aligned.

Bug: 25446938

Change-Id: I6c924df12ef2bc067b3de7789257af7e3db7e904
2016-01-19 13:55:53 -08:00
Steve Fung
8074b16e3a Merge "crash_reporter: Add README.md" 2016-01-19 21:14:28 +00:00
Rubin Xu
95d1bd2421 Merge "Add logd security buffer tag types and string write API." 2016-01-19 20:40:16 +00:00
Bertrand Simonnet
818f757383 Merge "metricsd: Persist the metrics to disk periodically." 2016-01-19 19:09:57 +00:00
Bertrand Simonnet
90bfc8035b Merge "metricsd: Cleanup on TERM signal." 2016-01-19 19:09:45 +00:00
Nick Kralevich
542a511f87 Merge "logging: avoid unnecessary printfs" 2016-01-19 18:04:10 +00:00
Elliott Hughes
6acf7663c2 Merge "Remove unused cruft from <log/log.h>." 2016-01-19 17:27:09 +00:00
Rubin Xu
d545d2930e Add logd security buffer tag types and string write API.
Bug: 22860162
Change-Id: I1cceed3462eaebdd8208abf101b127f27f0023a7
2016-01-19 17:13:28 +00:00
Nick Kralevich
5db8d6aafa logging: avoid unnecessary printfs
Don't spend CPU cycles formatting a bunch of strings if we're
just going to throw them away later. Maybe make booting faster.

Change-Id: I4d8eb99fb3fa873ca91cf776933d0ad01988abf5
2016-01-16 16:20:24 -08:00
Elliott Hughes
3a84b685e9 Remove unused cruft from <log/log.h>.
The callers are, in fact, already gone.

Change-Id: I665183ce595b542b1e47df79bc8990e069571b97
2016-01-16 11:11:19 -08:00
Christopher Ferris
13655cdc77 Merge "Modify tests to use executable memory." 2016-01-16 17:44:18 +00:00
Christopher Ferris
61c48ac854 Modify tests to use executable memory.
The check_unreadble_elf_* tests only create a readable map. I changed
libunwind to disallow unwinding through non-executable maps, so make
the maps executable too.

Bug: 26589772
Change-Id: Idbe6426ac4d3243779b819c8f1aebdcdacb0669f
2016-01-15 16:08:58 -08:00
David Pursell
0eb8e1b706 libcutils: share Windows networking code.
This CL moves Windows networking code from fastboot to libcutils so
that it can be shared with other host programs such as adb.

Not all libcutils networking functions have been implemented for
Windows, just those necessary for fastboot. In the next CL I will do
the same for adb, adding any additional required functions.

Unit tests have also been added to test the functions using a loopback
connection.

Bug: http://b/26236380.
Change-Id: Ibc51a67030fe69a04c23512eefa9d19b055c7c12
2016-01-15 15:57:35 -08:00
Josh Gao
7db2cb67be Merge "adb: tag fatal, fatal_errno with printf attribute." 2016-01-15 23:51:05 +00:00
Josh Gao
56e9bb9bd6 adb: tag fatal, fatal_errno with printf attribute.
Also, fix bugs that this uncovered. In particular, the sysdeps_win32
FATAL macro would only print __FUNCTION__.

Change-Id: I6307ec9749edec21b4fee192e135a86ec445c84b
2016-01-15 15:25:31 -08:00
Josh Gao
3472410eac Merge "Increase the maximum shell command length to 4096ish." 2016-01-15 23:06:37 +00:00
Josh Gao
7e6683ce40 Increase the maximum shell command length to 4096ish.
The actual maximum length will depend on the version of the shell
protocol being used, and any additional parameters being passed through
(e.g. TERM=xterm-256color). This should be able to be raised to 64K for
devices with commit 3d2904c (L-MR1 and above), but that'll require some
plumbing.

Bug: http://b/20467103
Change-Id: Idf0c46af5b18b854110aba58df13a53297d2475f
2016-01-15 15:02:19 -08:00
Steve Fung
05de86ac25 crash_reporter: Add README.md
Add a README describing the basic functionality and configuration
of crash_reporter.  Also include some development tips based on
feedback from users.

Bug: 26387853
Change-Id: I42655841171fcfb0a8efdf587e596e6930357e4e
2016-01-15 14:58:17 -08:00
Dan Albert
422359aad4 Merge "Fix a couple sign-comparison warnings." 2016-01-15 21:29:58 +00:00
Christopher Ferris
9162c1496d Merge "Add a ZipArchiveStreamEntry class." 2016-01-15 21:00:46 +00:00
Dan Albert
bac7bb5c16 Fix a couple sign-comparison warnings.
Bug: http://b/26523949
Change-Id: Id33146b5544147945fee3f14f7f72f39bae449f6
2016-01-15 12:18:14 -08:00
Josh Gao
a590596dca Merge "debuggerd: fix debug.debuggerd.wait_for_gdb." 2016-01-15 19:32:08 +00:00
Josh Gao
c362c45949 debuggerd: fix debug.debuggerd.wait_for_gdb.
Bug: http://b/26513486
Change-Id: I01c28ce810a49f8a4e0e2a86c7d018d95f9617c8
2016-01-15 11:31:17 -08:00
Josh Gao
1bf7000033 Merge "debuggerd: fix several bugs caused by fork/setuid change." 2016-01-15 19:30:03 +00:00
Josh Gao
7c89f9e955 debuggerd: fix several bugs caused by fork/setuid change.
Previously, we weren't PTRACE_ATTACHing to all of the threads of a
process, and we were also trying to do it after forking and dropping
privileges. This patch ensures that all ptrace attaching/detaching
happens in one place, before forking/exiting respectively.

Bug: http://b/26443860
Bug: http://b/26436605
Bug: http://b/26436486
Change-Id: Id94e0c1d9d56c051d0dd281d895aaa3285079198
2016-01-14 15:06:37 -08:00