Commit Graph

15244 Commits

Author SHA1 Message Date
Mark Salyzyn e59c469fa8 logd: filter on __android_log_is_loggable
- Default level when not specified is ANDROID_LOG_VERBOSE
  which is inert.

Bug: 20416721
Bug: 19544788
Bug: 17760225
Change-Id: Icc098e53dc47ceaaeb24ec42eb6f61d6430ec2f6
2015-06-12 10:35:09 -07:00
Mark Salyzyn c158456f50 liblog: __android_log_is_loggable support global properties
- Add support for "log.tag" and "persist.log.tag" global
  logging properties, effectively a runtime default minimum
  logging level.
- Add a thread-safe single level cache plus selective logic for the
  four properties being checked to help speed up logging decision
  on subsequent identical calls.
- Using new __system_property_area_serial() to make for
  efficient (<100ns) handling of cache misses. Despite adding
  two new properties, we are 8 times faster on subsequent calls
  even if the properties do not exist.
- A NULL or blank tag is no longer directed to return default,
  it will check the pair of global logging properties first.
- Add liblog.is_loggable gTest
- Fixup liblog.android_logger_get_, allow no content in crash buffer
- Fixup liblog.max_payload, lowered logd priority increases latency

Bug: 19544788
Bug: 21696721
Change-Id: Ideb887755aa3f1fd14a2603bda1fe23cba49642c
2015-06-12 10:35:09 -07:00
Tim Murray b769c8d24f add cpuset support to libcutils
bug 21782794

Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
2015-06-11 18:35:46 -07:00
Elliott Hughes 9371cf0e31 am 67917cf5: am 57bd480c: Merge "Make it clearer to grep that init is built with clang."
* commit '67917cf590ae497ce7700dc7a6b618b3a6700a39':
  Make it clearer to grep that init is built with clang.
2015-06-11 15:25:20 +00:00
Elliott Hughes 67917cf590 am 57bd480c: Merge "Make it clearer to grep that init is built with clang."
* commit '57bd480c3b7c506423c6016e977539213d4c0759':
  Make it clearer to grep that init is built with clang.
2015-06-11 15:11:33 +00:00
Elliott Hughes 57bd480c3b Merge "Make it clearer to grep that init is built with clang." 2015-06-11 15:03:55 +00:00
Elliott Hughes 1115c25d5e Make it clearer to grep that init is built with clang.
Change-Id: Ic2abffd27e382cb691d772cdf088442645e59bf7
2015-06-10 22:43:51 -07:00
Elliott Hughes 182e561932 am 450a24a5: am c604ccfa: Merge "Only pass nomblk_io_submit option when mounting ext4"
* commit '450a24a598b816b71dddde121460dc4fd3fdd3fd':
  Only pass nomblk_io_submit option when mounting ext4
2015-06-11 02:31:53 +00:00
Elliott Hughes 450a24a598 am c604ccfa: Merge "Only pass nomblk_io_submit option when mounting ext4"
* commit 'c604ccfadd9412366709b9b74a283ec966a0cec7':
  Only pass nomblk_io_submit option when mounting ext4
2015-06-11 01:33:40 +00:00
Elliott Hughes c604ccfadd Merge "Only pass nomblk_io_submit option when mounting ext4" 2015-06-11 01:22:57 +00:00
Sasha Levitskiy 4e84f34f12 am 350926ef: Merge "Fingerprint: Use integral types for remove()" into mnc-dev
* commit '350926ef2f13f75335b32e9904dc0b46c01ab1fe':
  Fingerprint: Use integral types for remove()
2015-06-10 23:17:04 +00:00
Oleksiy Vyalov e52dfbddb6 am a08d313b: Extend run-as with optional --user argument.
* commit 'a08d313bb87279d2a203cded92669638e3458f5f':
  Extend run-as with optional --user argument.
2015-06-10 23:14:31 +00:00
Sasha Levitskiy 350926ef2f Merge "Fingerprint: Use integral types for remove()" into mnc-dev 2015-06-10 21:35:25 +00:00
Sasha Levitskiy 53afac018d Fingerprint: Use integral types for remove()
Bug 21282699

Change-Id: I8fdb2112f3f930f080571da6a6b908f5f0581bdd
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2015-06-10 14:29:17 -07:00
Elliott Hughes 1517f1578a Merge commit '7813481e' into manualmerge 2015-06-10 13:54:31 -07:00
Jeremy Compostella cf4c319115 fastboot: add the support of the second stage image
The AOSP bootimage format allows the use of a second stage image
however the fastboot boot and flash:row commands do not allow the
"secondstage" optional argument.  This patch adds the support of this
argument for both commands.

Change-Id: I00403a95d7460a00233841ba0fe0e8a69d78c7b4
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
(cherrypick of ecd28eff0a from AOSP; not sure how this got lost internally.)
2015-06-10 13:53:06 -07:00
Sami Tolvanen 62481cf7d1 am ecad7587: am 4e359e1d: Merge "fs_mgr: Use ro.boot.veritymode"
* commit 'ecad7587ace0bb702b33fdc278d6705ff968aac8':
  fs_mgr: Use ro.boot.veritymode
2015-06-10 20:36:31 +00:00
Elliott Hughes 7813481e95 am 116db929: Merge "Fix fastboot --help formatting."
* commit '116db9293b1de0b9ac075d8e91d22db1a4856155':
  Fix fastboot --help formatting.
2015-06-10 19:21:40 +00:00
Elliott Hughes 116db9293b Merge "Fix fastboot --help formatting." 2015-06-10 19:12:21 +00:00
Elliott Hughes 08df533e2a Fix fastboot --help formatting.
Bug: http://b/21755417
Change-Id: I827d8e9ebe7ba8e8f75c2fa0ca975560817c18fa
2015-06-10 12:10:00 -07:00
Oleksiy Vyalov a08d313bb8 Extend run-as with optional --user argument.
1. Calculate AID for spawned process as (100000 * $user) + uid_from_packages.list
2. Use /data/user/$user/$packageDir as a root of a new process if $user != 0.

Change-Id: I761dfb481114bd51e5a950307fcaf403e96eef10
(cherry picked from commit da31778f3b)
2015-06-10 12:09:10 -07:00
Sami Tolvanen ecad7587ac am 4e359e1d: Merge "fs_mgr: Use ro.boot.veritymode"
* commit '4e359e1da351e1a99e789bc7a9f7e4da0d1fab27':
  fs_mgr: Use ro.boot.veritymode
2015-06-10 17:05:41 +00:00
Sami Tolvanen 4e359e1da3 Merge "fs_mgr: Use ro.boot.veritymode" 2015-06-10 16:55:55 +00:00
Sami Tolvanen ac5c1224cf fs_mgr: Use ro.boot.veritymode
If verity state is managed by bootloader, it will pass the verity
mode to the kernel in the androidboot.veritymode command line
parameter. Init copies the value to the ro.boot.veritymode property.

Check for ro.boot.veritymode in fs_mgr and use the value to set
dm-verity mode. If this property is not set, store verity state in
metadata as before, if a storage location is specified in fstab.

Change-Id: Ife3c978c133248432c302583d3b70e179605fe42
2015-06-10 17:40:29 +01:00
Tao Bao fd4f254b7f am 67633d3d: am 22644e52: Merge "Change pre-recovery into two services"
* commit '67633d3dc3437321d12798ba2235dcc880fcc440':
  Change pre-recovery into two services
2015-06-10 01:00:03 +00:00
Tao Bao 67633d3dc3 am 22644e52: Merge "Change pre-recovery into two services"
* commit '22644e52f049b00163b04ecb8f221c52701aa0d6':
  Change pre-recovery into two services
2015-06-10 00:51:29 +00:00
Tao Bao 22644e52f0 Merge "Change pre-recovery into two services" 2015-06-10 00:43:34 +00:00
Jeff Sharkey 0498ea08e6 am 4d7f052a: Merge "New "selinux.restorecon" control property." into mnc-dev
* commit '4d7f052afbaf79c7324a2e9dd51168990b062647':
  New "selinux.restorecon" control property.
2015-06-09 23:53:33 +00:00
Jeff Sharkey 4d7f052afb Merge "New "selinux.restorecon" control property." into mnc-dev 2015-06-09 23:30:09 +00:00
Tao Bao 04b10b9aa3 Change pre-recovery into two services
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. Separate pre-recovery (uncrypt)
into two services: uncrypt that does the uncryption work and
pre-recovery that actually reboots the device into recovery.

Also create /cache/recovery on post-fs in case it doesn't exist.

Bug: 20012567
Bug: 20949086
(cherry picked from commit e48aed0f0a)
Change-Id: I9877cd6ac9412ea6a566bb1ec0807940c7a38ce5
2015-06-09 14:52:43 -07:00
Jeff Sharkey 76417519ec New "selinux.restorecon" control property.
This new property is used as a control verb for running a recursive
restorecon at the path contained in the property value.

Shifts both SELinux actions to occur before the actual property set
occurs, so setters can watch for completion.

Bug: 21121357
Change-Id: I3db3eb876ae66e144b3bfd648349b66a028511fd
2015-06-09 13:39:17 -07:00
Ying Wang 8331b542c5 am c26e391d: Merge "Fix comparison between signed and unsigned error on darwin" into mnc-dev
* commit 'c26e391dc4d5643fd6a84467dd09efc7e4757a6c':
  Fix comparison between signed and unsigned error on darwin
2015-06-09 20:20:20 +00:00
Mark Salyzyn dbeb7ffea1 am 731d2f3c: am 177d36b9: Merge "Lower the priority of the threads in logd/logcat."
* commit '731d2f3c10ad62d9ecc6f06acd4741815d663f7d':
  Lower the priority of the threads in logd/logcat.
2015-06-09 20:13:58 +00:00
Mark Salyzyn 51cc5e231f am 3a1ff5ab: Merge "Lower the priority of the threads in logd/logcat." into mnc-dev
* commit '3a1ff5ab65d27377a09ec5f123a76c6f482876ac':
  Lower the priority of the threads in logd/logcat.
2015-06-09 20:08:27 +00:00
Ying Wang c26e391dc4 Merge "Fix comparison between signed and unsigned error on darwin" into mnc-dev 2015-06-09 19:55:36 +00:00
Mark Salyzyn 731d2f3c10 am 177d36b9: Merge "Lower the priority of the threads in logd/logcat."
* commit '177d36b9858367ab05c58168c30dbb1c35f9f7cd':
  Lower the priority of the threads in logd/logcat.
2015-06-09 19:55:00 +00:00
Colin Cross 20bbd4f449 Fix comparison between signed and unsigned error on darwin
mode_t is a uint16_t on darwin, which causes
sb.st_mode & ~S_IFMT
to produce an int when the uint16_t is promoted for the operator.
Cast to unsigned int before comparing against 0660U.

Change-Id: Ib1439c08d9e2b297eeeba701891508d269c19a3d
(cherry-pick from commit 56b37345d9)
2015-06-09 12:44:41 -07:00
Mark Salyzyn 3a1ff5ab65 Merge "Lower the priority of the threads in logd/logcat." into mnc-dev 2015-06-09 19:42:45 +00:00
Mark Salyzyn 177d36b985 Merge "Lower the priority of the threads in logd/logcat." 2015-06-09 19:42:08 +00:00
Riley Andrews aede9897df Lower the priority of the threads in logd/logcat.
(cherry pick from commit d98f4e8af5)

sched_batch implies only a penalty to latency in scheduling, but
does not imply that the process will be given less cpu time. Increase
the nice level to 10 to prioritize it below ui threads.

Bug: 21696721
Change-Id: I075af059dc755402f7df9b0d7a66cca921ff04b2
2015-06-09 12:40:20 -07:00
Riley Andrews d98f4e8af5 Lower the priority of the threads in logd/logcat.
sched_batch implies only a penalty to latency in scheduling, but
does not imply that the process will be given less cpu time. Increase
the nice level to 10 to prioritize it below ui threads.

Bug: 21696721
Change-Id: I075af059dc755402f7df9b0d7a66cca921ff04b2
2015-06-09 12:36:45 -07:00
Oreste Salerno 6ed84c986f Only pass nomblk_io_submit option when mounting ext4
This option only exists for ext4 filesystems, so it shouldn't be
used when mounting ext2/ext3.
This bug would cause the mount system call in check_fs to always fail
with ext2/ext3 filesystems.

Change-Id: I3c8938029357a4a4170355118b6757f61ff4b227
2015-06-09 16:38:35 +00:00
Elliott Hughes e1d1429fd2 am bee865a9: am 6af8e11f: Merge "Switch to toybox mount(1)."
* commit 'bee865a94305b580f63c57bfcb1181b973bf84e2':
  Switch to toybox mount(1).
2015-06-08 22:43:48 +00:00
Elliott Hughes f8ee7c7442 am 35096f4c: am fa76ffcc: Merge "adb: win32: fix logging to adb.log"
* commit '35096f4cf8d2d81f28cec07781fd080f855c0e99':
  adb: win32: fix logging to adb.log
2015-06-08 22:43:46 +00:00
Elliott Hughes bee865a943 am 6af8e11f: Merge "Switch to toybox mount(1)."
* commit '6af8e11f4cbb2ba895399dc0371471ff79f25665':
  Switch to toybox mount(1).
2015-06-08 22:29:14 +00:00
Elliott Hughes 35096f4cf8 am fa76ffcc: Merge "adb: win32: fix logging to adb.log"
* commit 'fa76ffccaa723538ad09255353538911ae390322':
  adb: win32: fix logging to adb.log
2015-06-08 22:29:13 +00:00
Mark Salyzyn 7a518d0e6f am 03196c9c: logd: build breakage
* commit '03196c9c7566bc8d6b05019d37a1e60dc3b398f4':
  logd: build breakage
2015-06-08 22:27:12 +00:00
Elliott Hughes 6af8e11f4c Merge "Switch to toybox mount(1)." 2015-06-08 22:23:32 +00:00
Elliott Hughes fa76ffccaa Merge "adb: win32: fix logging to adb.log" 2015-06-08 22:21:31 +00:00
Mark Salyzyn 3c717e4862 am fb354cd6: am 69ecfdd5: Merge "logd: build breakage"
* commit 'fb354cd6af5bccc42ab1ecabd10fb51e698169b9':
  logd: build breakage
2015-06-08 22:18:14 +00:00