Commit Graph

514 Commits

Author SHA1 Message Date
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
Narayan Kamath
1a58d2b9db Merge "AndroidRuntime: Add flag to support tombstoned aided stack dumps." am: 41f23d645c am: 9765d78f69 am: 6f3dd693b1
am: 70dd7db6a1

Change-Id: I5840297264c8e7d3b460497dcca05cf2591c5df9
2017-05-31 12:18:13 +00:00
Narayan Kamath
70dd7db6a1 Merge "AndroidRuntime: Add flag to support tombstoned aided stack dumps." am: 41f23d645c am: 9765d78f69
am: 6f3dd693b1

Change-Id: If51d4b56f37d0b2626e5a421848e2fc954d29c44
2017-05-31 12:10:13 +00:00
Narayan Kamath
23941e5c22 AndroidRuntime: Add flag to support tombstoned aided stack dumps.
We introduce a new property dalvik.vm.stack-trace-dir that indicates
that we're using one trace file per dump. The runtime does not need
to know what the directory is, since it will communicate with
tombstoned in order to obtain a file descriptor to which it will write
its traces. In this change, we set the -Xtombstonedtraces flag whenever
dalvik.vm.stack-trace-dir is set.

Test: Manual
Bug: 32064548
Change-Id: I05984e91658250ad8379b821ca31649f13868580
2017-05-31 10:09:49 +01:00
Joe Onorato
975e1e7c16 Merge "Turn off logspam" into oc-dev am: 6fb15ea9d4
am: 541f9cf576

Change-Id: Ib2846b83d6775c124f1b2dc1ca1b4a496bc14446
2017-05-31 01:33:25 +00:00
Joe Onorato
541f9cf576 Merge "Turn off logspam" into oc-dev
am: 6fb15ea9d4

Change-Id: I975c93d9f110a8a1488e366180da727ad9ec6408
2017-05-31 01:25:55 +00:00
Joe Onorato
82ba91ddb4 Turn off logspam
For more information, see https://source.android.com/source/code-style#log-sparingly

Bug: 37252687
Test: development/tools/logblame/app_switch_test
Test: development/tools/logblame/power_toggle_test
Test: development/tools/logblame/medium_idle_test
Change-Id: Ie2f6ef33df7b6c1ea976a8180945651ac9482976
2017-05-30 16:01:02 -07:00
Derek Sollenberger
4b27424975 Remove no-op SkGraphics::term() function.
Test: refactor / removal of no-op code
Change-Id: Iddbe928995b39dc09a28472fbafe0c2ed0c6c947
2017-05-23 14:23:31 -04:00
Nicolas Geoffray
d132652610 Update frameworks/base to new compiler filters.
Also fix a merge issue with duplicated code.

bug:34715556
Test: build and boot aosp bullhead

(cherry picked from commit be7b0d18a7)

Change-Id: I2c716427ac10090a694ce933421e4924748b0c71
2017-05-02 12:40:32 +01:00
Yifan Hong
9f95b592f8 Add android.os.VintfRuntimeInfo
This is the Java API for ::android::vintf::RuntimeInfo.
This will be used by CTS for device info report purposes.

Bug: 28656227
Test: cts-tradefed run cts -m CtsEdiHostTestCases --skip-preconditions
Change-Id: Id87c95a17e77d7ec1794a6f850de97edf9ae892d
2017-05-01 13:00:04 -07:00
Yifan Hong
6196ab62fb Merge "Add android.os.VintfRuntimeInfo" am: 4f8a375958 am: e0bf06dd9e
am: 5fe979b404

Change-Id: Iae202b22ecc136343d82711435d49ce3597fa74f
2017-04-29 03:19:09 +00:00
Treehugger Robot
4f8a375958 Merge "Add android.os.VintfRuntimeInfo" 2017-04-29 03:00:08 +00:00
Yifan Hong
1bda67369c Add android.os.VintfRuntimeInfo
This is the Java API for ::android::vintf::RuntimeInfo.
This will be used by CTS for device info report purposes.

Bug: 28656227
Test: cts-tradefed run cts -m CtsEdiHostTestCases --skip-preconditions
Change-Id: Id87c95a17e77d7ec1794a6f850de97edf9ae892d
2017-04-28 17:10:28 -07:00
Narayan Kamath
35f425a4bf Merge "AndroidRuntime: pipe down dalvik.vm.stack-trace-dir" am: 0b711e2c86 am: aab168b7cc
am: 0ddced5c44

Change-Id: I223e6167bcb5228a5175ebf7308b40a8f974e3d8
2017-04-27 15:45:22 +00:00
Narayan Kamath
0b711e2c86 Merge "AndroidRuntime: pipe down dalvik.vm.stack-trace-dir" 2017-04-27 15:26:51 +00:00
Nicolas Geoffray
be014da638 resolve merge conflicts of 01f050f21f to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: If3796f456fa80c2f9c649855d39f4dab01e54f3c
2017-04-27 13:56:20 +01:00
Nicolas Geoffray
be7b0d18a7 Update frameworks/base to new compiler filters.
Also fix a merge issue with duplicated code.

bug:34715556
Test: build and boot aosp bullhead
Change-Id: I3b913878c83f708e752ec06f79bada1873213823
2017-04-26 15:34:29 +01:00
Narayan Kamath
93f2e38160 AndroidRuntime: pipe down dalvik.vm.stack-trace-dir
Fall back to dalvik.vm.stack-trace-file if it doesn't exist.

Test: make
Test: manual testing with the property set / empty
Bug: 32064548

Change-Id: I23b4c7b26eda5d0fcaf6b976bf1e973a872555c7
2017-04-26 13:02:59 +01:00
Yifan Hong
4e01db8c12 Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:30 -07:00
Yifan Hong
becc56d7ea Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:05 -07:00
Andreas Gampe
c28592da33 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" am: 851afe56b8 am: 0e01cae667
am: 74acde1bc5

Change-Id: I40d67fcde4d9263d5c75d5c3f782a860dcff93f8
2017-02-10 01:03:15 +00:00
Andreas Gampe
76d4fc8451 Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit
Move methods where they belong.

(cherry picked from commit 4e66db8d0c)

Test: m
Test: Device boots
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
2017-02-09 13:16:34 -08:00
Andreas Gampe
4e66db8d0c Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit
Move methods where they belong.

Test: m
Test: Device boots
Merged-In: I805c6493078e960ff5b70d84dd93d2da6c7aa797
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
2017-02-09 13:16:17 -08:00
Paul Lawrence
46e48b9aa4 resolve merge conflicts of fde0a41065 to master
Test: Make sure builds, boots
Change-Id: Idf86dc5d888c09e8a65ada51fc2f32aae6d5570d
2017-02-02 13:28:45 -08:00
Paul Lawrence
fde0a41065 Install seccomp into zygote not init am: ef85477470 am: 521d25294b
am: e6e8c7a1dd

Change-Id: I97d2843a2c2940b558f216cf550891a80963be54
2017-02-02 18:37:22 +00:00