Commit graph

18516 commits

Author SHA1 Message Date
Mark Salyzyn
2e2d2edc59 Merge "logd: test: statistics report chatty effective percentage" 2015-12-07 19:30:51 +00:00
Mark Salyzyn
8ca9a775f7 Merge "liblog: test: liblog.android_logger_get_ failure" 2015-12-07 19:30:40 +00:00
Mark Salyzyn
f33657da4d logd: test: statistics report chatty effective percentage
Add parsing to recognize optional chatty effective
percentage field as reported in the logger statistics.

Bug: 22855208
Change-Id: Id9c5e4a907ed0f9319beb9ddbfa27f4844bffc7d
2015-12-07 11:10:04 -08:00
Mark Salyzyn
7d8939ec1d liblog: test: liblog.android_logger_get_ failure
Change-Id: I8f74eca7857fe4cd6fa979d7bdeeda2b6a3e596b
2015-12-07 11:08:59 -08:00
Mark Salyzyn
69504d646d Merge "logd: liblog: logcat: switch to android_log_clockid() (2)" 2015-12-07 19:08:33 +00:00
Mark Salyzyn
ba7a9a016b logd: liblog: logcat: switch to android_log_clockid() (2)
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
2015-12-07 18:45:31 +00:00
Mark Salyzyn
b566435b02 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()"" 2015-12-07 18:31:44 +00:00
Mark Salyzyn
9e18cdcebd Revert "logd: liblog: logcat: switch to android_log_clockid()"
This reverts commit 77b5696b1d.

Change-Id: I7711bf1a7e3f72ed29a2498d7287b725a0e624bd
2015-12-07 18:30:58 +00:00
Mark Salyzyn
9eca0e775b Merge "logd: liblog: logcat: switch to android_log_clockid()" 2015-12-07 18:16:29 +00:00
Elliott Hughes
912ed3d8ca Merge "Track rename of base/ to android-base/." 2015-12-07 17:49:14 +00:00
Elliott Hughes
4f71319df0 Track rename of base/ to android-base/.
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
2015-12-04 22:00:26 -08:00
Elliott Hughes
1efab7acc5 Merge "Add a symlink android-base/ pointing to base/." 2015-12-04 23:22:00 +00:00
Elliott Hughes
7f24c45b7d Add a symlink android-base/ pointing to base/.
This lets us move things over piece by piece without breaking anything.

Change-Id: I06fc29572f63c4af9675888987acdcdea086711d
2015-12-04 15:18:27 -08:00
Mark Salyzyn
77b5696b1d logd: liblog: logcat: switch to android_log_clockid()
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
2015-12-04 14:49:19 -08:00
Bertrand Simonnet
f2eafd21a6 Merge changes Id186dc54,Ie8fee841
* changes:
  metricsd: Allows introspecting the metrics.
  metrics: Remove user action logic.
2015-12-04 21:17:50 +00:00
Bertrand SIMONNET
b13527d14e metricsd: Allows introspecting the metrics.
This CL adds a dump command to metrics_client that will dump the
histograms, aggregated by metricsd since it started, in a human readable
format.
This is useful for developers to ensure that their code uses libmetrics
correctly and the reported values are correct.

Sample output (redacted to fit the commit message):
$ metrics_client -d
Histogram: hello recorded 5 samples, average = 54.8 (flags = 0x1)
0   ...
9   --------O                 (1 = 20.0%) {0.0%}
16  O                         (0 = 0.0%) {20.0%}
29  --------O                 (1 = 20.0%) {20.0%}
54  ------------------------O (3 = 60.0%) {40.0%}
100 O                         (0 = 0.0%) {100.0%}
$

Bug: 25817310
Test: * Send a histogram with metrics_client.
      * `metrics_client -d` shows it.

Change-Id: Id186dc5463403ca9181ee9eef8f46b5e809b8714
2015-12-04 13:14:58 -08:00
Bertrand SIMONNET
f2297eeb1f metrics: Remove user action logic.
User actions are no longer reported anywhere, we can remove the logic.

Bug: 25818567
Change-Id: Ie8fee841bda6503a3f5781d73b0f879babe99b03
2015-12-04 13:04:23 -08:00
Bertrand Simonnet
c5e921fe52 Merge "metricsd: Log over binder." 2015-12-04 17:05:36 +00:00
Bertrand SIMONNET
6b8629a649 metricsd: Log over binder.
This CL converts metricsd, libmetrics and metrics_collector to use
Binder to pass metrics samples.

Bug: 25670685

Change-Id: I657faecdf4ed1226ab30ce69e062028463437e7b
2015-12-03 17:01:27 -08:00
Tom Cherry
65fc485574 Merge changes from topic 'prop-security'
* changes:
  Abort if __system_property_area_init fails
  restorecon /property_contexts
2015-12-03 22:55:32 +00:00
Josh Gao
1c6cd21c43 Merge "adbd: split up writes longer than 16k." 2015-12-03 22:50:11 +00:00
Josh Gao
6b531c4e6d adbd: split up writes longer than 16k.
Also, inline the bulk_read and bulk_write functions which were only
being used by one other function.

Bug: http://b/25847115
Change-Id: I218a869030219f606577a5529601c542488115e0
2015-12-03 14:40:03 -08:00
Bertrand Simonnet
1462c78c9c Merge "metricsd: Add clang format config." 2015-12-02 22:31:33 +00:00
Josh Gao
1702f427b5 Merge "adb: don't divide by zero" 2015-12-02 21:56:04 +00:00
Tom Cherry
6036114f93 Abort if __system_property_area_init fails
If __system_property_area_init() fails, there is a fundamental issue
with the system and we should abort from init.

Bug: 21852512
Change-Id: I05d7978ba3bcc347027a6d9443de7cdd229033d2
2015-12-02 11:29:12 -08:00
Elliott Hughes
d0d87f78e5 Merge "Fix "adb sync" (and "adb push") error reporting." 2015-12-02 18:53:28 +00:00
Bertrand SIMONNET
0c7e29b42e metricsd: Add clang format config.
This will make it easier to catch formatting nits.
This style is based on the Google style guide (well known publicly) and
follows the Chromium style changes we have adopted.

Bug: 25887990

Change-Id: If9562223752dfe611a32c341e703338f806bcc0f
2015-12-02 16:42:11 +00:00
Tom Cherry
e36a85cdcc restorecon /property_contexts
/property_contexts exists before selinux policies are loaded, so we must
restorecon before other processes can access it

Bug: 21852512
Change-Id: Ie983caac635eb928ab19eea996a5625f3673de39
2015-12-01 17:47:35 -08:00
Josh Gao
a3892504ac Merge changes I25bdcbc5,I12314da5,I055b0821
* changes:
  adb: don't pull symlinks when pulling a directory
  adb: remove extraneous newline from skip message
  adb: correctly count skipped files in push/pull
2015-12-01 02:42:09 +00:00
Dan Willemsen
3a6ae02b7b Merge "liblog: enable windows builds in soong" 2015-12-01 02:23:33 +00:00
Bertrand Simonnet
03f9069acc Merge "metricsd: Use different directories for each daemon." 2015-12-01 00:51:39 +00:00
Bertrand Simonnet
8a2a635d3c Merge "metricsd: Specify directory for persistent integers." 2015-12-01 00:51:02 +00:00
Christopher Ferris
07d9de7016 Merge "Change the way some maps are printed." 2015-12-01 00:29:38 +00:00
Dan Willemsen
a3f41bf774 liblog: enable windows builds in soong
Change-Id: I426cdebeddf653bf2daacb3e0724516ac78756cb
2015-11-30 15:57:41 -08:00
Christopher Ferris
da750a79c9 Change the way some maps are printed.
Before, an anonymous map wound up printing the pc as relative.
Unfortunately, this meant that it was impossible to tell the actual
pc. The new code prints the map name as <anonymous:map_start> and
still prints the pc as relative.

In addition, add the start of the map for map names that begin with a
'[' character.

Bug: 25844836
Change-Id: Ie0b6149dde258fe13f0e5a3e5739d85374512f4b
2015-11-30 14:39:52 -08:00
Bertrand SIMONNET
9d3a4aeae2 metricsd: Use different directories for each daemon.
Instead of using a single directory for both the internal data of
metricsd and metrics_collector and the shared files (metrics samples log
file and the metrics enabled file), we should use separate directory to
allow for a finer access control.

The new structure will be:
* /data/misc/metrics for the files accessible to all daemons reporting
  metrics, metricsd and metrics_collector.
* /data/misc/metricsd for the private files of metricsd.
* /data/misc/metrics_collector for the private files of
  metrics_collector.

Bug: 25886951
Test: Unit tests.
Test: Manual: metricsd and metrics_collector run without errors.

Change-Id: I006d19f45f5f419d2b08744126c2e2a0b899c9fa
2015-11-30 13:34:49 -08:00
Bertrand SIMONNET
a7bc1c14df metricsd: Specify directory for persistent integers.
Instead of using a global directory for persistent integers, specify the
directory to use in the constructor.
This will make changing the backing directory easier.

Bug: 25886951

Change-Id: I590816b195fa81b179a5ec78b9cdf41bc86353dc
2015-11-30 13:34:49 -08:00
Josh Gao
b0e039f4ca adb: don't divide by zero
If we stat a file and get a size of 0, and then successfully read bytes
from that file, we would previously divide by zero when calculating the
percentage completion of the file. This case happens either when we're
racing against something else writing to the file, or when we're pulling
magical files such as the ones in /dev/cpuctl/ that lie about their
size.

Bug: http://b/25925733
Change-Id: I980b9c14f44a1eb4a42bc8736c94fa6db06c08d1
2015-11-30 12:03:12 -08:00
Josh Gao
7b284b2f22 adb: don't pull symlinks when pulling a directory
The previous change to do this (f96dc73b) only skipped individually
named symlinks, not symlinks inside of a directory that was being
pulled.

Bug: http://b/25601283
Change-Id: I25bdcbc546a9d3a0dbd8dacdb065fb134d96022b
2015-11-30 11:02:44 -08:00
Josh Gao
d3266e058e adb: remove extraneous newline from skip message
Change-Id: I12314da589bf0db14b37ae4c1f526665182f4776
2015-11-30 11:02:21 -08:00
Nick Kralevich
e08e4656db Merge "fs_config.c: Remove obsolete reference to /system/bin/pppd-ril" 2015-11-30 18:45:14 +00:00
Josh Gao
dd6cc4d7ee adb: correctly count skipped files in push/pull
Bug: http://b/25650207
Change-Id: I055b08216938640c4f7c5e96a7ea3719bf90ba70
2015-11-30 10:42:37 -08:00
Nick Kralevich
cbbc66174c fs_config.c: Remove obsolete reference to /system/bin/pppd-ril
Codesearch finds no reference to this in the Android tree. It was
added in 2010 in commit bbf1c64527.

Change-Id: I8cd1153912b78b4b23b8f5ba2577a58c5c49e316
2015-11-30 09:17:18 -08:00
Nick Kralevich
0380d49024 Merge "fs_config: remove setuid bit from librank" 2015-11-30 14:53:20 +00:00
Nick Kralevich
3e6356834f fs_config: remove setuid bit from librank
Anyone wanting to call /system/xbin/librank can execute "su"
beforehand. There's no need for it to be setuid root.

Bug: 25739721
Change-Id: Ie3d68701397d21e901bf1ec17b4b4a9f12128d2d
2015-11-27 18:08:22 -08:00
Steve Fung
2e012ef3bf Merge "crash_reporter: Use cacerts_google" 2015-11-24 21:13:12 +00:00
Josh Gao
166e716851 Merge changes I36b66fc5,I0561affb
* changes:
  libcutils: turn on -Werror on Win32, fix resulting build break.
  libcutils: add prefix to local variables in Android.mk.
2015-11-24 20:12:08 +00:00
Josh Gao
1175d0fdb0 libcutils: turn on -Werror on Win32, fix resulting build break.
Mingw doesn't provide strndup or strtok_r used in str_parms.c, resulting in
-Wimplicit-function-declaration being emitted for the Windows build.
None of the consumers of str_parms.c appear to be compiled for Windows,
so we can just remove it from the Windows build.

Change-Id: I36b66fc54ed261d38f5294bc8662ddb2db4fe64f
2015-11-24 09:35:45 -08:00
Chih-hung Hsieh
f091dfe010 Merge "Add explicit cast to shut off clang warnings." 2015-11-24 17:08:20 +00:00
Josh Gao
9e86f8e036 libcutils: add prefix to local variables in Android.mk.
Change-Id: I0561affbcc306c20f8aa87beb2d9728a9bb79f5e
2015-11-24 08:45:07 -08:00