Commit graph

19979 commits

Author SHA1 Message Date
Daniel Rosenberg
06acfa9359 Fastboot changes to support A/B partitioning
am: b4354b3615  -s ours

* commit 'b4354b3615a70cdb5612ef5f8a12c466a939cb0b':
  Fastboot changes to support A/B partitioning
2015-11-17 03:23:27 +00:00
Elliott Hughes
53483aa234 Sync with master fastboot.
am: 98699eca48  -s ours

* commit '98699eca48a72f18dcdc551b44a929d00c3d400e':
  Sync with master fastboot.
2015-11-17 03:19:10 +00:00
Mark Salyzyn
07e1bd87e8 liblog: logd: support logd.timestamp = monotonic
am: c48d249c37

* commit 'c48d249c37527b062768c757c3b6a8c6a757ce2b':
  liblog: logd: support logd.timestamp = monotonic
2015-11-17 03:14:51 +00:00
Mark Salyzyn
ab12c99b0d logd: Add support for *.logd.filter
am: 21c7686996  -s ours

* commit '21c76869960a1240b6161316a2984b6f3cb6e069':
  logd: Add support for *.logd.filter
2015-11-17 03:14:43 +00:00
Mark Salyzyn
ae8d5805a8 logd: statistics report chatty effective percentage
am: e9252451bd

* commit 'e9252451bdfe316b40f755f06386ad1873bc68f8':
  logd: statistics report chatty effective percentage
2015-11-17 03:11:30 +00:00
Mark Salyzyn
96076bfb85 liblog: add android_log_timestamp() private function
am: aa5abfd84e

* commit 'aa5abfd84e1fff9abe332e14bc1d28c685124dc6':
  liblog: add android_log_timestamp() private function
2015-11-17 03:11:23 +00:00
Mark Salyzyn
109a92f39c liblog: logcat: add epoch and monotonic format modifiers
am: 9cb92047e5  -s ours

* commit '9cb92047e5f0499fdea2c3fafedd4ff00c6b530a':
  liblog: logcat: add epoch and monotonic format modifiers
2015-11-17 03:11:17 +00:00
Mark Salyzyn
c6e6e3a977 logd: correct for number of elements in prune
am: 13f42ec2f1

* commit '13f42ec2f1113838bf4edd8ba5b5dffa920d7324':
  logd: correct for number of elements in prune
2015-11-17 03:06:37 +00:00
Mark Salyzyn
d477a64c23 logd: use coalesce instead of merge (cleanup)
am: 6326bb8fd2  -s ours

* commit '6326bb8fd29c2cadb4664b6c6944af8771a64e96':
  logd: use coalesce instead of merge (cleanup)
2015-11-17 03:06:31 +00:00
Mark Salyzyn
ad71a6adda logd: clearAll by UID speedup
am: 9bc35ef4c9

* commit '9bc35ef4c975891e2fb77745c877ce8847727b73':
  logd: clearAll by UID speedup
2015-11-17 03:02:46 +00:00
Mark Salyzyn
b8e04eed74 logd: clear return and deal with busy if readers locked
am: 5679d8d572  -s ours

* commit '5679d8d57244ebe1daa8d992113a0721af9547ca':
  logd: clear return and deal with busy if readers locked
2015-11-17 03:02:39 +00:00
Mark Salyzyn
ba7ec6ad41 logd: update region lock after entry has passed to reader socket
am: 70cbe025f4

* commit '70cbe025f4afbc0236346da9ede0cd56cba38a12':
  logd: update region lock after entry has passed to reader socket
2015-11-17 02:58:39 +00:00
Mark Salyzyn
0c039df752 logd: clientHasLogCredentials false negatives
am: b04352e597

* commit 'b04352e59791b05ccab16d26e4291b53c9184d09':
  logd: clientHasLogCredentials false negatives
2015-11-17 02:58:32 +00:00
Mark Salyzyn
d48a1e199b logd: object layer format statistics
am: 96c45c648d  -s ours

* commit '96c45c648dc2d445bfed7677b22d92817316b081':
  logd: object layer format statistics
2015-11-17 02:58:25 +00:00
Mark Salyzyn
d401d468d9 logd: optimize code hotspots
am: f9162cf711  -s ours

* commit 'f9162cf711abd55ccb1c6f9d5f4805b96471c88f':
  logd: optimize code hotspots
2015-11-17 02:55:11 +00:00
Mark Salyzyn
526674966a logd: Add LogUtils.h
am: e9451e7ef8  -s ours

* commit 'e9451e7ef8cc8b7d00bcb4e94b78aaa9c037693f':
  logd: Add LogUtils.h
2015-11-17 02:50:37 +00:00
Mark Salyzyn
d9bea5e4bf logd: klogd deal with nuls in dmesg
am: 4efc87e5eb  -s ours

* commit '4efc87e5ebd7612d119cd8c09bf78b32093c258e':
  logd: klogd deal with nuls in dmesg
2015-11-17 02:47:25 +00:00
Mark Salyzyn
7de5fd246a logd: log_strtok_r deal with nuls
am: f9e4d0b6b5

* commit 'f9e4d0b6b5559090be599a3282273d799d3499d8':
  logd: log_strtok_r deal with nuls
2015-11-17 02:39:45 +00:00
Mark Salyzyn
547f7fa692 liblog: logprint: printable nul
am: 26499e41ae

* commit '26499e41ae2f81798be20ee97e494900d7eceedc':
  liblog: logprint: printable nul
2015-11-17 02:39:38 +00:00
Mark Salyzyn
33ce92ab60 logd: klogd: sniff for time correction on Mediatek
am: 3f78f93302  -s ours

* commit '3f78f93302c737b454ea63bac0bb15553b953d01':
  logd: klogd: sniff for time correction on Mediatek
2015-11-17 02:39:30 +00:00
Mark Salyzyn
42a8164752 logd: klogd and Mediatek part deux
am: 540cfe8e6b  -s ours

* commit '540cfe8e6ba6963f7d6b6407870aac197d1e27e6':
  logd: klogd and Mediatek part deux
2015-11-17 02:36:16 +00:00
Mark Salyzyn
7651e1fab2 liblog: logcat: Add year and zone to date on each line
am: 39888aef13  -s ours

* commit '39888aef136da3334dbdd86e18b92733c7795e81':
  liblog: logcat: Add year and zone to date on each line
2015-11-17 02:32:57 +00:00
Mark Salyzyn
8e8e15bb8a logd: switch asprintf to std::string
am: 5c3835d943  -s ours

* commit '5c3835d9431f9b1277a110a61375231181307094':
  logd: switch asprintf to std::string
2015-11-17 02:26:35 +00:00
Mark Salyzyn
36c634511e logd: white and black switch to std::string
am: 8a7f778c01  -s ours

* commit '8a7f778c018fc67f6fdc7d9dca7f7ed53f7c7fdc':
  logd: white and black switch to std::string
2015-11-17 02:23:17 +00:00
Mark Salyzyn
6071285a57 logd: statistics switch to std::string
am: 2a2b0d1c6e  -s ours

* commit '2a2b0d1c6ed99cbd195c72fab666546320981e61':
  logd: statistics switch to std::string
2015-11-17 02:19:51 +00:00
Andreas Gampe
f1152a7529 Logd: Handle unused variable and fields
am: 244f32fa2d

* commit '244f32fa2dc28bbd3332ee0fc3e6ce1520c0fb19':
  Logd: Handle unused variable and fields
2015-11-17 01:42:36 +00:00
Daniel Rosenberg
32cceeb712 rootdir: Allow board specific folders and symlinks in root directory
am: ff1160b28f

* commit 'ff1160b28ffc543274b43ca275db8111c73f6808':
  rootdir: Allow board specific folders and symlinks in root directory
2015-11-17 01:42:30 +00:00
Daniel Rosenberg
89bca2aed2 Fix "adb remount" for when the root directory is in system.img
am: a852aacb56  -s ours

* commit 'a852aacb569f718ef08519c3f0cadc0562c0768b':
  Fix "adb remount" for when the root directory is in system.img
2015-11-17 01:42:23 +00:00
Tao Bao
0c544c66df Set mode bits for /system/etc/recovery.img.
am: 096c4f2d8a

* commit '096c4f2d8a12639e484e2d806223d4fe5bf1d4b2':
  Set mode bits for /system/etc/recovery.img.
2015-11-17 01:37:11 +00:00
Daniel Rosenberg
b4018f4f09 fs_mgr: Add support for A/B partitions
am: fd2f0b4dc4  -s ours

* commit 'fd2f0b4dc496319f94d024b0c841b639245df0a4':
  fs_mgr: Add support for A/B partitions
2015-11-17 01:37:04 +00:00
Daniel Rosenberg
2048434453 rootdir: Create symlinks in Android.mk
am: 6a5a81a3d6  -s ours

* commit '6a5a81a3d6faf06a2c268b134f161f4eeeaea06a':
  rootdir: Create symlinks in Android.mk
2015-11-17 01:11:45 +00:00
Daniel Rosenberg
8249eb56af Skip mounting /, just mark block device as ro if needed.
am: c906751994

* commit 'c90675199421487829a44994bea43330acbde198':
  Skip mounting /, just mark block device as ro if needed.
2015-11-17 00:53:02 +00:00
Daniel Rosenberg
d792c98606 Remove creation of root directory folders
am: c97e1cb39d

* commit 'c97e1cb39d9ba129d8326605d121a10c9ae491e7':
  Remove creation of root directory folders
2015-11-17 00:52:55 +00:00
Daniel Rosenberg
fb24ff8e70 rootdir: Create cache folder in Android.mk
am: 4c9c516d20  -s ours

* commit '4c9c516d2088fe1ef9a35f704dff7e16f84d3d23':
  rootdir: Create cache folder in Android.mk
2015-11-17 00:52:47 +00:00
Daniel Rosenberg
797047b660 rootdir: Create folders in Android.mk
am: 9262546184  -s ours

* commit '9262546184e97249cdbea5239d83ce2a60965e74':
  rootdir: Create folders in Android.mk
2015-11-17 00:49:44 +00:00
Daniel Rosenberg
5ee70320c6 libcutils: fs_config: Add folders normally created in init.rc
am: a39317ca94  -s ours

* commit 'a39317ca947d723897fddc0aa95283fbbc4f4873':
  libcutils: fs_config: Add folders normally created in init.rc
2015-11-17 00:35:18 +00:00
Todd Kjos
9b5b026386 Actively mangage EAS schedtune nodes
am: ed60788968  -s ours

* commit 'ed60788968be61f4f6f47890e5f3cb182a6a2b6e':
  Actively mangage EAS schedtune nodes
2015-11-17 00:09:41 +00:00
Todd Kjos
ba8a47531c Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 14:57:47 -08:00
Mark Salyzyn
2a3024f9ad Revert "liblog: resolve deadlocks"
(cherry pick from c2e7d4965f)

This reverts commit 7a2a307192.

Bug: 25693940
Change-Id: I9a7c926289e972f80c03c92e33535e1dedaa7381
2015-11-16 11:03:09 -08:00
Daniel Rosenberg
b4354b3615 Fastboot changes to support A/B partitioning
Introduce support for -slot option for specifying slots,
and set_active, for changing the current slot.

Change-Id: Ib3b2a75491c0d0413534dd0c1d7bcb52555bba66
(cherry picked from commit b7bd4ae529)
2015-11-16 08:53:51 -08:00
Elliott Hughes
98699eca48 Sync with master fastboot.
This brings us all the fastboot changes, plus a change we need from libbase,
and then reverts part of a libziparchive cleanup and fixes dependencies on
new changes to the build system.

Bug: http://b/25375777
Change-Id: I813464da95dc6c81b0a1dc7145152f89bb2d14cd
2015-11-16 08:53:51 -08:00
Mark Salyzyn
c48d249c37 liblog: logd: support logd.timestamp = monotonic
(cherry pick from commit b6bee33182)

if ro.logd.timestamp or persist.logd.timestamp are set to the value
monotonic then liblog writer, liblog printing and logd all switch to
recording/printing monotonic time rather than realtime. If reinit
detects a change for presist.logd.timestamp, correct the older entry
timestamps in place.

ToDo: A corner case condition where new log entries in monotonic time
      occur before logd reinit detects persist.logd.timestamp, there
      will be a few out-of-order entries, but with accurate
      timestamps. This problem does not happen for ro.logd.timestamp
      as it is set before logd starts.

NB: This offers a nano second time accuracy on all log entries
    that may be more suitable for merging with other system
    activities, such as systrace, that also use monotonic time. This
    feature is for debugging.

Bug: 23668800
Change-Id: Iee6dab7140061b1a6627254921411f61b01aa5c2
2015-11-16 08:53:51 -08:00
Mark Salyzyn
21c7686996 logd: Add support for *.logd.filter
(cherry pick from commit 932f7acc81)

- Add device (ro.logd.filter), persistent (persist.logd.filter)
  properties to control the default filters
- Allow logcat -P default to produce expected results
- Allow logcat -P disable to produce expected results

Change-Id: I651cb705373ec1e88a99e4b9086da4f9668a468a
2015-11-16 08:53:04 -08:00
Mark Salyzyn
e9252451bd logd: statistics report chatty effective percentage
(cherry pick from commit c723df805a)

Report the ESTIMATED instantaneous percentage decrease or increase
that an UID has to the logs as a result of the chatty filtration.

Bug: 22855208
Change-Id: If1e77afb81a2739a72b39bc7c57071763c1d64d8
2015-11-16 08:53:04 -08:00
Mark Salyzyn
aa5abfd84e liblog: add android_log_timestamp() private function
(cherry pick from commit 500afc7532)

Change-Id: Iefbea3b1be2f97cfdeb35e5330e5495e0337215b
2015-11-16 08:53:04 -08:00
Mark Salyzyn
9cb92047e5 liblog: logcat: add epoch and monotonic format modifiers
(cherry pick from commit 4cbed02e44)

- '-v epoch' prints seconds since Jan 1 1970
- '-v monotonic' print cpu seconds since start of device
- '-T sssss.mmm...' as alternate tail time format

NB: monotonic is a best estimate and may be out by a few ms
    given the synchronization source clue accuracy.

Bug: 23668800
Change-Id: Ieb924b6d3817669c7e53beb9c970fb626eaad460
2015-11-16 08:53:04 -08:00
Mark Salyzyn
13f42ec2f1 logd: correct for number of elements in prune
(cherry pick from commit 58b8be8906)

Chatty logs would distort the average log size by elevating the
elements, but not the size. Add statistical collection for the
number of elements that report chatty, and subtract that from
the number of elements to improve the pruning estimate. Pick
minElements as 1% rather than 10% of the total with this more
accurate number of elements, to a minumum of 4.

Bug: 24511000
Change-Id: I3f36558138aa0b2a50e4fac6440c3a8505d95276
2015-11-16 08:53:04 -08:00
Mark Salyzyn
6326bb8fd2 logd: use coalesce instead of merge (cleanup)
(cherry pick from commit aaad42f47c)

- switch to coalesce instead of merge in naming of functions
  and variables. Confusing since we also to merge-sorts and
  other activities in the logger.
- define maxPrune rather than using a number in the code path.

Bug: 24511000
2015-11-16 08:53:04 -08:00
Mark Salyzyn
9bc35ef4c9 logd: clearAll by UID speedup
(cherry pick from commit 2b25c66070)

- If doing a clear, skip accounting
- Ensure for busy checking, behind a region lock for instance, only
  break out if there was something to do. Basically move the filter
  actions first, and defer checking the region lock to the ends of
  the loops.

Bug: 23711431
Change-Id: Icc984f406880633516fb17dda84188a30d092e01
2015-11-16 08:53:04 -08:00
Mark Salyzyn
5679d8d572 logd: clear return and deal with busy if readers locked
(cherry pick from commit c5dc970edc)

- Propagate to caller the clearing errors, busy blocked by reader.
- For clear, perform retries within logd with a one second lul each,
  telling readers to skip, but on final retry to kill all readers if
  problem still persists due to block reader (or high volume logspammer).

Bug: 23711431
Change-Id: Ie4c46bc9480a7f49b96a81fae25a95c603270c33
2015-11-16 08:53:04 -08:00