Commit graph

20635 commits

Author SHA1 Message Date
Treehugger Robot
ed3596aadf Merge "Switch libprocessgroup to libbase logging." 2016-08-03 17:04:36 +00:00
Treehugger Robot
33bf662195 Merge "Fix google-explicit-constructor warnings in logd." 2016-08-03 16:29:17 +00:00
Elliott Hughes
171df0a092 Switch libprocessgroup to libbase logging.
This lets us see what's going on in init.

Bug: http://b/29751426
Merged-In: I73432dc7608ca0dc8e421a2f3a750b37c6743f62
Change-Id: I73432dc7608ca0dc8e421a2f3a750b37c6743f62
2016-08-03 09:11:04 -07:00
Treehugger Robot
9a5300fcb8 Merge "Have init kill the process group." 2016-08-02 23:01:54 +00:00
Elliott Hughes
1e73024653 Have init kill the process group.
killProcessGroup actually works on cgroups. Kill the POSIX process
group ourselves.

Bug: http://b/29751426
Change-Id: I1a2808488510f4262811b6407bcd0948ad23bc60
2016-08-02 14:20:40 -07:00
Dan Willemsen
11708e0236 Merge "Remove Brillo-specific LOCAL_MODULE_TAGS" 2016-08-02 20:30:06 +00:00
Chih-Hung Hsieh
2a929968e1 Fix google-explicit-constructor warnings in utils.
* Declare explicit conversion constructors.
* Use NOLINT(implicit) for implicit conversion constructors.

Bug: 28341362
Change-Id: I4fb58fa32aafc520b2ed862a05a8bdbfabbc6c35
Test: build with WITH_TIDY=1
2016-08-02 12:20:06 -07:00
Chih-Hung Hsieh
9e70ba6352 Fix google-explicit-constructor warnings in logd.
Bug: 28341362
Change-Id: I5b419c40593982925034e9b7217b0eb53c51adcb
Test: build with WITH_TIDY=1
2016-08-02 11:31:44 -07:00
Treehugger Robot
c97b73aa83 Merge changes I1d398d19,I8f20b3cd
* changes:
  adb: fix stat on Windows.
  adb: extract Windows bits out of directory_exists test.
2016-08-01 21:54:00 +00:00
Treehugger Robot
4efbce14b5 Merge "Fix clang-tidy performance warnings in syste/core." 2016-08-01 20:13:54 +00:00
Josh Gao
f551ea0f63 adb: fix stat on Windows.
stat on Windows fails with ENOENT when passed a path with a trailing
slash or backslash, regardless of whether the target is actually a
directory. Emulate the correct POSIX behavior by stripping trailing
path separators and then checking if the target is a directory if
successful.

Bug: http://b/30481559
Bug: https://code.google.com/p/android/issues/detail?id=214633
Change-Id: I1d398d19a9bce1ecb3fdc4aabc31aa98c82c3f93
Test: Relevant adb_tests pass on Linux and Windows 10.
2016-08-01 12:36:04 -07:00
Chih-Hung Hsieh
8f7b9e3d39 Fix clang-tidy performance warnings in syste/core.
* Use const reference type for parameters to avoid unnecessary copy.
* Suppress warning of not using faster overloaded string find function.

Bug: 30407689
Bug: 30411878
Change-Id: I6cfdbbd50cf5e8f3db6e5263076d3a17a9a791ee
Test: build with WITH_TIDY=1
Merged-In: Ie79dbe21899867bc62031f8618bb1322b8071525
2016-08-01 11:55:42 -07:00
Dan Willemsen
4e09dd8cce Remove Brillo-specific LOCAL_MODULE_TAGS
Replaced with PRODUCT_PACKAGES_ENG in brillo_base.mk

Change-Id: I66f467d95745aa6b1f3c81aa87a3f139a33dbebf
2016-07-31 18:45:14 -07:00
Treehugger Robot
9f05901b9a Merge "libbase should use its own logging!" 2016-07-30 17:31:37 +00:00
Treehugger Robot
817d53493a Merge "sched_policy: Add support for /proc/<tid>/timerslack_ns over PR_SET_TIMERSLACK_PID" 2016-07-29 22:54:36 +00:00
Hans Boehm
7f27cbc3f4 Fix race bug in attemptIncStrong
The compensating onLastStrongRef call could be made even when there
was no onIncStrongAttempted call to compensate for.  This
happened in the OBJECT_LIFETIME_STRONG case when e.g. curCount
was initially zero, but was concurrently incremented by another
thread.

I believe the old code was also incorrect in the
curCount = INITIAL_STRONG_VALUE + 1 case,
which seems to be possible under unlikely conditions.
In that case, I believe the compensating call IS needed.
Thus the condition was also changed.

Bug: 30503444
Change-Id: I44bcbcbb1264e4b52b6d3750dc39b041c4140381
2016-07-29 14:39:10 -07:00
John Stultz
2f13f0a48a sched_policy: Add support for /proc/<tid>/timerslack_ns over PR_SET_TIMERSLACK_PID
The PR_SET_TIMERSLACK_PID number has collided with upstream
changes a number of times, and thus the number is not consistent
between AOSP common kernel versions.

In 4.6+, the upstream kernel added equivalent functionaity via
the /proc/<tid>/timerslack_ns entry.

This patch changes the sched_policy logic to support
/proc/<tid>/timerslack_ns if its available, falling back to the
older PR_SET_TIMERSLACK_PID method if not.

NOTE: Eventually PR_SET_TIMERSLACK_PID usage will need to be
removed as it is likely to conflict with valid future upstream
PR_* entries.

Also add missing O_CLOEXEC to other open calls in this file.

Change-Id: Iec0b8a62de0dc8bdd57b60df82bd4d31c5d64709
Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-07-29 14:30:20 -07:00
Chih-hung Hsieh
6dc68cb5f9 Merge "Fix google-explicit-constructor warnings in system/core." 2016-07-29 16:57:17 +00:00
Treehugger Robot
060b15e20a Merge "init: usb: delete rndis func to unregister n/w interface" 2016-07-29 16:47:10 +00:00
Mattias Nissler
bcd37e67db Merge "trusty: Add nvram-wipe utility." 2016-07-29 08:17:08 +00:00
Josh Gao
3bdc76025b adb: extract Windows bits out of directory_exists test.
Bug: http://b/30481559
Bug: https://code.google.com/p/android/issues/detail?id=214633
Change-Id: I8f20b3cd5aef6a77c2b4f194b914b4295397d73f
2016-07-28 18:36:01 -07:00
Elliott Hughes
e5dd71a290 libbase should use its own logging!
Not doing so led to us using a bogus log tag.

Bug: http://b/30281203
Change-Id: I3ac91758a1a043146c65f2ae0f36fcfbe372c30f
2016-07-28 15:15:28 -07:00
Treehugger Robot
345754313e Merge "ueventd: Remove verbose restorecon_recursive: message" 2016-07-28 22:06:18 +00:00
Dmitry Shmidt
7eed474db4 ueventd: Remove verbose restorecon_recursive: message
Bug: 30478300

Change-Id: Ife69bb5644c3f65f3a256dc042ae1c7fbfb77729
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-07-28 13:55:39 -07:00
Treehugger Robot
eafeb75c49 Merge "bootstat: Fix a potential unhandled exception for malformed input." 2016-07-28 20:22:22 +00:00
James Hawkins
4dded613b3 bootstat: Fix a potential unhandled exception for malformed input.
In rare cases the hardware storage on the device may be hosed and return
garbage.  Use ParseInt which handles bad input instead of stoi.

BUG: 29334139
Change-Id: I91aedc169df110bea8097775f73dda11def22311
2016-07-28 11:59:22 -07:00
Chih-hung Hsieh
44c909d467 Merge "Fix clang-tidy performance warnings in fs_mgr." 2016-07-28 17:13:54 +00:00
Treehugger Robot
5670005058 Merge "Fix clang-tidy performance warnings in metricsd/uploader." 2016-07-28 17:12:46 +00:00
Treehugger Robot
5783dea065 Merge "libnativeloader: convert Android.mk to Android.bp" 2016-07-28 10:46:42 +00:00
Treehugger Robot
b66b16b39a Merge "Fix clang-tidy performance warnings in healthd." 2016-07-28 01:04:51 +00:00
Treehugger Robot
95b0495534 Merge "Suppress clang-tidy performance warnings in libmemunreachable." 2016-07-28 01:04:21 +00:00
Treehugger Robot
5dd9dc5859 Merge "Fix clang-tidy performance warnings in crash_reporter." 2016-07-28 00:53:11 +00:00
Chih-Hung Hsieh
f10383c1be Fix clang-tidy performance warnings in crash_reporter.
* Use faster overloaded string find function.

Bug: 30411878
Change-Id: I1bbb382428424140b61062ba729fcc229126c164
Test: build with WITH_TIDY=1
2016-07-27 16:18:05 -07:00
Chih-Hung Hsieh
73da05d354 Fix clang-tidy performance warnings in fs_mgr.
* Use const reference type for for-loop index variables
  to avoid unnecessary copy.

Bug: 30413223
Change-Id: I5514384ef3af77c00aa3e8417acd8d70981e0afb
Test: build with WITH_TIDY=1
2016-07-27 16:12:54 -07:00
Chih-Hung Hsieh
4df105635b Fix clang-tidy performance warnings in healthd.
* Use const reference type for parameters to avoid unnecessary copy.

Bug: 30407689
Change-Id: I926ea7b6e9e020a228c812b7e23087a2b7ed9809
Test: build with WITH_TIDY=1
2016-07-27 16:05:50 -07:00
Chih-Hung Hsieh
223bb4e21d Suppress clang-tidy performance warnings in libmemunreachable.
Bug: 30413862
Change-Id: If3ed64d2e1ca1f46599de9fe97c769f468ee1a68
Test: build with WITH_TIDY=1
2016-07-27 16:01:41 -07:00
Chih-Hung Hsieh
d506e782b8 Fix clang-tidy performance warnings in metricsd/uploader.
* Use const reference type for parameters to avoid unnecessary copy.

Bug: 30407689
Change-Id: I5e6bfd1cd3bcf54666316573281b79573cd8a780
Test: build with WITH_TIDY=1
2016-07-27 15:57:24 -07:00
Colin Cross
d4ce20aa84 libnativeloader: convert Android.mk to Android.bp
Change-Id: I94d7cde3138f28bbd158d62b657af8448b4175fd
2016-07-27 10:36:36 -07:00
Treehugger Robot
6d232ab4de Merge "Fix early init logging." 2016-07-27 15:28:18 +00:00
Jorge Lucangeli Obes
47b077a44f Merge "Fix sdcard logging." 2016-07-26 23:38:13 +00:00
Jorge Lucangeli Obes
e157b253d4 Fix sdcard logging.
Use C++ logging for everything.

Bug: 30222003
Change-Id: I5c5d85102b01df6965a515b59aa275ac85f50f00
2016-07-26 16:52:48 -04:00
Chih-Hung Hsieh
034c475931 Fix google-explicit-constructor warnings in system/core.
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.

Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
2016-07-26 11:26:01 -07:00
Elliott Hughes
35f5d04620 Fix early init logging.
Remove the /dev/__kmsg__ workarounds (which can then be removed
from sepolicy), and fix confusion in the translation between
android-base logging and kernel logging priorities (in particular,
where 'notice' comes in the hierarchy).

Bug: http://b/30317429
Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7
Test: adb shell dmesg | grep init
2016-07-26 09:32:33 -07:00
Elliott Hughes
c1d9ac1f85 Merge "Improve init Service logging." 2016-07-26 15:15:31 +00:00
Elliott Hughes
e18e7e5c43 Improve init Service logging.
Say which service.

Don't ignore setpgid failures.

Change-Id: Ifa8eba583cc3cbf3d26763977bf8c3c9835271c6
2016-07-25 18:18:16 -07:00
Dan Willemsen
00a4ee0f46 Merge "Rename lib{crypto,ssl}-host to lib{crypto,ssl}" 2016-07-23 00:22:29 +00:00
Treehugger Robot
c6e22ba1a1 Merge "sdcard: Fix compilation with FUSE_TRACE == 1." 2016-07-22 01:07:20 +00:00
Treehugger Robot
eb9367f9d4 Merge "logcatd: logpersist.start to enable logd service if disabled" 2016-07-21 23:25:30 +00:00
Mark Salyzyn
6a7bfd8749 logcatd: logpersist.start to enable logd service if disabled
Bug: 28936216
Change-Id: I2f2878f138be6675bf00bd638df2bdd690a1fae5
2016-07-21 14:19:39 -07:00
Dan Willemsen
c9c5e4b969 Rename lib{crypto,ssl}-host to lib{crypto,ssl}
There's no need to use a different name for target and host moudles. In
Soong, it's better to use the same for both, as target and host modules
can be defined at the same time.

Change-Id: I32ee5bbd54b16a4ed9d812db4da836e96b1e8654
2016-07-21 14:15:31 -07:00