Commit graph

26754 commits

Author SHA1 Message Date
Inseob Kim
736e4c08ed Merge "Resolve paths of dir.${section} if possible"
am: 23f86f4f34

Change-Id: Iad10bf2b4fdfc9f25d7d6f4d2d3e46f2d0c29175
2018-06-20 22:17:51 -07:00
Treehugger Robot
23f86f4f34 Merge "Resolve paths of dir.${section} if possible" 2018-06-21 05:05:17 +00:00
Adhemerval Zanella
abfe5351c3 Merge "Add sinf/cosf/sincosf benchmark"
am: 90a20cd28d

Change-Id: Ie8b27caf33b460c52eba7d118f61c22eb264bbde
2018-06-20 21:12:20 -07:00
Treehugger Robot
90a20cd28d Merge "Add sinf/cosf/sincosf benchmark" 2018-06-21 02:05:27 +00:00
Adhemerval Zanella
2faaa08c4b Merge "Add logf and log2f benchmark"
am: 3e637de184

Change-Id: I16004fbe4c787ea532bb5d0c20351603e9736ae6
2018-06-20 16:41:09 -07:00
Treehugger Robot
3e637de184 Merge "Add logf and log2f benchmark" 2018-06-20 23:34:19 +00:00
Adhemerval Zanella
10e6f12022 Merge "Add powf benchmark"
am: 52a7e7e1bc

Change-Id: I69d119a655b59394479f1fde8ca01361953fc783
2018-06-20 14:55:38 -07:00
Treehugger Robot
52a7e7e1bc Merge "Add powf benchmark" 2018-06-20 21:47:45 +00:00
Adhemerval Zanella
dd195c01dc Merge "Add expf and exp2f benchmark"
am: 5fbda0ddb4

Change-Id: I2b20215a4350759d86e19d0cb6c5a62bde84f678
2018-06-20 12:51:36 -07:00
Treehugger Robot
5fbda0ddb4 Merge "Add expf and exp2f benchmark" 2018-06-20 19:43:06 +00:00
Ryan Prichard
bcea0e2afd Call __emutls_unregister_key on dlclose
We want to delay the emutls pthread key deletion to keep
__thread/thread_local variables working as long as possible.

Currently, emutls has its own __attribute__((destructor)) function that
deletes its pthread key. That function runs even on process exit, and it
can run before other destructor functions and before C++ static object
destructors.

Move the destructor function to crtbegin_so.c, where an
__attribute__((destructor)) function is only called on dlclose. Use a
priority 0 destructor, which runs after every destructor with a default or
greater priority value.

__emutls_unregister_key will still run before destructor functions of
DT_NEEDED solibs. It also still leaks memory (both the emutls arrays and
each emutls object).

Bug: b/80453944
Test: manual
Change-Id: I6789bcf168415ab8badf2f64687c6a0136c5c917
2018-06-19 13:22:36 -07:00
Dan Willemsen
a24f523263 Merge "Mark bionic-loader-test-libs-target as a phony rule"
am: a03fbbd37b

Change-Id: I80b0bf4a0a2137078a20584adf2e3cde5122a36c
2018-06-19 08:20:21 -07:00
Treehugger Robot
a03fbbd37b Merge "Mark bionic-loader-test-libs-target as a phony rule" 2018-06-19 15:10:30 +00:00
Adhemerval Zanella
7871ca1075 Add sinf/cosf/sincosf benchmark
Similar to expf/exp2f, this patch add two benchmarks for sinf, cosf, and
sincosf: one which measures thoughput as default and one which measures
latency.

The input in 512 random value divided in 8 ranges:

  1. 0.0 <= x < 0.1
  2. 0.1 <= x < 0.7
  3. 0.7 <= x < 3.1
  4. -3.1 <= x < 3.1
  5. 3.3 <= x < 33.3
  6. 100.0 <= x < 1000.0
  7. 1e6 <= x < 1e32
  8. 1e32 < x < FLT_MAX

Test: ran 32-bit and 64-bit x86 tests on host
Change-Id: I92bc2f1fac911c573c5122911d08ca590311578a
2018-06-19 11:34:54 -03:00
Adhemerval Zanella
ff5a353112 Add logf and log2f benchmark
Similar to expf/exp2f, this patch add two benchmarks for logf and log2f:
one which measures thoughput and one which measures latency.

The input data is based on a reduced trace based on 2.8 billion samples
extracted from specpu2017 521.wrf_r benchmark.

Test: ran 32-bit and 64-bit x86 tests on host
Change-Id: If4fbd7eb3d40f8e155935149a82f162b222d5506
2018-06-19 11:34:54 -03:00
Adhemerval Zanella
872c8b5133 Add powf benchmark
As for expf/exp2f benchmark, this patch add two benchmark for powf:
one which measures thoughput and one which measures latency.

The input data is based on a reduced trace from 2.3 billion samples
extracted from specpu2017 521.wrf_r benchmark.

Test: ran 32-bit and 64-bit x86 tests on host
Change-Id: Id8943d90dd5452146e55fb75708daaf7bf0e25fa
2018-06-19 11:34:54 -03:00
Adhemerval Zanella
357f6c1b47 Add expf and exp2f benchmark
This patch add two benchmarks for both expf and exp2f, one which
measures thoughput, as default, and one which measures latency. The
latency benchmark works by creating a dependency on the previous
iteration and with a zero multiply to avoid changing the input value.

The input is based on a reduced trace based on 2.4 billion samples
extracted from specpu2017 521.wrf_r benchmark.

Test: ran 32-bit and 64-bit x86 tests on host
Change-Id: Ic0d40cc4977dd6875fb7431146fc38ea0e6e0bc2
2018-06-19 11:34:54 -03:00
Dan Willemsen
901055eec7 Mark bionic-loader-test-libs-target as a phony rule
This essentially was phony before, but it wasn't marked as such. Mark it
so that we can turn on some more sanity checks in the build.

Test: Fewer warnings when --warn_real_to_phony is enabled for kati
Change-Id: I5f02b291ca01141dea75977df8b5ef9630917eb2
2018-06-18 20:23:14 -07:00
Inseob Kim
216323bd84 Resolve paths of dir.${section} if possible
Some devices place some of their partitions under /system. If the linker
resolves that paths, verboseness of ld.config.txt will be reduced as we
don't need to add both /system/{partition} and /{partition}.

Bug: http://b/80422611
Test: m -j, boot on taimen, atest
Change-Id: I6b712170bb89229b764026e2cc517c426e6e6063
2018-06-18 19:16:34 +09:00
Bernie Innocenti
0912d76b96 bionic: Remove libc/Android.mk file
Since there are no longer any Android.mk files in subdirs, the
top-level one can go.

Test: m
Change-Id: Ifc51545fc82a5eaa0801babd3ede20d911f1b9c3
2018-06-18 05:22:15 +00:00
Christopher Ferris
eb42a064cf Merge "Change heap dump format slightly."
am: 520ad0cae8

Change-Id: I312a7181aa85ae62928e239a4a9018cdcaad956d
2018-06-15 22:37:43 -07:00
Christopher Ferris
520ad0cae8 Merge "Change heap dump format slightly." 2018-06-15 21:36:42 +00:00
Christopher Ferris
2e1a40a203 Change heap dump format slightly.
Bump the version from v1.1 to v1.2 and add a build fingerprint line.

Update the heap dump documentation to match the new format and reflect
what made it in P and what made it in Q.

Update the unit tests for this change.

Add -O0 to unit test code to make it easier to debug.

Add an external function that can be used by the framework code
so that there is only one way to dump the heap.

Bug: 110095681

Test: Ran unit tests.
Test: Did a dump of a real process and verified fingerprint.
Test: Did a dump of a process without malloc debug enabled.
Change-Id: I769a476cbeaf4c85c5d75bd6d6385f0e3add948c
Merged-In: I769a476cbeaf4c85c5d75bd6d6385f0e3add948c
(cherry picked from commit c84a2a2601)
2018-06-15 12:29:13 -07:00
Jiyong Park
bbf6d709d4 Merge changes from topic "sharedlib_in_recovery"
am: 2583b0adb2

Change-Id: I4057da23e469be6c0547ae9416ff3d194672cbd6
2018-06-13 16:40:06 -07:00
Jiyong Park
b9a021b628 Build recovery variant of the dynamic linker
am: 8d7866c58f

Change-Id: Ibb0b358d97fc5e1767fc971a6679e0b761cb5216
2018-06-13 16:39:33 -07:00
Treehugger Robot
2583b0adb2 Merge changes from topic "sharedlib_in_recovery"
* changes:
  dynamic linker is running for init
  Build recovery variant of the dynamic linker
2018-06-13 23:14:29 +00:00
Elliott Hughes
2d49cdc7ec Merge "Remove valgrind workarounds."
am: 79d8ecb9fb

Change-Id: Ib9bcddb661a1d555d8a4336072deeadd8078d651
2018-06-12 17:50:39 -07:00
Treehugger Robot
79d8ecb9fb Merge "Remove valgrind workarounds." 2018-06-13 00:30:28 +00:00
Elliott Hughes
95bca3f7d4 Remove valgrind workarounds.
Bug: http://b/77856586
Test: ran 32-bit x86 tests on host
Change-Id: I98f6262bb1363ed5c8dd533b1f89b59b2b188525
2018-06-12 15:29:36 -07:00
Haibo Huang
14fb3aeea6 Merge "Make memcpy memmove"
am: 2bf96b73bb

Change-Id: I9a76b7ba094702d1dcf756dc9d3362ff2e95ff21
2018-06-12 11:22:50 -07:00
Haibo Huang
2bf96b73bb Merge "Make memcpy memmove" 2018-06-12 18:09:36 +00:00
Haibo Huang
8a0f0ed5e7 Make memcpy memmove
Bug: http://b/63992911
Test: Change BoardConfig.mk and compile for each variant
Change-Id: Ia0cc68d8e90e3316ddb2e9ff1555a009b6a0c5be
2018-06-11 18:12:45 +00:00
Jiyong Park
31cd08f9eb dynamic linker is running for init
init is now built as a dynamic executable, so the dynamic linker has to
be able to run in the init process. However, since init is launched so
early, even /dev/* and /proc/* file systems are not mounted and thus
some APIs that rely on the paths do not work. The dynamic linker now
goes alternative path when it is running in the init process.

For example, /proc/self/exe is not read for the init since we always now
the path of the init (/init). Also, arc4random* APIs are not used since
the APIs rely on /dev/urandom. Linker now does not randomize library
loading order and addresses when running in the init process.

Bug: 80454183
Test: `adb reboot recovery; adb devices` shows the device ID
Change-Id: I29b6d70e4df5f7f690876126d5fe81258c1d3115
2018-06-08 14:50:14 +09:00
Jiyong Park
8d7866c58f Build recovery variant of the dynamic linker
In order to support shared libraries in the recovery mode, the dynamic
linker is now built with recovery_available: true option.

In addition, a few more modules (such as libasync, etc.) are also marked
as recovery_available: true as they are transitive dependencies of the
dynamic linker.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: `adb root && adb shell` and then
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: Idd981d8cf25568a85b24032cf78e50adfd5f4a7f
2018-06-08 14:49:56 +09:00
Elliott Hughes
edbe81a358 Merge "Add missing __INTRODUCED_IN to pthread_attr_setinheritsched/pthread_attr_getinheritsched." am: 42596b7bf0
am: ffc357a07b

Change-Id: I39721a94a4cc7b65adebf6c31d1eb1a0fefd3ec4
2018-06-07 13:15:48 -07:00
Elliott Hughes
ffc357a07b Merge "Add missing __INTRODUCED_IN to pthread_attr_setinheritsched/pthread_attr_getinheritsched."
am: 42596b7bf0

Change-Id: I9517182600bfe108ed08a6f32f570720f7e69b5a
2018-06-07 12:14:18 -07:00
Treehugger Robot
42596b7bf0 Merge "Add missing __INTRODUCED_IN to pthread_attr_setinheritsched/pthread_attr_getinheritsched." 2018-06-07 18:15:41 +00:00
Elliott Hughes
7c5bbf627c Add missing __INTRODUCED_IN to pthread_attr_setinheritsched/pthread_attr_getinheritsched.
Bug: https://github.com/android-ndk/ndk/issues/716
Test: N/A
Change-Id: Ie49f96976f93b0f0d59796169e98918a9f69c0df
2018-06-07 09:11:47 -07:00
Dimitry Ivanov
b7cd2e31b6 Merge "Relax check on number of segments in a .so file" am: 3bc5e74c54
am: 82d6d48254

Change-Id: If6643bd0708eaa3b410f9c81e25d484db2e7b7fa
2018-06-06 09:20:44 -07:00
Dimitry Ivanov
82d6d48254 Merge "Relax check on number of segments in a .so file"
am: 3bc5e74c54

Change-Id: I870f7948f20077d37a4566d9fa06f09d912deac0
2018-06-06 09:16:08 -07:00
Dimitry Ivanov
3bc5e74c54 Merge "Relax check on number of segments in a .so file" 2018-06-06 16:07:53 +00:00
dimitry
3b0a5b7347 Relax check on number of segments in a .so file
This check was not necessary since it is perfectly fine for a dso to
have any number of PT_LOAD segments, given that the number is > 0.

Bug: http://b/109747297
Test: make
Change-Id: I0e3b400fddf05ed7b9342bacbfffd3b578f26cf3
2018-06-06 11:22:20 +02:00
Christopher Ferris
69d5b82a0e Merge "Add an example of how to use multiple options." am: 910c11767f
am: 31b3e157be

Change-Id: I1004ef2744d6e115fec769979a85081bb00cd1ed
2018-06-05 12:48:28 -07:00
Christopher Ferris
31b3e157be Merge "Add an example of how to use multiple options."
am: 910c11767f

Change-Id: Ia7655c6d9639fbd1c06fc3ae631e0a8a04a383bd
2018-06-05 12:41:17 -07:00
Christopher Ferris
910c11767f Merge "Add an example of how to use multiple options." 2018-06-05 19:22:47 +00:00
Christopher Ferris
1d52a7b1be Add an example of how to use multiple options.
Test: NA
Change-Id: I67b6c2f8eb8ad8ead98969e69990f540ecd9a770
2018-06-01 13:42:25 -07:00
Ryan Prichard
50befb142d Merge "Avoid post-reloc GOT usage in __linker_init" am: 5b867699fd
am: 222c07b351

Change-Id: Ib84572951a0c350e764c7344981607f3ed9b5004
2018-06-01 04:03:12 -07:00
Ryan Prichard
222c07b351 Merge "Avoid post-reloc GOT usage in __linker_init"
am: 5b867699fd

Change-Id: Iccef93d33fb86dec3e0ad5e3cafedc86b539a02d
2018-06-01 01:07:06 -07:00
Treehugger Robot
5b867699fd Merge "Avoid post-reloc GOT usage in __linker_init" 2018-06-01 03:50:36 +00:00
Ryan Prichard
4bd96b5f9b Merge "Initialize __libc_sysinfo early on." am: fe55c272ad
am: 2eea1f67f0

Change-Id: Ifa4e1889c773bf98747462b0076c2db27c3f13af
2018-05-31 19:51:22 -07:00