Commit Graph

538 Commits

Author SHA1 Message Date
Roozbeh Pournader
a5511eb648 Merge "Replace JNI portion of AndroidBidi with calls to ICU4J" 2017-10-19 22:55:57 +00:00
Roozbeh Pournader
a15fd848cb Replace JNI portion of AndroidBidi with calls to ICU4J
We no longer need the native calls to ICU since we have ICU4J.

Fixes: 67786879
Test: bit FrameworksCoreTests:android.text.
Change-Id: Ib2ec93017000b4f0343756814ca388bd31457849
2017-10-19 11:20:46 -07:00
Yao Chen
d54f9dd625 Revert "Revert "Start auto-generating the stats log API.""
Test: builds successfully

This reverts commit 9319453998.

Change-Id: I22bca4a32adf86040b9d72ad5b45999aba28f586
2017-10-17 10:42:44 -07:00
Joe Onorato
bcc8478d2b Merge "Revert "Start auto-generating the stats log API."" 2017-10-16 22:46:21 +00:00
Joe Onorato
9319453998 Revert "Start auto-generating the stats log API."
This reverts commit b81d1a7b9a.

Change-Id: I189684d8913ffffca42d9514ac88ea5cc4a44f05
2017-10-16 22:41:28 +00:00
Joe Onorato
22910ada9a Merge changes Idf402222,I8eb7e341
* changes:
  Start auto-generating the stats log API.
  Make bit able to build native tests.
2017-10-16 21:19:16 +00:00
Mathieu Chartier
00d31c2760 Merge "Add dalvik.vm.foreground-heap-growth-multiplier property" into oc-mr1-dev am: 2baa393238
am: 64a636c8bd

Change-Id: Ic784a133d04aed855a0150eb7597375cc053c0e0
2017-10-16 18:14:48 +00:00
Mathieu Chartier
64a636c8bd Merge "Add dalvik.vm.foreground-heap-growth-multiplier property" into oc-mr1-dev
am: 2baa393238

Change-Id: I5c35bae390870d6582d863e16013afb897117d0b
2017-10-16 18:02:36 +00:00
Mathieu Chartier
ebc3b4c033 Add dalvik.vm.foreground-heap-growth-multiplier property
Corresponds to the -XX:ForegroundHeapGrowthMultiplier ART option.

Bug: 67416130
Test: make, flash, setprop
Change-Id: Ia9c70c62d8faa3b9aeb7b50dba237095abd53e80
2017-10-15 21:31:26 -07:00
Joe Onorato
b81d1a7b9a Start auto-generating the stats log API.
Both native and java bindings.

TODOs:
- Finish WorkSources.
- Clean up the package names for the protos.
- Put the protos in a more suitable location.

Test: stats-log-api-gen-test
Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
2017-10-15 20:25:19 -07:00
Mathieu Chartier
790016aef5 Merge "Add property reading logic for dalvik.vm.madvise-random" into oc-mr1-dev am: a354ec973d
am: ecc8bdc227

Change-Id: I401df22e24210ac7aa47f5a8341f657403ebdece
2017-10-15 03:17:12 +00:00
Mathieu Chartier
ecc8bdc227 Merge "Add property reading logic for dalvik.vm.madvise-random" into oc-mr1-dev
am: a354ec973d

Change-Id: Ic75411af539a08e215b5c9e076688fd39b46569d
2017-10-15 02:31:19 +00:00
Mathieu Chartier
cd0caf5e8e Add property reading logic for dalvik.vm.madvise-random
The property is passed to runtime init as
-XX:MadviseRandomAccess.

Bug: 67772594
Test: make and getprop
Change-Id: I7cbab5d028067810276bc58c312806ea3785f93f
2017-10-13 12:00:53 -07:00
Tom Cherry
3c71e833b8 Merge "Move to some properties users to libbase properties" am: 2b20612e77 am: 9e4bfdb0b6 am: 506f89a250
am: 0ca5b37250

Change-Id: I82ba46567c1982e8bc4f90eb7a4c38a73dc15600
2017-10-12 21:45:09 +00:00
Tom Cherry
0ca5b37250 Merge "Move to some properties users to libbase properties" am: 2b20612e77 am: 9e4bfdb0b6
am: 506f89a250

Change-Id: I1ba14d9729dba38dd6f67768ea2c83972a853847
2017-10-12 21:26:43 +00:00
Tom Cherry
9e4bfdb0b6 Merge "Move to some properties users to libbase properties"
am: 2b20612e77

Change-Id: I376b9179ed242810c529d289558a44b422c1e8f5
2017-10-12 21:01:53 +00:00
Tom Cherry
93099e4485 Move to some properties users to libbase properties
The libcutils interface cannot read properties with value length > 92
characters, whereas the libbase one can.  ro.build.fingerprint may be
larger than this size in the future, so we move to libbase to prepare.

Bug: 23102347
Bug: 34954705
Test: build
Change-Id: Ic91aa63c7db1a7a01b9a1ee321b7854a9bcf6d12
2017-10-12 09:30:59 -07:00
Seigo Nonaka
44a1df2cf3 Keep locale info in Hyphenator.
Even if the same data file is used, different hyphenation is applied
based on the locale. Now Hyphenator keeps locale and use it for
hyphenation.

Bug: 65024629
Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest
Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I7e2ece979181d12ac1adbede14995ec9b7b87d21
2017-09-27 18:54:03 -07:00
Chenjie Yu
671b1b5b83 add StatsLog and its jni
Test: ran existing tests. Also confirmed with logcat.
Change-Id: I038bbdbd787b1d20e008eda7edf7053875795de2
2017-08-31 14:21:28 -07:00
Jeff Hao
52cde7d109 Add dirty_image_objects file.
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.

Bug: 62554875
Test: mm test-art-host

(cherry picked from commit 37641ae54a)

Change-Id: Ibc30b13edb9554f79df86e98253ae318a5ece342
2017-08-10 15:52:31 -07:00
Jeff Hao
c0895236e5 Merge "Add dirty_image_objects file." am: 935e0c996a am: 7dce8cbdeb am: 2c7efb994b
am: 4fe58637b3

Change-Id: I1e40da6a1f9f4649a96cdab4869856e50cfca350
2017-08-05 01:30:02 +00:00
Jeff Hao
4fe58637b3 Merge "Add dirty_image_objects file." am: 935e0c996a am: 7dce8cbdeb
am: 2c7efb994b

Change-Id: I43f19b876f3f91dfb0966edcdcf56adb7361a756
2017-08-05 01:20:23 +00:00
Jeff Hao
7dce8cbdeb Merge "Add dirty_image_objects file."
am: 935e0c996a

Change-Id: I022e4349152e8fd8a33b6afe7b659af019ad950e
2017-08-05 01:02:04 +00:00
Jeff Hao
6aa5d715b4 Add dirty_image_objects file.
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.

(cherry-picked from commit 37641ae54a)

Bug: 62554875
Test: mm test-art-host

Merged-In: I6a36120235ee4f47bc1cb1ddc4413cfc561cb9a7
Change-Id: I6a36120235ee4f47bc1cb1ddc4413cfc561cb9a7
2017-08-03 11:02:02 -07:00
Jeff Hao
37641ae54a Add dirty_image_objects file.
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.

Bug: 62554875
Test: mm test-art-host
Change-Id: I6a36120235ee4f47bc1cb1ddc4413cfc561cb9a7
2017-08-02 16:32:18 -07:00
Steven Moreland
2412b4d979 Merge "frameworks/base: use proper nativehelper headers" am: 826eafd958 am: 5c091dc944 am: c840945a78
am: 9f430b2782

Change-Id: Ibe321dd4a8aae9342c76da0780edf94b90e8cd3a
2017-07-20 03:11:00 +00:00
Steven Moreland
9f430b2782 Merge "frameworks/base: use proper nativehelper headers" am: 826eafd958 am: 5c091dc944
am: c840945a78

Change-Id: I654e14f0d1b495450db81592a2e564e308746350
2017-07-20 03:05:02 +00:00
Steven Moreland
5c091dc944 Merge "frameworks/base: use proper nativehelper headers"
am: 826eafd958

Change-Id: I36f10ff4d963284a313f1cc5b368f82549a4adb2
2017-07-20 02:50:53 +00:00
Treehugger Robot
826eafd958 Merge "frameworks/base: use proper nativehelper headers" 2017-07-20 02:42:49 +00:00
George Burgess IV
24d31ba7da Merge "Fix static analyzer complaints" am: a3bde81205 am: 3e0a8b1d2b am: c6c395b6b1
am: dd415c0734

Change-Id: Iab6e42f39e7f058b823551932f55b05429c0da48
2017-07-19 17:57:22 +00:00
George Burgess IV
dd415c0734 Merge "Fix static analyzer complaints" am: a3bde81205 am: 3e0a8b1d2b
am: c6c395b6b1

Change-Id: I6b2e0d2f2aa60b347699e7149a0c2af3ea0f6c93
2017-07-19 17:49:54 +00:00
George Burgess IV
3e0a8b1d2b Merge "Fix static analyzer complaints"
am: a3bde81205

Change-Id: I39f7b56c6abc0398cd517eef174b0620dbc50caa
2017-07-19 17:36:23 +00:00
Steven Moreland
2279b25342 frameworks/base: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
2017-07-19 10:06:40 -07:00
George Burgess IV
d657a38d87 Fix static analyzer complaints
frameworks/base/core/jni/android_view_MotionEvent.cpp:383:12: warning:
Potential leak of memory pointed to by 'event'

frameworks/base/core/jni/AndroidRuntime.cpp:975:20: warning: Null passed
to a callee that requires a non-null 1st parameter

For the former, it was surprising to me that the analyzer couldn't
figure out that `event == nativePtr` for the latter check. Filed
https://bugs.llvm.org/show_bug.cgi?id=33540 upstream about it.

For the latter, it was complaining because `className` could be NULL
(more precisely, we have a NULL check at the top of the function it's
declared in, so NULL is presumably a valid value).

Bug: None
Test: Ran mma; complaints are gone.
Change-Id: I26a91ae25934f95acbfdbe4f3641e081fbc66c6d
2017-07-18 08:56:10 -07:00
Jesse Hall
ceddb7508d Merge "Preload app-process HALs in Zygote" into oc-dr1-dev
am: 61d1af5746

Change-Id: I2b51bd19d1fde7fc8e0e1cc9de71a3cd5d1a7ef9
2017-07-14 19:40:45 +00:00
Jesse Hall
42cf26ecc9 Preload app-process HALs in Zygote
Some HALs, like a.h.graphics.mapper, are always passthrough and are
used by nearly all app processes. Preload those in Zygote to save app
startup time and share more pages between processes. This has the side
effect of also preloading a bunch of HIDL-related system and vndk
libraries that would also otherwise be loaded independently by every
app.

An earlier attempt at this change tried to preload the HAL via a
static initializer in libui.so (which is already preloaded, and which
is the immediate client of the HAL). But several other non-Zygote
processes also use libui.so, and didn't have SELinux permission to
access the device nodes used by the HAL. This version uses an explicit
call from Zygote to preload the HAL, instead of doing it implicitly.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I42405c3b6cdf1ae412039140d656d15a6d4f8882
(cherry picked from commit 1fe1dc0131)
2017-07-12 20:44:52 +00:00
TreeHugger Robot
7861989f66 Merge "Preload app-process HALs in Zygote" 2017-07-12 00:16:09 +00:00
Jesse Hall
1fe1dc0131 Preload app-process HALs in Zygote
Some HALs, like a.h.graphics.mapper, are always passthrough and are
used by nearly all app processes. Preload those in Zygote to save app
startup time and share more pages between processes. This has the side
effect of also preloading a bunch of HIDL-related system and vndk
libraries that would also otherwise be loaded independently by every
app.

An earlier attempt at this change tried to preload the HAL via a
static initializer in libui.so (which is already preloaded, and which
is the immediate client of the HAL). But several other non-Zygote
processes also use libui.so, and didn't have SELinux permission to
access the device nodes used by the HAL. This version uses an explicit
call from Zygote to preload the HAL, instead of doing it implicitly.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I42405c3b6cdf1ae412039140d656d15a6d4f8882
2017-07-07 14:52:53 -07:00
Narayan Kamath
f9419f0f85 Allow splits to declare a classloader type.
Add an attribute android:classLoader which can be set to the name
of the classloader the base or split wishes to use. For now, this can
only be set to "dalvik.system.PathClassLoader" or
"dalvik.system.DelegateLastClassLoader". The current implementation
only allows the classloader to exist in the boot classpath but that
restriction can be loosened in a future change if necessary.

Test: cts-tradefed run cts-dev -m CtsAppSecurityHostTestCases
Bug: 36044779

Change-Id: I5a51f7aa0c8c4c398d2f46129eb06785cc8e3c3f
2017-07-06 11:57:36 +01:00
Mathieu Chartier
bce9e0e939 Merge "Add boot profile support" am: 3d901ec513 am: 7e73b5165d
am: 3fcea88d83

Change-Id: I489ce24e496e26aa1e96ac7d5a054305650f05d1
2017-07-01 03:47:10 +00:00
Mathieu Chartier
7e73b5165d Merge "Add boot profile support"
am: 3d901ec513

Change-Id: I37db2f4bd7e6412954d51e914f6e238db5027a6e
2017-07-01 03:32:41 +00:00
Mathieu Chartier
5f50c87946 Add boot profile support
If the boot profile file exists, its passed to the runtime as an
image compiler option. Also pass speed-profile for this case.

Bug: 37966211
Test: make, flash, and look at logcat during boot

(cherry picked from commit f99e70e934)

Change-Id: Ia09ff0200186382e45151b7cabb53016f8e0aa3f
2017-06-30 17:27:40 -07:00
Mathieu Chartier
f99e70e934 Add boot profile support
If the boot profile file exists, its passed to the runtime as an
image compiler option. Also pass speed-profile for this case.

Bug: 37966211
Test: make, flash, and look at logcat during boot

Change-Id: I72e16eb19df390eea6304c0419ae332d79f41409
2017-06-30 14:20:38 -07:00
John Reck
4dbcd23b5a Merge "Add SharedMemory API" 2017-06-29 17:35:17 +00:00
John Reck
dea6a02761 Add SharedMemory API
SharedMemory is parcelable and AIDL friendly
and exposes cool things like dropping write permissions
that are useful for shared memory to have.

Also exposes getFileDescriptor() on MemoryFile
since that was necessary to use MemoryFile
with IPC previously and there are a sizeable
number of reflections that access it, so just make
it public.

Test: SharedMemory CTS tests pass

Change-Id: I71a322abf2eb55267d7299a8e41f847339af8b08
2017-06-28 16:49:12 -07:00
Tomasz Wasilczyk
4bd958353e Remove previous implementation of RadioService.
Bug: b/36863239
Test: instrumentalization
Change-Id: Ia56f4aaf7575d83336eaa39df34341bd2f12cbc3
2017-06-23 10:47:28 -07:00
Mathieu Chartier
e4f07b2cb6 Merge "Add system property for hot startup method threshold" am: a370159592 am: 187b15bbd5
am: abb7782a4e

Change-Id: I0122af5a47614972dd5ba696f8a22bcae2625a1c
2017-06-08 22:06:08 +00:00
Mathieu Chartier
abb7782a4e Merge "Add system property for hot startup method threshold" am: a370159592
am: 187b15bbd5

Change-Id: Id56adbe39e8a81ef12c4b9d8fdcf65c94a316d6f
2017-06-08 22:00:09 +00:00
Mathieu Chartier
42cd265639 Add system property for hot startup method threshold
The property is dalvik.vm.hot-startup-method-samples, setting this
controls how many startup samples are required before methods are
marked as hot in the profile.

Test: adb shell setprop dalvik.vm.hot-startup-method-samples 12
Test: adb shell setprop dalvik.vm.extra-opts -verbose:profiler
Test: adb logcat | grep Profile

Bug: 36457259

(cherry picked from commit 5eee004b92)

Change-Id: Ibf8075aafc6e5bd2ba10385973b26faee3d807df
2017-06-07 18:33:48 -07:00
Mathieu Chartier
5eee004b92 Add system property for hot startup method threshold
The property is dalvik.vm.hot-startup-method-samples, setting this
controls how many startup samples are required before methods are
marked as hot in the profile.

Test: adb shell setprop dalvik.vm.hot-startup-method-samples 12
Test: adb shell setprop dalvik.vm.extra-opts -verbose:profiler
Test: adb logcat | grep Profile

Bug: 36457259

Change-Id: If8e37a160802a00fb44f0c243fb358df02104741
2017-06-07 17:49:37 -07:00