Commit Graph

5573 Commits

Author SHA1 Message Date
Elliott Hughes
0d5745fe8a am 5951e846: Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
* commit '5951e84646553cdcba0c619f1424f2d934eeabb2':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-13 14:45:22 -07:00
Elliott Hughes
fd61eccf6b am ff9b7aa6: Merge "Make ctype.h a little less unhygienic."
* commit 'ff9b7aa695bd4860c0551b8899f2f26311174855':
  Make ctype.h a little less unhygienic.
2013-08-13 14:43:26 -07:00
Elliott Hughes
3912f90e56 Make ctype.h a little less unhygienic.
This caused trouble for stlport.

(cherry picked from commit 5e9b20f721)

Change-Id: I85d09c12c6de1e8502f83e0ef0f17747fdfe08a5
2013-08-13 14:42:43 -07:00
Elliott Hughes
5951e84646 Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
(cherry picked from commit aec2ffbc5a)

Change-Id: Ib61b52dc37e63493094a0a7af23bf89d4a9f0ce5
2013-08-13 14:41:07 -07:00
Elliott Hughes
ff9b7aa695 Merge "Make ctype.h a little less unhygienic." 2013-08-13 21:40:13 +00:00
Elliott Hughes
5e9b20f721 Make ctype.h a little less unhygienic.
This caused trouble for stlport.

Change-Id: Id40787c5a2b7a3a4e12fb557efe549778a01cbbd
2013-08-13 14:30:59 -07:00
Elliott Hughes
6539da0f25 am c1772397: am ff8dcd4a: am c933493a: Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols."
* commit 'c1772397f96e82e142dd082da4747824e7c8a839':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-12 15:52:02 -07:00
Elliott Hughes
c1772397f9 am ff8dcd4a: am c933493a: Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols."
* commit 'ff8dcd4a1056257b454da71e1ea1371bb73d3a79':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-12 14:28:52 -07:00
Elliott Hughes
ff8dcd4a10 am c933493a: Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols."
* commit 'c933493ac28c40558f369d175da738ba601d8499':
  Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
2013-08-12 13:25:48 -07:00
Elliott Hughes
c933493ac2 Merge "Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols." 2013-08-12 20:23:34 +00:00
Elliott Hughes
aec2ffbc5a Fix our missing abs/labs/llabs/imaxabs (and imaxdiv) symbols.
Change-Id: I94c411c22634e43184445c82e7388e51fc46a8cc
2013-08-12 12:07:05 -07:00
The Android Automerger
f63a467cdd merge in klp-release history after reset to klp-dev 2013-08-12 06:00:44 -07:00
Elliott Hughes
70e5758f5c am 2a5d2e98: am 9e9d1e01: resolved conflicts for merge of 86125aca to klp-dev
* commit '2a5d2e98f9ffbddf37d8d57ed3028c3c8349e351':
2013-08-09 06:07:11 -07:00
Elliott Hughes
a7fc5bde71 am 598f3e9c: Merge "resolved conflicts for merge of dce94165 to klp-dev-plus-aosp" into klp-dev-plus-aosp
* commit '598f3e9c4a48a4f4cbae6fb163f378d9fd1e6321':
  Add futimens.
2013-08-09 06:07:10 -07:00
Elliott Hughes
8e6855e0a8 am 14ec1b58: am ceb670cf: Merge branch \'klp-dev\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into klp-dev
* commit '14ec1b58869362f07ffdf7495cbba2f746da7b77':
  Add futimens.
2013-08-09 06:07:04 -07:00
Christopher Ferris
fe94d1f0a8 am a07a9556: (-s ours) am 1036cd79: am 6beb3ea6: (-s ours) am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit 'a07a9556663db4dcf7924dd50a91dd6d5f3e266c':
2013-08-09 06:07:03 -07:00
Christopher Ferris
7e8a18960c am 0a7e61d4: (-s ours) am 5ec2ab68: am 21b4ffa7: (-s ours) am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '0a7e61d4a1a28a7c66c05e0ef0b69c7c5b14a2d9':
2013-08-09 06:07:03 -07:00
Christopher Ferris
d60dca00dd am d41e52a2: (-s ours) am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit 'd41e52a238bdb91df5dffb81f202b3d50949bb9a':
  Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
2013-08-09 06:06:56 -07:00
Christopher Ferris
351c506315 am 2e0a707f: (-s ours) am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '2e0a707f793a6831452aca9ed0021e90014f3635':
  Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
2013-08-09 06:06:56 -07:00
Elliott Hughes
2a5d2e98f9 am 9e9d1e01: resolved conflicts for merge of 86125aca to klp-dev
* commit '9e9d1e016faf12c4bc5454ce16e20f7db693a72d':
2013-08-08 18:10:55 -07:00
Elliott Hughes
9e9d1e016f resolved conflicts for merge of 86125aca to klp-dev
Change-Id: I78622ecbad27301b285193a085fa04374aa60033
2013-08-08 18:08:33 -07:00
Elliott Hughes
598f3e9c4a Merge "resolved conflicts for merge of dce94165 to klp-dev-plus-aosp" into klp-dev-plus-aosp 2013-08-09 01:05:49 +00:00
Elliott Hughes
3c3a64616a resolved conflicts for merge of dce94165 to klp-dev-plus-aosp
Change-Id: If5f34f4a31c6a1218751f472ac949c324117a948
2013-08-08 18:03:38 -07:00
Elliott Hughes
14ec1b5886 am ceb670cf: Merge branch \'klp-dev\' of https://googleplex-android.googlesource.com/_direct/platform/bionic into klp-dev
* commit 'ceb670cfc09e407a30627d5044f45d5e28e1be5d':
  Add futimens.
2013-08-08 17:59:33 -07:00
Christopher Ferris
a07a955666 am 1036cd79: am 6beb3ea6: (-s ours) am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit '1036cd7939a4d6474d3f5762ea8bfdd95d3d0cfe':
2013-08-08 17:59:32 -07:00
Christopher Ferris
0a7e61d4a1 am 5ec2ab68: am 21b4ffa7: (-s ours) am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '5ec2ab68f98af7fcb4975bafcb7293f835c9c4b6':
2013-08-08 17:59:31 -07:00
Elliott Hughes
ceb670cfc0 Merge branch 'klp-dev' of https://googleplex-android.googlesource.com/_direct/platform/bionic into klp-dev 2013-08-08 17:53:31 -07:00
Christopher Ferris
1036cd7939 am 6beb3ea6: (-s ours) am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit '6beb3ea6a1a49baef001ddd8c6872631f5e90f82':
  Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
2013-08-08 17:53:19 -07:00
Christopher Ferris
5ec2ab68f9 am 21b4ffa7: (-s ours) am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '21b4ffa7372b029e5a4898b877feb843da2831e9':
  Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
2013-08-08 17:53:18 -07:00
Elliott Hughes
840a114eb1 Add futimens.
(cherry picked from commit d0be7c8f9a)

Bug: 10239370
Change-Id: I0087e85a94d83b6ce68ec6a0768c44cbe4bd0132
2013-08-08 17:52:06 -07:00
Elliott Hughes
86125acacd am dce94165: am ee48fed5: Merge "Add futimens."
* commit 'dce94165a5624935db9855e208420d36c763f771':
  Add futimens.
2013-08-08 17:45:45 -07:00
Christopher Ferris
6beb3ea6a1 am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit 'd7d5049d58427e23318fa1920d63712676fc7725':
  Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
2013-08-08 17:45:45 -07:00
Christopher Ferris
21b4ffa737 am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '5427eb5c63417c7bc59bbfe112c97917dcef4e8c':
  Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
2013-08-08 17:45:44 -07:00
Christopher Ferris
d41e52a238 am d7d5049d: (-s ours) am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit 'd7d5049d58427e23318fa1920d63712676fc7725':
  Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
2013-08-08 17:44:21 -07:00
Christopher Ferris
2e0a707f79 am 5427eb5c: (-s ours) am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit '5427eb5c63417c7bc59bbfe112c97917dcef4e8c':
  Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
2013-08-08 17:44:21 -07:00
Elliott Hughes
dce94165a5 am ee48fed5: Merge "Add futimens."
* commit 'ee48fed51894f3db324e957058ed2ddcf23dddc7':
  Add futimens.
2013-08-08 17:41:15 -07:00
Christopher Ferris
d7d5049d58 am 632fd518: (-s ours) Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE"
* commit '632fd5183a611b80e009be36f881f572acc41619':
  Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
2013-08-08 17:41:15 -07:00
Christopher Ferris
5427eb5c63 am e2066293: (-s ours) Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE"
* commit 'e2066293e8279641d4abd13ec3fbdd6f42def83d':
  Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
2013-08-08 17:41:14 -07:00
Elliott Hughes
ee48fed518 Merge "Add futimens." 2013-08-09 00:37:32 +00:00
Elliott Hughes
d0be7c8f9a Add futimens.
Bug: 10239370
Change-Id: I518340084103dc339ef8a065d4837d6258a1381d
2013-08-08 17:13:33 -07:00
Christopher Ferris
632fd5183a Merge "Fix strcpy.c that should have been strcpy.S. DO NOT MERGE" 2013-08-08 19:12:20 +00:00
Christopher Ferris
e2066293e8 Merge "Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE" 2013-08-08 19:12:00 +00:00
Christopher Ferris
b922ed3498 Fix strcpy.c that should have been strcpy.S. DO NOT MERGE
Merge from internal master.

(cherry-picked from 1ce6654163)

Change-Id: I376b831df42248baadde7202a30a68112f752ff7
2013-08-08 12:09:37 -07:00
Christopher Ferris
4e24dcc8d8 Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE
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.

Merge from internal master.

(cherry-picked from d119b7b6f4)

Change-Id: I296463b251ef9fab004ee4dded2793feca5b547a
2013-08-08 11:13:46 -07:00
The Android Automerger
b683cf117d merge in klp-release history after reset to klp-dev 2013-08-08 07:53:11 -07:00
Colin Cross
7f4074d17d 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
2013-08-08 00:42:39 +00:00
Colin Cross
6771b9cef6 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
2013-08-07 15:41:30 -07:00
Christopher Ferris
7c860db074 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
2013-08-06 15:38:29 -07:00
The Android Automerger
2b899b04e9 merge in klp-release history after reset to master 2013-08-06 08:16:59 -07:00
Christopher Ferris
1ce6654163 Fix strcpy.c that should have been strcpy.S.
Change-Id: Ib4609baad3a14c8b0f37556269781fa2b06916dc
2013-08-05 17:08:06 -07:00