OSDN Git Service

android-x86/bionic.git
10 years agoAdd futimens.
Elliott Hughes [Fri, 9 Aug 2013 00:13:33 +0000 (17:13 -0700)]
Add futimens.

(cherry picked from commit d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1)

Bug: 10239370
Change-Id: I0087e85a94d83b6ce68ec6a0768c44cbe4bd0132

10 years agobionic: name malloc'd regions
Colin Cross [Wed, 7 Aug 2013 22:01:55 +0000 (15:01 -0700)]
bionic: name malloc'd regions

Use the new __bionic_name_mem function to name malloc'd memory as
"libc_malloc" on kernels that support it.

Change-Id: I7235eae6918fa107010039b9ab8b7cb362212272

10 years agobionic: add function to name memory
Colin Cross [Wed, 7 Aug 2013 20:31:17 +0000 (13:31 -0700)]
bionic: add function to name memory

Only works on some kernels, and only on page-aligned regions of
anonymous memory.  It will show up in /proc/pid/maps as
[anon:<name>] and in /proc/pid/smaps as Name: <name>

Change-Id: If31667cf45ff41cc2a79a140ff68707526def80e

10 years agoOptimize __memset_chk, __memcpy_chk.
Christopher Ferris [Thu, 1 Aug 2013 20:13:33 +0000 (13:13 -0700)]
Optimize __memset_chk, __memcpy_chk.

This change creates assembler versions of __memcpy_chk/__memset_chk
that is implemented in the memcpy/memset assembler code. This change
avoids an extra call to memcpy/memset, instead allowing a simple fall
through to occur from the chk code into the body of the real
implementation.

Testing:

- Ran the libc_test on __memcpy_chk/__memset_chk on all nexus devices.
- Wrote a small test executable that has three calls to __memcpy_chk and
  three calls to __memset_chk. First call dest_len is length + 1. Second
  call dest_len is length. Third call dest_len is length - 1.
  Verified that the first two calls pass, and the third fails. Examined
  the logcat output on all nexus devices to verify that the fortify
  error message was sent properly.
- I benchmarked the new __memcpy_chk and __memset_chk on all systems. For
  __memcpy_chk and large copies, the savings is relatively small (about 1%).
  For small copies, the savings is large on cortex-a15/krait devices
  (between 5% to 30%).
  For cortex-a9 and small copies, the speed up is present, but relatively
  small (about 3% to 5%).
  For __memset_chk and large copies, the savings is also small (about 1%).
  However, all processors show larger speed-ups on small copies (about 30% to
  100%).

Bug: 9293744

Change-Id: I8926d59fe2673e36e8a27629e02a7b7059ebbc98

10 years agoFix strcpy.c that should have been strcpy.S.
Christopher Ferris [Tue, 6 Aug 2013 00:08:06 +0000 (17:08 -0700)]
Fix strcpy.c that should have been strcpy.S.

Change-Id: Ib4609baad3a14c8b0f37556269781fa2b06916dc

10 years agoMerge "Optimize strcat/strcpy, small tweaks to strlen."
Christopher Ferris [Mon, 5 Aug 2013 23:32:06 +0000 (23:32 +0000)]
Merge "Optimize strcat/strcpy, small tweaks to strlen."

10 years agoam cd927519: Merge "Fix stdint.h intptr_t/uintptr_t for x86_64/x32"
Elliott Hughes [Mon, 5 Aug 2013 22:51:54 +0000 (15:51 -0700)]
am cd927519: Merge "Fix stdint.h intptr_t/uintptr_t for x86_64/x32"

* commit 'cd927519a94939f2ebc307544f827baade529bc9':
  Fix stdint.h intptr_t/uintptr_t for x86_64/x32

10 years agoam a0473d77: Merge "syslog needs a valid socket path for _PATH_LOG"
Elliott Hughes [Mon, 5 Aug 2013 22:51:53 +0000 (15:51 -0700)]
am a0473d77: Merge "syslog needs a valid socket path for _PATH_LOG"

* commit 'a0473d77b2d3a6f26e29cc8c2fdaeb2a4b3ab8f8':
  syslog needs a valid socket path for _PATH_LOG

10 years agoMerge "Fix stdint.h intptr_t/uintptr_t for x86_64/x32"
Elliott Hughes [Mon, 5 Aug 2013 20:55:24 +0000 (20:55 +0000)]
Merge "Fix stdint.h intptr_t/uintptr_t for x86_64/x32"

10 years agoMerge "syslog needs a valid socket path for _PATH_LOG"
Elliott Hughes [Mon, 5 Aug 2013 20:41:50 +0000 (20:41 +0000)]
Merge "syslog needs a valid socket path for _PATH_LOG"

10 years agoam a9c5bb97: Merge "Fix the detection of alt-network in dns resolver."
Robert Greenwalt [Mon, 5 Aug 2013 18:55:53 +0000 (11:55 -0700)]
am a9c5bb97: Merge "Fix the detection of alt-network in dns resolver."

* commit 'a9c5bb972df7cbb4e65cfb53673b26f9d42deacd':
  Fix the detection of alt-network in dns resolver.

10 years agoMerge "Fix the detection of alt-network in dns resolver."
Robert Greenwalt [Mon, 5 Aug 2013 18:45:03 +0000 (18:45 +0000)]
Merge "Fix the detection of alt-network in dns resolver."

10 years agoFix the detection of alt-network in dns resolver.
Robert Greenwalt [Fri, 2 Aug 2013 22:24:45 +0000 (15:24 -0700)]
Fix the detection of alt-network in dns resolver.

Used to determine proper A/AAAA record request.

bug:10132565
Change-Id: I7229f6672e879920a6fae58672cddd72db78546c

10 years agoam 3287dccf: Merge "Add ssse3 implementation of __memcmp16."
Elliott Hughes [Sat, 3 Aug 2013 01:04:01 +0000 (18:04 -0700)]
am 3287dccf: Merge "Add ssse3 implementation of __memcmp16."

* commit '3287dccf2ecced89bb39b857abc8eba997bc3f51':
  Add ssse3 implementation of __memcmp16.

10 years agoam aa2733d1: Merge "Update the comments to reflect the current status."
Ben Cheng [Sat, 3 Aug 2013 00:58:47 +0000 (17:58 -0700)]
am aa2733d1: Merge "Update the comments to reflect the current status."

* commit 'aa2733d17b87c607fccbd6e6a0f44d2d411ffd77':
  Update the comments to reflect the current status.

10 years agoMerge "Add ssse3 implementation of __memcmp16."
Elliott Hughes [Sat, 3 Aug 2013 00:58:46 +0000 (00:58 +0000)]
Merge "Add ssse3 implementation of __memcmp16."

10 years agoam a6ed05c1: Merge "libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher"
Elliott Hughes [Sat, 3 Aug 2013 00:58:46 +0000 (17:58 -0700)]
am a6ed05c1: Merge "libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher"

* commit 'a6ed05c1c4c787241b56df132e77512c64cbc595':
  libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher

10 years agoAdd ssse3 implementation of __memcmp16.
Alexander Ivchenko [Thu, 27 Jun 2013 08:55:46 +0000 (12:55 +0400)]
Add ssse3 implementation of __memcmp16.

__memcmp16 was missing in x86. Also added C-version for backward
compatibility. Added bionic test for __memcmp16 and for wmemcmp.

Change-Id: I33718441e7ee343cdb021d91dbeaf9ce2d4d7eb4
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
10 years agoMerge "Update the comments to reflect the current status."
Ben Cheng [Fri, 2 Aug 2013 23:06:10 +0000 (23:06 +0000)]
Merge "Update the comments to reflect the current status."

10 years agoUpdate the comments to reflect the current status.
Ben Cheng [Fri, 2 Aug 2013 22:33:27 +0000 (15:33 -0700)]
Update the comments to reflect the current status.

Change-Id: I3a6348b568230fe8b21d121e5b8d30561a9703c2

10 years agoMerge "libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher"
Elliott Hughes [Fri, 2 Aug 2013 22:39:08 +0000 (22:39 +0000)]
Merge "libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher"

10 years agoOptimize strcat/strcpy, small tweaks to strlen.
Christopher Ferris [Mon, 15 Jul 2013 19:49:26 +0000 (12:49 -0700)]
Optimize strcat/strcpy, small tweaks to strlen.

Create one version of strcat/strcpy/strlen for cortex-a15/krait and another
version for cortex-a9.

Tested with the libc_test strcat/strcpy/strlen tests.
Including new tests that verify that the src for strcat/strcpy do not
overread across page boundaries.

NOTE: The handling of unaligned strcpy (same code in strcat) could probably
be optimized further such that the src is read 64 bits at a time instead of
the partial reads occurring now.

strlen improves slightly since it was recently optimized.

Performance improvements for strcpy and strcat (using an empty dest string):

cortex-a9
- Small copies vary from about 5% to 20% as the size gets above 10 bytes.
- Copies >= 1024, about a 60% improvement.
- Unaligned copies, from about 40% improvement.

cortex-a15
- Most small copies exhibit a 100% improvement, a few copies only
  improve by 20%.
- Copies >= 1024, about 150% improvement.
- Unaligned copies, about 100% improvement.

krait
- Most small copies vary widely, but on average 20% improvement, then
  the performance gets better, hitting about a 100% improvement when
  copies 64 bytes of data.
- Copies >= 1024, about 100% improvement.
- When coping MBs of data, about 50% improvement.
- Unaligned copies, about 90% improvement.

As strcat destination strings get larger in size:

cortex-a9
- about 40% improvement for small dst strings (>= 32).
- about 250% improvement for dst strings >= 1024.

cortex-a15
- about 200% improvement for small dst strings (>=32).
- about 250% improvement for dst strings >= 1024.

krait
- about 25% improvement for small dst strings (>=32).
- about 100% improvement for dst strings >=1024.

Change-Id: Ifd091ebdbce70fe35a7c5d8f71d5914255f3af35

10 years agoFix stdint.h intptr_t/uintptr_t for x86_64/x32
Pavel Chupin [Tue, 18 Dec 2012 13:25:01 +0000 (17:25 +0400)]
Fix stdint.h intptr_t/uintptr_t for x86_64/x32

Patch is required in NDK headers as well to be able to build multilib
GCC with libgomp support.
It's here: https://android-review.googlesource.com/#/c/62982

Change-Id: I2bec25d8cbca0e5ef1a0857008ececd92f4911be
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoam e6345f1a: Merge "Tell the dns resolver about our domains."
Robert Greenwalt [Thu, 1 Aug 2013 00:57:45 +0000 (17:57 -0700)]
am e6345f1a: Merge "Tell the dns resolver about our domains."

* commit 'e6345f1a1ec691690c69d5663ca8bb2b70240d93':
  Tell the dns resolver about our domains.

10 years agoMerge "Tell the dns resolver about our domains."
Robert Greenwalt [Thu, 1 Aug 2013 00:47:28 +0000 (00:47 +0000)]
Merge "Tell the dns resolver about our domains."

10 years agoTell the dns resolver about our domains.
Robert Greenwalt [Wed, 31 Jul 2013 23:53:46 +0000 (16:53 -0700)]
Tell the dns resolver about our domains.

A refactor caused us to not tell the resolver about search domains
until after it had done the domain fanout.

bug:6799630
Change-Id: Ibabd8fa5bcc69b1490fc5e329e62eb0f2d1a5e63

10 years agoam 101b5e1f: Merge "Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX...
Elliott Hughes [Tue, 30 Jul 2013 00:35:49 +0000 (17:35 -0700)]
am 101b5e1f: Merge "Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way."

* commit '101b5e1f6cc4e24635760928b3d2c1e51c1e5774':
  Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way.

10 years agoMerge "Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way."
Elliott Hughes [Tue, 30 Jul 2013 00:29:58 +0000 (00:29 +0000)]
Merge "Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way."

10 years agoDefine PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way.
Elliott Hughes [Mon, 29 Jul 2013 23:51:45 +0000 (16:51 -0700)]
Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way.

Also make sysconf use PTHREAD_STACK_MIN rather than redefining its
own, different, constant.

Bug: 9997352
Change-Id: I9a8e7d2b18e691439abfb45533e82c36eee9e81d

10 years agolibgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher
synergydev [Sun, 28 Jul 2013 21:43:00 +0000 (21:43 +0000)]
libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher

This is needed when passing -mcpu=cortex-a9 or higher on a modern
toolchain for prebuilt library compatibility

Change-Id: I73eb2393377914ae26216a8c2828ad973d1c1225

10 years agoam 9a73d08f: Merge "Bump the number of TLS slots to 128."
Elliott Hughes [Fri, 26 Jul 2013 00:04:18 +0000 (17:04 -0700)]
am 9a73d08f: Merge "Bump the number of TLS slots to 128."

* commit '9a73d08f4c334c00fe06d583d37e038ebe063eba':
  Bump the number of TLS slots to 128.

10 years agoMerge "Bump the number of TLS slots to 128."
Elliott Hughes [Thu, 25 Jul 2013 21:51:05 +0000 (21:51 +0000)]
Merge "Bump the number of TLS slots to 128."

10 years agoBump the number of TLS slots to 128.
Elliott Hughes [Thu, 25 Jul 2013 21:14:22 +0000 (14:14 -0700)]
Bump the number of TLS slots to 128.

Bug: 9997352
Change-Id: I7bde7228d803e9d4bb83309c5891d54a07e3b025

10 years agoam a9feb5e3: Merge "Avoid sign extension of the mmap offset."
Elliott Hughes [Thu, 25 Jul 2013 17:51:00 +0000 (10:51 -0700)]
am a9feb5e3: Merge "Avoid sign extension of the mmap offset."

* commit 'a9feb5e33a5261f45fb25fd5e90a56792c6a437e':
  Avoid sign extension of the mmap offset.

10 years agoMerge "Avoid sign extension of the mmap offset."
Elliott Hughes [Thu, 25 Jul 2013 17:28:59 +0000 (17:28 +0000)]
Merge "Avoid sign extension of the mmap offset."

10 years agoAvoid sign extension of the mmap offset.
Elliott Hughes [Thu, 25 Jul 2013 17:15:07 +0000 (10:15 -0700)]
Avoid sign extension of the mmap offset.

off_t is signed to support seeking backwards, but that's a liability
when using off_t to represent a subset of a file.

Change-Id: I2a3615166eb16212347eb47f1242e3bfb93c2022

10 years agoam bfba6aac: am a8d06766: Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not...
Elliott Hughes [Wed, 24 Jul 2013 01:10:51 +0000 (18:10 -0700)]
am bfba6aac: am a8d06766: Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."

* commit 'bfba6aac99115972fad3341aef595c0ca1f7258b':
  [MIPS] __dso_handle.S and __dso_handle_so.S not needed.

10 years agoam a8d06766: Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."
Elliott Hughes [Wed, 24 Jul 2013 01:07:12 +0000 (18:07 -0700)]
am a8d06766: Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."

* commit 'a8d06766c7674bbfde852e8bfee4200e75ad8f24':
  [MIPS] __dso_handle.S and __dso_handle_so.S not needed.

10 years agoMerge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."
Elliott Hughes [Wed, 24 Jul 2013 01:05:18 +0000 (01:05 +0000)]
Merge "[MIPS] __dso_handle.S and __dso_handle_so.S not needed."

10 years agoam c5749f1f: am 061246b6: Merge "Restore dlmalloc mmap threshold to 64k"
Rom Lemarchand [Tue, 23 Jul 2013 20:58:12 +0000 (13:58 -0700)]
am c5749f1f: am 061246b6: Merge "Restore dlmalloc mmap threshold to 64k"

* commit 'c5749f1f4232e59e66737488036aba1f583867d5':
  Restore dlmalloc mmap threshold to 64k

10 years agoam 061246b6: Merge "Restore dlmalloc mmap threshold to 64k"
Rom Lemarchand [Tue, 23 Jul 2013 20:52:29 +0000 (13:52 -0700)]
am 061246b6: Merge "Restore dlmalloc mmap threshold to 64k"

* commit '061246b600c16a80b246804221b9e3fa65e507d9':
  Restore dlmalloc mmap threshold to 64k

10 years agoMerge "Restore dlmalloc mmap threshold to 64k"
Rom Lemarchand [Tue, 23 Jul 2013 20:49:46 +0000 (20:49 +0000)]
Merge "Restore dlmalloc mmap threshold to 64k"

10 years agoRestore dlmalloc mmap threshold to 64k
Rom Lemarchand [Tue, 23 Jul 2013 18:30:52 +0000 (11:30 -0700)]
Restore dlmalloc mmap threshold to 64k

Restoring DEFAULT_MMAP_THRESHOLD to 64k, the way it was before
999089181ef60bb67e1a49f2cf6f4ec608a7caf8.

This forces allocations in the 64k-256k range to be mmaped.

Change-Id: Iace55ed638edd272b3e94fa6cd2ddd349042be84
Signed-off-by: Rom Lemarchand <romlem@google.com>
10 years ago[MIPS] __dso_handle.S and __dso_handle_so.S not needed.
Pete Delaney [Tue, 23 Jul 2013 04:54:46 +0000 (21:54 -0700)]
[MIPS] __dso_handle.S and __dso_handle_so.S not needed.

Global hidden variable __dso_handle is now declared in:
       bionic/libc/private/__dso_handle.h

Change-Id: I8e951a8d7c65877bafc1be23a7fff6d44d3a2846
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu <chao-ying.fu@imgtec.com>
11 years agoam c2902edf: am 6fe4a58f: Merge "Move stuff only needed by pthread-timers.c into...
Elliott Hughes [Sat, 20 Jul 2013 00:19:46 +0000 (17:19 -0700)]
am c2902edf: am 6fe4a58f: Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."

* commit 'c2902edfc4aaa02977eef7154d05d5369bc48281':
  Move stuff only needed by pthread-timers.c into pthread-timers.c.

11 years agoam 6fe4a58f: Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."
Elliott Hughes [Sat, 20 Jul 2013 00:13:33 +0000 (17:13 -0700)]
am 6fe4a58f: Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."

* commit '6fe4a58f84954523f17114f1f7cf060a3573c073':
  Move stuff only needed by pthread-timers.c into pthread-timers.c.

11 years agoMerge "Move stuff only needed by pthread-timers.c into pthread-timers.c."
Elliott Hughes [Sat, 20 Jul 2013 00:10:31 +0000 (00:10 +0000)]
Merge "Move stuff only needed by pthread-timers.c into pthread-timers.c."

11 years agoam 178c4185: am e8bd8c2e: Merge "Upgrade mktemp.c to the current upstream version."
Elliott Hughes [Fri, 19 Jul 2013 23:43:07 +0000 (16:43 -0700)]
am 178c4185: am e8bd8c2e: Merge "Upgrade mktemp.c to the current upstream version."

* commit '178c41857321732259c3e22d73c86c22ae4359b5':
  Upgrade mktemp.c to the current upstream version.

11 years agoMove stuff only needed by pthread-timers.c into pthread-timers.c.
Elliott Hughes [Fri, 19 Jul 2013 23:42:27 +0000 (16:42 -0700)]
Move stuff only needed by pthread-timers.c into pthread-timers.c.

Change-Id: I4915b3fff9c4f5a36b4f51027fb22019c11607b0

11 years agoam e8bd8c2e: Merge "Upgrade mktemp.c to the current upstream version."
Elliott Hughes [Fri, 19 Jul 2013 23:37:52 +0000 (16:37 -0700)]
am e8bd8c2e: Merge "Upgrade mktemp.c to the current upstream version."

* commit 'e8bd8c2ed9c71c73682f29020456934c55f260e3':
  Upgrade mktemp.c to the current upstream version.

11 years agoMerge "Upgrade mktemp.c to the current upstream version."
Elliott Hughes [Fri, 19 Jul 2013 23:35:29 +0000 (23:35 +0000)]
Merge "Upgrade mktemp.c to the current upstream version."

11 years agoUpgrade mktemp.c to the current upstream version.
Elliott Hughes [Fri, 19 Jul 2013 22:20:31 +0000 (15:20 -0700)]
Upgrade mktemp.c to the current upstream version.

Yet another archaic relic containing bugs that had been fixed years before the
Android project even started...

Bug: 9935113
Change-Id: I3c9d019a216efd609ee568cf8c70bc360f357403

11 years agoMerge "Kexec header generated from linux header 3.10"
Colin Cross [Thu, 18 Jul 2013 17:41:09 +0000 (17:41 +0000)]
Merge "Kexec header generated from linux header 3.10"

11 years agoam 81b46980: am f8a66bb3: Merge "Remove some non-unused makefile generality."
Elliott Hughes [Thu, 18 Jul 2013 00:45:03 +0000 (17:45 -0700)]
am 81b46980: am f8a66bb3: Merge "Remove some non-unused makefile generality."

* commit '81b4698059c37ac36aa74d1498bef5654580ad3f':
  Remove some non-unused makefile generality.

11 years agoam f8a66bb3: Merge "Remove some non-unused makefile generality."
Elliott Hughes [Thu, 18 Jul 2013 00:41:43 +0000 (17:41 -0700)]
am f8a66bb3: Merge "Remove some non-unused makefile generality."

* commit 'f8a66bb31204b42f830c1865a795b5f3eb1e0147':
  Remove some non-unused makefile generality.

11 years agoam b6b2375d: am 8fa9081f: Merge "[MIPS] Rewrite MIPS crtbegin* as C files."
Elliott Hughes [Thu, 18 Jul 2013 00:40:46 +0000 (17:40 -0700)]
am b6b2375d: am 8fa9081f: Merge "[MIPS] Rewrite MIPS crtbegin* as C files."

* commit 'b6b2375df8ca63a5e349d8277d425ab58e16aeb1':
  [MIPS] Rewrite MIPS crtbegin* as C files.

11 years agoMerge "Remove some non-unused makefile generality."
Elliott Hughes [Thu, 18 Jul 2013 00:39:35 +0000 (00:39 +0000)]
Merge "Remove some non-unused makefile generality."

11 years agoRemove some non-unused makefile generality.
Elliott Hughes [Thu, 18 Jul 2013 00:38:45 +0000 (17:38 -0700)]
Remove some non-unused makefile generality.

MIPS uses .c files like ARM and x86 now.

Change-Id: Ie580647e385121c380316c443ec199dabf657ff8

11 years agoam 8fa9081f: Merge "[MIPS] Rewrite MIPS crtbegin* as C files."
Elliott Hughes [Thu, 18 Jul 2013 00:36:26 +0000 (17:36 -0700)]
am 8fa9081f: Merge "[MIPS] Rewrite MIPS crtbegin* as C files."

* commit '8fa9081f48c4861f83737d59bf2c2c8f21c7da3f':
  [MIPS] Rewrite MIPS crtbegin* as C files.

11 years agoMerge "[MIPS] Rewrite MIPS crtbegin* as C files."
Elliott Hughes [Thu, 18 Jul 2013 00:34:22 +0000 (00:34 +0000)]
Merge "[MIPS] Rewrite MIPS crtbegin* as C files."

11 years ago[MIPS] Rewrite MIPS crtbegin* as C files.
Pete Delaney [Wed, 17 Jul 2013 21:23:29 +0000 (14:23 -0700)]
[MIPS] Rewrite MIPS crtbegin* as C files.

This updates the MIPS arch to be much more in
sync with the commit Nick Kralevich made last
June; see 9d40326830c2bd407427889c554adeb915ee6b4a.

    Rewrite
     crtbegin.S        -> crtbegin.c
     crtbegin_so.S     -> crtbegin_so.c
     __dso_handle.S    -> __dso_handle.c
     __dso_handle_so.S -> __dso_handle_so.c
     atexit.S          -> atexit.c

Previously __do_global_dtors_aux was in the tasks
__FINI_ARRAY__ linked with crtbegin.S and it now being
removed as there is no need to call a destructor just
before terminating a process.

Shared libraries, on the other hand, are linked with
crtbegin_so.c and have a hidden destructor declared
to allow the bionic linker to call __on_dlclose().

Change-Id: Ieb4da5199b54573de05743990e309db381a11cb8
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu <chao-ying.fu@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
11 years agoam cbf07a25: am 2be511d4: Merge "Improve stack overflow diagnostics (take 2)."
Elliott Hughes [Wed, 17 Jul 2013 20:53:06 +0000 (13:53 -0700)]
am cbf07a25: am 2be511d4: Merge "Improve stack overflow diagnostics (take 2)."

* commit 'cbf07a25149cd924a348e4dc0395c5d08f86fd7f':
  Improve stack overflow diagnostics (take 2).

11 years agoam 2be511d4: Merge "Improve stack overflow diagnostics (take 2)."
Elliott Hughes [Wed, 17 Jul 2013 20:50:15 +0000 (13:50 -0700)]
am 2be511d4: Merge "Improve stack overflow diagnostics (take 2)."

* commit '2be511d405d47eccc61a6e3c338d1877bf33b4fa':
  Improve stack overflow diagnostics (take 2).

11 years agoMerge "Improve stack overflow diagnostics (take 2)."
Elliott Hughes [Wed, 17 Jul 2013 20:48:25 +0000 (20:48 +0000)]
Merge "Improve stack overflow diagnostics (take 2)."

11 years agoImprove stack overflow diagnostics (take 2).
Elliott Hughes [Wed, 17 Jul 2013 20:33:19 +0000 (13:33 -0700)]
Improve stack overflow diagnostics (take 2).

This reverts commits eb1b07469f2b5a392dc1bfd8adc211aea8c72bc5 and
d14dc3b87fbf80553f1cafa453816b7f11366627, and fixes the bug where
we were calling mmap (which might cause errno to be set) before
__set_tls (which is required to implement errno).

Bug: 8557703
Change-Id: I2c36d00240c56e156e1bb430d8c22a73a068b70c

11 years agoresolved conflicts for merge of e35d6c28 to master
Elliott Hughes [Wed, 17 Jul 2013 20:28:30 +0000 (13:28 -0700)]
resolved conflicts for merge of e35d6c28 to master

Change-Id: I237bfc35d872a2e2ff10984012f9811488a5cea7

11 years agoam 40e7a878: Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting...
Elliott Hughes [Wed, 17 Jul 2013 20:22:39 +0000 (13:22 -0700)]
am 40e7a878: Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno."

* commit '40e7a87864fee75f7af2caf8e1972d0d764135cd':
  Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.

11 years agoMerge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno."
Elliott Hughes [Wed, 17 Jul 2013 20:20:41 +0000 (20:20 +0000)]
Merge "Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno."

11 years agoresolved conflicts for merge of 4763ef2b to master
Elliott Hughes [Wed, 17 Jul 2013 20:18:43 +0000 (13:18 -0700)]
resolved conflicts for merge of 4763ef2b to master

Change-Id: I4d424f9fb438c2ed845bca0bbcae69b4d0f5e3dc

11 years agoPrevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.
Elliott Hughes [Wed, 17 Jul 2013 20:12:26 +0000 (13:12 -0700)]
Prevent the madvise(MADV_MERGEABLE) mmap hack from affecting errno.

Bug: 9889616
Change-Id: I4a7323e0ae5aeb5cbe0da1b2bc7501d83b3a2aa4

11 years agoam b7b36b81: Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"
Elliott Hughes [Wed, 17 Jul 2013 20:05:13 +0000 (13:05 -0700)]
am b7b36b81: Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"

* commit 'b7b36b819e8029a152859f3204ba2da38a0e2879':
  mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps

11 years agoMerge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"
Elliott Hughes [Wed, 17 Jul 2013 20:02:11 +0000 (20:02 +0000)]
Merge "mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps"

11 years agommap: Reinstate passing MADV_MERGEABLE on private anonymous maps
Rom Lemarchand [Sat, 18 May 2013 00:08:41 +0000 (17:08 -0700)]
mmap: Reinstate passing MADV_MERGEABLE on private anonymous maps

Reinstate mmap calling madvise(MADV_MERGEABLE) removed in
635df850e5037be5093f64a87ec2e0a23bf7a50b

(cherry-pick of c702a904679a36511bead29c51eeac15d81f4fd2.)

Change-Id: I18803fb54701b2b3d8186dff5c678211ee3efa1f

11 years agoam 6f08b865: am 2cf5a6f6: Merge "Revert "Improve stack overflow diagnostics.""
Guang Zhu [Wed, 17 Jul 2013 03:23:42 +0000 (20:23 -0700)]
am 6f08b865: am 2cf5a6f6: Merge "Revert "Improve stack overflow diagnostics.""

* commit '6f08b8659a3682b7e774af6ed68b1b613e147f1b':
  Revert "Improve stack overflow diagnostics."

11 years agoam 849bfd58: am 8c1b9668: Merge "Revert "Clean up our alternate signal stacks.""
Guang Zhu [Wed, 17 Jul 2013 03:23:41 +0000 (20:23 -0700)]
am 849bfd58: am 8c1b9668: Merge "Revert "Clean up our alternate signal stacks.""

* commit '849bfd58118e8c8a4b1ad8a7c3de74bb3cd13863':
  Revert "Clean up our alternate signal stacks."

11 years agoam 2cf5a6f6: Merge "Revert "Improve stack overflow diagnostics.""
Guang Zhu [Wed, 17 Jul 2013 03:18:57 +0000 (20:18 -0700)]
am 2cf5a6f6: Merge "Revert "Improve stack overflow diagnostics.""

* commit '2cf5a6f6627549842c0c840ff3615ae942a90ea3':
  Revert "Improve stack overflow diagnostics."

11 years agoam 8c1b9668: Merge "Revert "Clean up our alternate signal stacks.""
Guang Zhu [Wed, 17 Jul 2013 03:18:57 +0000 (20:18 -0700)]
am 8c1b9668: Merge "Revert "Clean up our alternate signal stacks.""

* commit '8c1b96681af91fda86a5493e7f7e4381ce489648':
  Revert "Clean up our alternate signal stacks."

11 years agoMerge "Revert "Improve stack overflow diagnostics.""
Guang Zhu [Wed, 17 Jul 2013 03:17:19 +0000 (03:17 +0000)]
Merge "Revert "Improve stack overflow diagnostics.""

11 years agoRevert "Improve stack overflow diagnostics."
Guang Zhu [Wed, 17 Jul 2013 03:17:05 +0000 (03:17 +0000)]
Revert "Improve stack overflow diagnostics."

This reverts commit aa754dca90487356cabf07ade0e8d88c2630b784.

Change-Id: Ifa76eee31f7f44075eb3a48554315b2693062f44

11 years agoMerge "Revert "Clean up our alternate signal stacks.""
Guang Zhu [Wed, 17 Jul 2013 03:16:51 +0000 (03:16 +0000)]
Merge "Revert "Clean up our alternate signal stacks.""

11 years agoRevert "Clean up our alternate signal stacks."
Guang Zhu [Wed, 17 Jul 2013 03:16:04 +0000 (03:16 +0000)]
Revert "Clean up our alternate signal stacks."

This reverts commit 5cf87951abd23b0b3ebf159e8aa06b02e39527ca.

Change-Id: Idd6ca7d80a018755da3bd315d91193723ce7f3bf

11 years agoam 7ff868a6: am f63c28f0: Merge "Fix assembler errors in generic arm strlen.c."
Christopher Ferris [Wed, 17 Jul 2013 00:24:40 +0000 (17:24 -0700)]
am 7ff868a6: am f63c28f0: Merge "Fix assembler errors in generic arm strlen.c."

* commit '7ff868a6307f0d5e63555b5d320b8ad6e490e3c4':
  Fix assembler errors in generic arm strlen.c.

11 years agoam b1d7fd49: am 6f4fed74: Merge "Add new optimized strlen for arm."
Christopher Ferris [Wed, 17 Jul 2013 00:24:40 +0000 (17:24 -0700)]
am b1d7fd49: am 6f4fed74: Merge "Add new optimized strlen for arm."

* commit 'b1d7fd4969fdd3d3402b500840561beb30962c1d':
  Add new optimized strlen for arm.

11 years agoam f63c28f0: Merge "Fix assembler errors in generic arm strlen.c."
Christopher Ferris [Wed, 17 Jul 2013 00:22:05 +0000 (17:22 -0700)]
am f63c28f0: Merge "Fix assembler errors in generic arm strlen.c."

* commit 'f63c28f0338fd647e88f1f9300b2220093af1aae':
  Fix assembler errors in generic arm strlen.c.

11 years agoam 6f4fed74: Merge "Add new optimized strlen for arm."
Christopher Ferris [Wed, 17 Jul 2013 00:21:55 +0000 (17:21 -0700)]
am 6f4fed74: Merge "Add new optimized strlen for arm."

* commit '6f4fed74cb9405c0f5322307085d15afed6be764':
  Add new optimized strlen for arm.

11 years agoMerge "Fix assembler errors in generic arm strlen.c."
Christopher Ferris [Wed, 17 Jul 2013 00:19:42 +0000 (00:19 +0000)]
Merge "Fix assembler errors in generic arm strlen.c."

11 years agoMerge "Add new optimized strlen for arm."
Christopher Ferris [Wed, 17 Jul 2013 00:19:29 +0000 (00:19 +0000)]
Merge "Add new optimized strlen for arm."

11 years agoFix assembler errors in generic arm strlen.c.
Christopher Ferris [Mon, 15 Jul 2013 20:55:45 +0000 (13:55 -0700)]
Fix assembler errors in generic arm strlen.c.

Tested using a static version of the strlen libc_test program
on a nexus7 that uses the generic code.

Merge from internal master.

(cherry-picked from d8d10a8994472e40d19301b7087806630877b4d5)

Change-Id: I88f7dc01dc5b5c3ac2d5580d92153bc1bc36c564

11 years agoAdd new optimized strlen for arm.
Christopher Ferris [Wed, 10 Jul 2013 21:31:03 +0000 (14:31 -0700)]
Add new optimized strlen for arm.

This optimized version is primarily targeted at cortex-a15.

Tested on all nexus devices using the system/extras/libc_test strlen test.
Tested alignments from 1 to 32 that are powers of 2.
Tested that strlen does not cross page boundaries at all alignments.

Speed improvements listed below:

cortex-a15
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~250% improvement.

cortex-a9
- Sizes >= 32 bytes, ~75% improvement.
- Sizes >= 1024 bytes, ~85% improvement.

krait
- Sizes >= 32 bytes, ~95% improvement.
- Sizes >= 1024 bytes, ~160% improvement.

Merge from internal master.

(cherry-picked from 2fc071797743b88a9a47427d46baed7c7b24f4d2)

Change-Id: I1ceceb4e745fd68e9d946f96d1d42e0cdaff6ccf

11 years agoam 79dfb1af: am f35e0c14: Merge "Clean up our alternate signal stacks."
Elliott Hughes [Tue, 16 Jul 2013 22:56:16 +0000 (15:56 -0700)]
am 79dfb1af: am f35e0c14: Merge "Clean up our alternate signal stacks."

* commit '79dfb1afda16565a0dd378eca7f72bfe81fae205':
  Clean up our alternate signal stacks.

11 years agoam f35e0c14: Merge "Clean up our alternate signal stacks."
Elliott Hughes [Tue, 16 Jul 2013 22:50:18 +0000 (15:50 -0700)]
am f35e0c14: Merge "Clean up our alternate signal stacks."

* commit 'f35e0c149f1a6801a5af7c339f84d81ae05c3adf':
  Clean up our alternate signal stacks.

11 years agoMerge "Clean up our alternate signal stacks."
Elliott Hughes [Tue, 16 Jul 2013 22:47:41 +0000 (22:47 +0000)]
Merge "Clean up our alternate signal stacks."

11 years agoam 10a954de: am 026867c7: Merge "Improve stack overflow diagnostics."
Elliott Hughes [Tue, 16 Jul 2013 22:36:12 +0000 (15:36 -0700)]
am 10a954de: am 026867c7: Merge "Improve stack overflow diagnostics."

* commit '10a954dea6732232ed6cf56d3aa6ca38673dacbf':
  Improve stack overflow diagnostics.

11 years agoam d2acf124: am 9562d38d: Merge "Clean up __builtin_expect usage."
Elliott Hughes [Tue, 16 Jul 2013 22:36:12 +0000 (15:36 -0700)]
am d2acf124: am 9562d38d: Merge "Clean up __builtin_expect usage."

* commit 'd2acf124ed7ad18f8adb5159544c92234cade90e':
  Clean up __builtin_expect usage.

11 years agoam 2a18ea14: am f152e386: Merge "EABI syscall cleanup."
Elliott Hughes [Tue, 16 Jul 2013 22:36:11 +0000 (15:36 -0700)]
am 2a18ea14: am f152e386: Merge "EABI syscall cleanup."

* commit '2a18ea1462cf65cc51bfcb1a1c46972ee5af1d01':
  EABI syscall cleanup.

11 years agoam 026867c7: Merge "Improve stack overflow diagnostics."
Elliott Hughes [Tue, 16 Jul 2013 22:31:40 +0000 (15:31 -0700)]
am 026867c7: Merge "Improve stack overflow diagnostics."

* commit '026867c7dcce7828212dcd4a61806146908e9039':
  Improve stack overflow diagnostics.

11 years agoam 9562d38d: Merge "Clean up __builtin_expect usage."
Elliott Hughes [Tue, 16 Jul 2013 22:31:39 +0000 (15:31 -0700)]
am 9562d38d: Merge "Clean up __builtin_expect usage."

* commit '9562d38df1e4aba941b3433cfd0922fee5ea258b':
  Clean up __builtin_expect usage.

11 years agoam f152e386: Merge "EABI syscall cleanup."
Elliott Hughes [Tue, 16 Jul 2013 22:31:39 +0000 (15:31 -0700)]
am f152e386: Merge "EABI syscall cleanup."

* commit 'f152e386fcf477f3f5de9dc020c3660d4f9c4b81':
  EABI syscall cleanup.

11 years agoClean up our alternate signal stacks.
Elliott Hughes [Tue, 16 Jul 2013 21:32:47 +0000 (14:32 -0700)]
Clean up our alternate signal stacks.

Bug: 8557703
Change-Id: Ie93901dd1c29e9d3bf795b0f0400616d9ef08f75

11 years agoMerge "Improve stack overflow diagnostics."
Elliott Hughes [Tue, 16 Jul 2013 20:38:55 +0000 (20:38 +0000)]
Merge "Improve stack overflow diagnostics."