Commit graph

19971 commits

Author SHA1 Message Date
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
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
Mark Salyzyn
70cbe025f4 logd: update region lock after entry has passed to reader socket
(cherry pick from commit de4bb9c1a7)

- The reader region level indicates the location to protect, but once
  it has been passed to the calling reader, then allow us to go
  one beyond so that a clear or prune thread can remove the entry.

Bug: 23711431
Change-Id: I0f2389858dd8c83366c034360f67d7c363625b56
2015-11-16 08:53:04 -08:00
Mark Salyzyn
b04352e597 logd: clientHasLogCredentials false negatives
(cherry pick from commit 86eb38f3ca)

Vote three times in /proc/pid/status to look for AID_LOG group

If not, we may default to the callers UID, and the net result is
to perform the task related to that UID. For adb logcat and
shell logcat, the UID is AID_SHELL which typically has no logs,
leaving no net action taken.

Bug: 23711431
Change-Id: I2b5900a2d37173bd995eb308ee9ecafa20602b62
2015-11-16 08:53:04 -08:00
Mark Salyzyn
96c45c648d logd: object layer format statistics
(cherry pick from commit 758058ffd8)

Simplify table generation by placing the line and header formatting
into each type's (UID, PID, TID) object. Switch to const return
values for the ownership passing functions (*ToName() functions
and methods). Use longer variable names to reduce confusion.

Switch from LINES To NUM for pruned column as that more accurately
reflects what is dropped since one entry can contain several lines.

Bug: 22855208
Change-Id: Ib110dce98a68cf5f844eb30f8a192a1f691eeba2
2015-11-16 08:53:04 -08:00
Mark Salyzyn
f9162cf711 logd: optimize code hotspots
(cherry pick from commit ddda212faa)

Discovered that we had a few libc hotspots. Adjust code to generally
reduce or nullify the number of calls to malloc, free, strlen,
strcmp, strncmp, memcmp & strncasecmp. Total gain looks to be about
3% of logd's processing time. malloc still contributes to 3%, but all
others are now total 0.5%.

Bug: 23685592
Change-Id: Ife721121667969260cdb8b055524ae90f5911278
2015-11-16 08:53:04 -08:00
Mark Salyzyn
e9451e7ef8 logd: Add LogUtils.h
(cherry pick from commit 5ac5c6b193)

Move prototypes from LogBufferElement.h to LogUtils.h

Change-Id: I55e42e17e6c997e35b2b78b87fd2f84f8f393282
2015-11-16 08:53:04 -08:00
Mark Salyzyn
4efc87e5eb logd: klogd deal with nuls in dmesg
(cherry pick from commit 151beac76d)

Switch to using string and length in all transactions, treating
trailing nuls the same as spaces.

ToDo: change dumpstate (bugreport) to use logcat -b printable _regardless_

Bug: 23517551
Change-Id: I42162365e6bf8ed79d356e7b689a673902116fdb
2015-11-16 08:53:04 -08:00
Mark Salyzyn
f9e4d0b6b5 logd: log_strtok_r deal with nuls
(cherry pick from commit ea1a241107)

Rename to log_strntok_r and change from dealing with strings
to dealing with a string and an associated length.

Bug: 23517551
Change-Id: Ia72f1305a53f55eeef9861ac378fb8205fd2378e
2015-11-16 08:53:04 -08:00
Mark Salyzyn
26499e41ae liblog: logprint: printable nul
(cherry pick from commit faa92e9915)

Change-Id: I57d1f86ce040ad196c558bb72ac0464af793c214
2015-11-16 08:53:04 -08:00