Commit Graph

14947 Commits

Author SHA1 Message Date
Christopher Ferris 67aba6881d Add tests for elf unwinding in memory.
Bug: 19517541
Change-Id: Ib42360a82934ff7103e2ccb64c1105c59aa3fdea
2015-05-12 16:11:47 -07:00
Mark Salyzyn 867ea48a8a am ff32f3c7: logd: Add Tag statistics
* commit 'ff32f3c77439b9791e58c225a8b7ca82dfc2c3da':
  logd: Add Tag statistics
2015-05-12 22:59:56 +00:00
Mark Salyzyn 7718778793 logd: Cleanup
- Android Coding Standard for Constructors
- Side effects NONE

Change-Id: I2cda9dd73f3ac3ab58f394015cb810820093d47b
2015-05-12 15:51:46 -07:00
Mark Salyzyn e1f2004ecc logcat: liblog: Add "usec" format argument
- Add additional 3 digits of time precision for time output
  adding in the reporting of usec
- Remove trailing space in header file

Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
2015-05-12 15:51:46 -07:00
Mark Salyzyn ae4d928d81 logd: Add klogd
- Add a klogd to collect the kernel logs and place them into a
  new kernel log buffer
- Parse priority, tag and message from the kernel log messages.
- Turn off pruning for worst UID for the kernel log buffer
- Sniff for 'PM: suspend exit', 'PM: suspend enter' and
  'Suspended for' messages and correct the internal definition
  time correction against monotonic dynamically.
- Discern if we have monotonic or real time (delineation 1980) in
  audit messages.
- perform appropriate math to correct the timestamp to be real time
- filter out any external sources of kernel logging

Change-Id: I8d4c7c5ac19f1f3218079ee3a05a50e2ca55f60d
2015-05-12 15:51:46 -07:00
Eric Laurent b942d6fbb6 am 74f0a578: Merge "audio: Fix false positives in audio_is_remote_submix_device()"
* commit '74f0a578a8ee0957b849e811af5fc30c74be55f0':
  audio: Fix false positives in audio_is_remote_submix_device()
2015-05-12 22:47:08 +00:00
Mark Salyzyn 052bb26151 am 88462ba7: Merge "logd: Add Tag statistics"
* commit '88462ba7fcde3dc9a07b484bd3d526836e000b4b':
  logd: Add Tag statistics
2015-05-12 22:40:44 +00:00
Eric Laurent 74f0a578a8 Merge "audio: Fix false positives in audio_is_remote_submix_device()" 2015-05-12 22:40:01 +00:00
Mark Salyzyn ff32f3c774 logd: Add Tag statistics
(cherry pick from commit 344bff4391)

- Optional class of statistics for events Tags
- export tagToName from LogBuffer (located in main.cp to address
  https://android-review.googlesource.com/#/c/110204)
- Can not handle dropped because getTag() can not work,
  will need to be fixed if we start filtering.

Bug: 19608965
Change-Id: I7b90607ca588bf37bab71f19b1570a290e772776
2015-05-12 15:34:56 -07:00
Mark Salyzyn 88462ba7fc Merge "logd: Add Tag statistics" 2015-05-12 22:31:46 +00:00
Emmanuel Berthier 30cc3d7249 Enable property expansion for insmod
Useful for dynamic kernel module location.
This permits to use init rule like:

  insmod ${persist.modules.location}/<module_name>

Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
(cherry picked from commit ac41230cbc)
2015-05-12 15:01:02 -07:00
Elliott Hughes 3d0bf350f7 am 6f9db165: Merge "Fix insmod module size"
* commit '6f9db165a49e6763fb2101d6da057a223cee21c8':
  Fix insmod module size
2015-05-12 21:45:01 +00:00
Elliott Hughes 6f9db165a4 Merge "Fix insmod module size" 2015-05-12 21:34:26 +00:00
Misael Lopez Cruz bee4965cb2 audio: Fix false positives in audio_is_remote_submix_device()
The audio_is_remote_submix_device() helper function incorrectly
reported AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES and
AUDIO_DEVICE_IN_LINE as a submix devices.

The cases where the confusion occurs are for devices whose bitwise
value only differs in the direction bit.

Change-Id: I3bb9fd1158a26a8f4b3b59246974e703ca5ba0f0
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2015-05-12 16:25:38 -05:00
Tom Cherry eaa3b4ec6f Fix insmod module size
read_file() used to append a new line character to the end of the buffer it
returns, because parse_config() isn't able to cope with input that's not
'\n'-terminated. Fix read_file() to be less insane, and push the workarounds
into the parse_config() callers.

Longer term we should rewrite parse_config().

Change-Id: Ie9d9a7adcd33b66621726aef20c4b8cc51c08be7
2015-05-12 14:18:49 -07:00
Mark Salyzyn 35db470eb5 am 4fba2867: logd: pidToName deficiency
* commit '4fba28671b7213010dbfe6ad88e9891cc4080c75':
  logd: pidToName deficiency
2015-05-12 20:30:32 +00:00
Mark Salyzyn 4fba28671b logd: pidToName deficiency
(Cherry pick from commit aa43ae2268)

any logging in zygote permanently sets the pidToName

Change-Id: I0b8fdc96fb5965a04d4dc4293c39815beef5eb8e
2015-05-12 13:06:25 -07:00
Mark Salyzyn 17ed6797df logd: Add TID statistics
Bug: 19608965
Change-Id: Ifbf0b00c48ef12b5970b9f9f217bd1dd8f587f2c
2015-05-12 12:57:25 -07:00
Mark Salyzyn 344bff4391 logd: Add Tag statistics
- Optional class of statistics for events Tags
- export tagToName from LogBuffer (located in main.cp to address
  https://android-review.googlesource.com/#/c/110204)
- Can not handle dropped because getTag() can not work,
  will need to be fixed if we start filtering.

Bug: 19608965
Change-Id: I7b90607ca588bf37bab71f19b1570a290e772776
2015-05-12 12:53:27 -07:00
Mark Salyzyn 672c990ef0 am 7297278a: Merge "logd: pidToName deficiency"
* commit '7297278ade9de51e63568188782f56e2ad2bcf6b':
  logd: pidToName deficiency
2015-05-12 19:48:09 +00:00
Mark Salyzyn 7297278ade Merge "logd: pidToName deficiency" 2015-05-12 19:38:40 +00:00
Mark Salyzyn 1cfb238412 am 9bdc0647: logd: uidToName add dex2oat UID
* commit '9bdc0647200bfcd64962a5d2bde39f01f2fd0457':
  logd: uidToName add dex2oat UID
2015-05-12 17:20:33 +00:00
Mark Salyzyn 9bdc064720 logd: uidToName add dex2oat UID
(cherry pick from commit 023f51f360)

- When searching for uidToName from /data/system/packages.list
  one must search for the uid % AID_USER;
- If uid % AID_USER is greater than AID_SHARED_GID_START - AID_APP,
  then subract it and try again to pick up uidToName.

Change-Id: I24df42957ff7e746fffa5d39484637b1b726b9c0
2015-05-12 09:55:02 -07:00
Elliott Hughes 6b92181a3d am bc014afb: Merge "Switch arch-arm/memset32.S to unified syntax."
* commit 'bc014afbfa46cdf6c24a7812cb28c9c553b28805':
  Switch arch-arm/memset32.S to unified syntax.
2015-05-12 14:56:46 +00:00
Elliott Hughes 5848c4589a am f69624a1: Merge "Remove dead files."
* commit 'f69624a1ef6d1792d73c32cc985362458f1b7442':
  Remove dead files.
2015-05-12 14:50:39 +00:00
Elliott Hughes bc014afbfa Merge "Switch arch-arm/memset32.S to unified syntax." 2015-05-12 14:49:35 +00:00
Elliott Hughes f69624a1ef Merge "Remove dead files." 2015-05-12 14:43:01 +00:00
Elliott Hughes 36284db817 Switch arch-arm/memset32.S to unified syntax.
This fixes the clang build.

Change-Id: I492c7dc016986020de3f70a77e0ace6610f50765
2015-05-11 22:22:13 -07:00
Elliott Hughes fe93e8d2a7 Remove dead files.
Auto-imported from cupcake, not touched since then, or used anyway.

Change-Id: If2d50cddff0238dff818c7bae92fe8e1100fccdf
2015-05-11 21:57:33 -07:00
Mark Salyzyn 9992aa8add am ff1f639c: am 80b129f9: Merge "logd: uidToName add dex2oat UID"
* commit 'ff1f639c801983a364c7c89355de0b83a3f43485':
  logd: uidToName add dex2oat UID
2015-05-12 00:13:02 +00:00
Mark Salyzyn ff1f639c80 am 80b129f9: Merge "logd: uidToName add dex2oat UID"
* commit '80b129f9f08ce9d8b4e315a4413dda61e5dbdd75':
  logd: uidToName add dex2oat UID
2015-05-12 00:01:53 +00:00
Mark Salyzyn 80b129f9f0 Merge "logd: uidToName add dex2oat UID" 2015-05-11 23:51:32 +00:00
Elliott Hughes c74b53590b am 1c9bfdae: am adffad25: Merge "adb: Do not share memory between multiple thread"
* commit '1c9bfdae21b6319679a592a877deef1f03e1fed7':
  adb: Do not share memory between multiple thread
2015-05-11 23:50:07 +00:00
Elliott Hughes 1c9bfdae21 am adffad25: Merge "adb: Do not share memory between multiple thread"
* commit 'adffad25a5464b65f9c58d3d06f7a7ac0bca04e2':
  adb: Do not share memory between multiple thread
2015-05-11 23:37:30 +00:00
Elliott Hughes adffad25a5 Merge "adb: Do not share memory between multiple thread" 2015-05-11 23:30:26 +00:00
Alan Jeon 4af3c40c4a adb: Do not share memory between multiple thread
When multiple client try to connect to other hosts, it failed because
memory corruption. Allocate memory for each thread like other command did.

Change-Id: I79959ce3dbfd11c7553736cd3f5a899815873584
Signed-off-by: Alan Jeon <skyisle@gmail.com>
2015-05-11 16:28:04 -07:00
Nick Kralevich 05867d77be am 6de7a06a: Revert "libaudit: limit to 5 selinux denials per sec"
* commit '6de7a06afb3f70abe1517fc55efd1a11110e5197':
  Revert "libaudit: limit to 5 selinux denials per sec"
2015-05-11 23:07:19 +00:00
Nick Kralevich ee0c814ac7 am 88e184d9: am 97d0c193: Merge "Revert "libaudit: limit to 5 selinux denials per sec""
* commit '88e184d981955c6b1851ae9e0c4f08f61a021563':
  Revert "libaudit: limit to 5 selinux denials per sec"
2015-05-11 23:01:51 +00:00
Spencer Low d396dc93a7 adb: win32: fix daemon acknowledgement
The daemon failed to startup because main.cpp was changed from calling
WriteFile() to android::base::WriteStringToFd(), the later which calls
write() in the C Runtime which by default has stdout in textmode which
does \n to \r\n translation.

The quick fix is to change stdout's mode from text to binary since right
after it is reopened to redirect to the daemon log file anyway.

Change-Id: I322fc9eae5d6abbf63f3d5917b0beb2171b5a15c
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-05-11 15:57:43 -07:00
Nick Kralevich 88e184d981 am 97d0c193: Merge "Revert "libaudit: limit to 5 selinux denials per sec""
* commit '97d0c1935447b4fc91bd59f604ab92e9e579efa3':
  Revert "libaudit: limit to 5 selinux denials per sec"
2015-05-11 22:50:29 +00:00
Nick Kralevich 6de7a06afb Revert "libaudit: limit to 5 selinux denials per sec"
The shamu instabilities continued even after throttling SELinux denials
to 5/second. 5 denials per second is too low when doing device bringup,
and there have been some complaints about lost SELinux denials. See,
for example, http://comments.gmane.org/gmane.comp.security.selinux/21941

Bring the limit back up to 20/second to prevent dropping too many
denials on the floor.

This reverts commit a15db51bbf.

(cherrypick of commit 9667a66019)

Change-Id: I05e85cce0a792d05aa557fcc614c0fc019c15014
2015-05-11 15:43:25 -07:00
Nick Kralevich 97d0c19354 Merge "Revert "libaudit: limit to 5 selinux denials per sec"" 2015-05-11 22:38:58 +00:00
Elliott Hughes 1c9f1f562d am a66426ce: am 85abaf66: Merge "Failure to find an oem partition should not be a remount failure."
* commit 'a66426ce50b099cfaa199a2e5e2c92c041d2f682':
  Failure to find an oem partition should not be a remount failure.
2015-05-11 20:59:56 +00:00
Elliott Hughes 9fef23aaa8 am a51d8b9a: Failure to find an oem partition should not be a remount failure.
* commit 'a51d8b9a1c06a17b8d5d5fd9547a3bf813ea4157':
  Failure to find an oem partition should not be a remount failure.
2015-05-11 20:58:50 +00:00
Elliott Hughes a66426ce50 am 85abaf66: Merge "Failure to find an oem partition should not be a remount failure."
* commit '85abaf66c499a44326d83d488f4b4f5add235f4a':
  Failure to find an oem partition should not be a remount failure.
2015-05-11 20:47:43 +00:00
Elliott Hughes a51d8b9a1c Failure to find an oem partition should not be a remount failure.
Many devices don't have an /oem partition, so find_mount should be
expected to fail, but shouldn't cause the overall remount to fail.

Also clean up all the error handling and reporting, and remove the
dead int* globals.

Bug: http://b/21024141
Change-Id: Ie31021b03c9cab8e972269d7d1ffe383cd30ee9e
(cherry picked from commit 9aa4fda4e6)
2015-05-11 13:36:13 -07:00
Elliott Hughes 85abaf66c4 Merge "Failure to find an oem partition should not be a remount failure." 2015-05-11 20:32:56 +00:00
Elliott Hughes 9aa4fda4e6 Failure to find an oem partition should not be a remount failure.
Many devices don't have an /oem partition, so find_mount should be
expected to fail, but shouldn't cause the overall remount to fail.

Also clean up all the error handling and reporting, and remove the
dead int* globals.

Bug: http://b/21024141
Change-Id: Ie31021b03c9cab8e972269d7d1ffe383cd30ee9e
2015-05-11 13:28:22 -07:00
Mark Salyzyn 977922252f am b8da6942: am b51546f4: Merge "liblog: Add kernel log id"
* commit 'b8da694214515228c487d45f7edc210e77e257b5':
  liblog: Add kernel log id
2015-05-11 16:28:31 +00:00
Mark Salyzyn b8da694214 am b51546f4: Merge "liblog: Add kernel log id"
* commit 'b51546f43f8288ffa5cdfc01e10c20a46a5cfe96':
  liblog: Add kernel log id
2015-05-11 16:15:28 +00:00