Commit graph

18994 commits

Author SHA1 Message Date
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
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
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
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
Christopher Ferris
e6884ce56f Add a ZipArchiveStreamEntry class.
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.

Included in this change is a small cleanup of the makefile.

Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
2016-01-14 12:30:20 -08:00
Steve Fung
047597b3fc Merge "crash_reporter: Remove udev collector from Android build" 2016-01-14 00:16:21 +00:00
Dimitry Ivanov
ebe04a9b89 Merge "Add libRS.so to the list of public libraries" 2016-01-13 23:27:20 +00:00
Dimitry Ivanov
cdb6fee17c Add libRS.so to the list of public libraries
Bug: http://b/26509995
Change-Id: I8c0ae3629928171d229a901cfc997780665e3ae8
2016-01-13 15:19:35 -08:00
Mark Salyzyn
7b7b2da6b8 Merge "logd: prune maintain per-id watermark" 2016-01-13 20:23:28 +00:00
Bertrand SIMONNET
0586504e01 metricsd: Persist the metrics to disk periodically.
Every now and then (5 minutes by default), the uploader will persist the
current metrics to disk to avoid losing them in case we exit
unexpectedly (reboot or crash).
When starting up, metricsd will load the previously saved log and resume
the metrics collection from there.

Bug: 25670584
Test: Unit tests.
Test: manual: restart metricsd. The saved log is detected and parsed
correctly.
Test: manual: Send a sample to metricsd, send SIGTERM to metricsd, the
log is saved to disk, metricsd restarts and picks up the log where it
left.

Change-Id: I4cefc62c7ea1fa51333d84d8a7ba0a2e9c7fd58f
2016-01-12 15:54:11 -08:00
Elliott Hughes
7a6cb3063c Merge "Toolbox: |ps -t| now correctly displays the USER for threads" 2016-01-12 23:07:12 +00:00
Phani (Gargey) Avadhanam
6268d4c057 Toolbox: |ps -t| now correctly displays the USER for threads
use tid to display thread information

Bug: https://code.google.com/p/android/issues/detail?id=198564
Bug: http://b/26470660
Signed-off-by: "Phani (Gargey) Avadhanam" <pgargey@codeaurora.org>
Change-Id: Ife8ce59d7b6eb6906ab39acebea18c7aee50339a
2016-01-12 15:06:09 -08:00
Mark Salyzyn
ae6aa1f1ed Merge "logd: wrap timed entry too early, timeout immediately" 2016-01-12 21:57:50 +00:00
Tom Cherry
b45f8179be Merge "Remove special case handling of "ro." properties permissions" 2016-01-12 20:36:32 +00:00
Mark Salyzyn
27460366e8 Merge "logd: unaligned access on security buffer" 2016-01-12 19:30:13 +00:00
Bertrand SIMONNET
b6c77af499 metricsd: Cleanup on TERM signal.
metricsd should shutdown cleanly when receiving a TERM signal:
* stop the binder watcher.
* wait for the thread to quit.
* Exit cleanly.

Note: This is not directly used as we don't send SIGTERM on shutdown or
when stopping services yet.

Bug: 25670584
Change-Id: I878d1e67474c72d24790f3540470e37a23112a95
2016-01-12 10:29:40 -08:00
Mark Salyzyn
4690640760 logd: unaligned access on security buffer
Bug: 26485626
Change-Id: I990447ca59982bb2de15decda575fd0e2838b5ed
2016-01-12 10:09:31 -08:00
Elliott Hughes
e4b332c7e4 Merge "libnetutils: Check socket() return value" 2016-01-12 04:46:37 +00:00
Steve Fung
c490e0fe98 crash_reporter: Remove udev collector from Android build
Currently one of the udev collector tests is failing due to the lack
of gzip on the device.  Since we don't have gzip nor udev in Android builds,
remove the udev collector (and tests) from Android builds.

See http://r.android.com/184708 for discussion on removing the udev
collector completely from the source.

Bug: 25779348
Test: `/data/nativetest/crash_reporter_tests/crash_reporter_tests` passes

Change-Id: I883359ac8219f2e1fa6a78927433dbc0be295fe7
2016-01-12 01:46:51 +00:00
Mark Salyzyn
507eb9fec2 logd: prune maintain per-id watermark
Without this change LogBuffer::prune and LogBuffer::erase
contributes 16.7% and 1.79% respectively. With this change,
they contributes 3.06 and 2.33% respectively. Pruning is
performed roughly 1 in every 255 log entries, a periodic
tamer latency spike.

Bug: 23685592
Change-Id: I6ae1cf9f3559bca4cf448efe8bcb2b96a1914c54
2016-01-11 14:46:51 -08:00
Tom Cherry
c787cf291a Remove special case handling of "ro." properties permissions
Currently, properties that begin with "ro." are special cased to skip
over the "ro." part of the prefix before matching with entries in
property_contexts.  This is not strictly needed however and it is
causing complications with the separated prop files work from Bug
21852512, so it is now removed.

Bug 26425619

Change-Id: I3cd14fa2176f96b3931e5f6a50c4a7bcd3af3da6
2016-01-11 14:00:40 -08:00
Dimitry Ivanov
cd60e4bdd6 Merge "Make libwebviewchromium_plat_support.so public" 2016-01-11 17:59:30 +00:00