Disabling profiles is no longer supported. Most of the profile support
has been active even when this property was false, and it won't be
supported in the ART Service.
Test: Boot with dalvik.vm.usejitprofiles=false
Bug: 254434433
Change-Id: I27e0639ba71ea794a5770263c4d357c52531a99a
Add OverlayManagerImpl to let applications create frro and idmap files
for overlaying itself's android resources.
* OverlayManagerImpl.java
* check the FabricatedOverlayInternal.
* com_android_internal_content_om_OverlayManagerImpl.cpp
* convert and read Java objects to native data.
* call the APIs in libidmap2 to create frro and idmap files.
Add OverlayManagerImpl.cpp into AndroidRuntime by modifying Android.bp
* Add register_com_android_internal_content_om_OverlayManagerImpl
register JNI methods
* add com_android_internal_content_om_OverlayManagerImpl.cpp
* It's a adapter to delegate the tasks to SelfTargeting.cpp
* dynamic link with libidmap2 by using dlopen and dlsym to call
functions in libidmap2.
Add SelfTargeting.cpp into libidmap2
* createFrroFile
* createIdmapFile
* getFabricatedOverlayInfo
for interoperability between libandroid_runtime and libidmap2.
* move OverlayManifestInfo from libidmap2 to libandroidfw
* add FabricatedOverlayEntryParameters into libandroidfw
Bug: 205919743
Test: build
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Change-Id: I5425f3229e9a3858e57427ef84e6abaf32e89b6e
- Implement OverlayProperties JNI class
- Call getOverlaySupport() on Diaplay Manager. Inside, provide
SurfaceControl#getOverlaySupport api to call AIDL function in the back
end.
Bug: 242588489
Test: build and flash
Change-Id: I23819d21063cd191a06d92295af2be9132bfe1df
There are two pieces of code that parse profilebootclasspath sysprops:
one in ZygoteInit.java
(https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/os/ZygoteInit.java;l=359;drc=6cbc807a6f11f43054d0d0ff0221bb3e6ab35d1c)
and one in AndroidRuntime.cpp
(https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/jni/AndroidRuntime.cpp;l=704-714;drc=ff1ed5d78df2edaaf1e51e2434548a66cd124366).
Before this change, there are two inconsistencies between them:
1. AndroidRuntime.cpp prefers the "dalvik.vm" property, while
ZygoteInit.java prefers the phenotype flag.
2. AndroidRuntime.cpp only accepts "true", while ZygoteInit.java accepts
"1", "y", "yes", "on", and "true".
The device goes into a weird state when the flags are set in a way that
makes the two pieces of code disagree with each other.
This CL changes the logic in AndroidRuntime.cpp to make it the same as
the one in ZygoteInit.java.
Bug: 258486155
Test: -
1. adb shell setprop dalvik.vm.profilebootclasspath false
2. adb shell setprop dalvik.vm.profilesystemserver false
3. adb shell device_config set_sync_disabled_for_tests persistent
4. adb shell device_config put runtime_native_boot profilebootclasspath true
5. adb shell device_config put runtime_native_boot profilesystemserver true
6. adb shell stop && adb shell start
7. adb shell killall -USR1 system_server
8. adb shell profman --dump-only --profile-file=/data/misc/profiles/cur/0/android/primary.prof
9. See the boot image profile being properly generated.
Test: -
1. adb shell setprop dalvik.vm.profilebootclasspath 1
2. adb shell setprop dalvik.vm.profilesystemserver 1
3. adb shell stop && adb shell start
4. adb shell killall -USR1 system_server
5. adb shell profman --dump-only --profile-file=/data/misc/profiles/cur/0/android/primary.prof
6. See the boot image profile being properly generated.
Change-Id: Ifef5a45b47427bc16e0799046bdffc5ab1747e9a
Finalizer has unclear ordering and can cause issues when cleaning up.
Use NativeAllocationRegistry as a safer option.
Test: CtsGraphicsTestCases
Fixes: 248273657
Change-Id: I8c8e1773c7d49c31b59ae4f7a88e44b2d6ee7f13
Bug: 246953799
Collect timing information for resource acquisition methods. The
timing has nanosecond resolution and is collected inside the native
runtime code. Timing values are accumulated in the runtime and are
periodically fetched and published by the java framework. This
strategy means that normal resource methods incur a small runtime
overhead. The longer time involved in publishing the values is
handled by an independent Java thread.
A public dumpTimers() method can be called from a dumpsys command, for
debug, but the dumpsys command is not hooked up in this commit.
No APIs are actually monitored in this commit, and the ResourceTimer
loop is not started.
Test: atest
* androidfw_lib
Change-Id: I5995d3c6518ca2fa4c8ab9d3eb610167758c695d
Since support for Full Disk Encryption was removed in favor of
File Based Encryption, "CryptKeeper mode" no longer exists and the
"vold.decrypt" system property is never set. Therefore, remove the
unused code from AndroidRuntime::startVm() that set special Java
compiler options in CryptKeeper mode.
Bug: 208476087
Change-Id: I099c199ec4132cd1859255c27c5d97367261cf43
It used to be in system server, but this is for a class in boot
classpath so we can move it to AndroidRuntime.cpp and avoid system
server dirtying memory for these methods.
Test: m
Bug: 162110941
Change-Id: Ifda5957aab757fe47c97b1aee0a6a8b7a059ac3d
Currently, socket tagging is implemented in the framework. The
Java code is in NetworkManagmentSocketTagger.java and the JNI is
in libandroid and loaded by the general framework JNI loader.
- Move the Java implementation to TrafficStats, which is the only
caller of NetworkManagmentSocketTagger. This simplifies the
code a bit because a number of methods can be deleted.
- Move the JNI code to a new JNI library in the APEX. The library
depends only on the NDK and statically links the NDK-only
version of libnativehelper. Its size is only 5k on ARM and 10k
on ARM64.
- Temporarily make the framework depend on this library until the
rest of the T connectivity code moves to the APEX.
Test: atest NetworkUsageStatsTest CtsNetTestCases:TrafficStatsTest
Change-Id: I050c7c515237f68b78d08987bc443f50a7949c06
Previously the SurfaceControlFpsListener is a hidden API which only
allows platform code access. This patch renames it to follow the
callback convention and raises it to be a system API in order to allow
system applications to access the FPS count of a task and its children.
The FPS count access is guarded by a permission ACCESS_FPS_COUNTER.
To follow the API convention and properly check the permission, the
register/unregister callback APIs are moved to WindowManager and
permission check is done in the System Server.
Minor: Rename to SurfaceControlFpsCallback to TaskFpsCallback in order
to follow the API naming convention.
Bug: b/199920468
CTS-Coverage-Bug: b/199920468
Test: atest TaskFpsCallbackTest
Change-Id: I6b0a0ad6500278b3da09059e9c2ede28d9a743aa
Bug: 203492478
Test: manual -
1. Build a system image and flash it to a device.
2. adb shell setprop dalvik.vm.extra-opts '-verbose:image'
3. adb shell setprop dalvik.vm.profilebootclasspath true
4. adb shell setprop ctl.restart zygote
5. See the boot image extension being compiled in memory
(http://gpaste/4688561208033280).
Change-Id: I69c11e3e41b9ab142b427ee054c2a6275ff089de
This is an eBPF usermap read via libmeminfo. System server
already has permissions to do so (as it already does so for the
total GPU mem stats).
Change-Id: I9e3c4dc9144708c630215e309b7ff394abbdcd76
Test: manual, statsd_testdrive 10064
Bug: 208440056
This matches behaviour described in:
https://developer.android.com/training/articles/perf-jni#extended-checking
All output from CheckJNI state was disabled as part of quietening
logspam, but now we log a message only if CheckJNI is
enabled. CheckJNI is off by default and only used as a developer
correctness tool.
Bug: N/A
Test: adb root; adb shell stop; \
adb shell setprop dalvik.vm.checkjni 1; \
adb shell start; adb logcat -d | grep CheckJNI
Change-Id: I93bc2d097a8769b7768c633b705b29fc1aac634a
* changes:
Move common audio AIDL types to audio.media.audio.common
MediaFormat: Add more audio MIME types
Add android.media.audio.common.AidlConversion class
Add a new header library, libandroid_runtime_vm_headers,
that exposes AndroidRuntimeGetJavaVM.
Test: boots
Bug: 190450693
Change-Id: I64053b56eb1290cff8ea191b1cc592fbc9702ce8
Bug: 192020504
Test: Check logcat with and without the flag.
Change-Id: Ia46a011125a6e245bbd9065d708d1f905d56e3af
Merged-In: Ia46a011125a6e245bbd9065d708d1f905d56e3af
(cherry picked from commit f2a815dcbf)
ART will refuse to load on-device generated artifacts if odsign
verification status suggests files have been tampered with.
(cherry picked from commit a8b24392a1)
Bug: 180949581
Test: manual
Merged-In: I772b5b7b191310bf7c7797161a304a1ab6f53c5e
Change-Id: Ia0e5ebf4c763678fef55139af60b169f0e6fdeee