Commit Graph

679 Commits

Author SHA1 Message Date
Songchun Fan
3c82a306cd [incremental] native implementation of Incremental Service
The implementation of IIncrementalManager.aidl. TODO to refactor this.

Test: atest service.incremental_test
Change-Id: Ib8c8a9c0e7f0289b4bcd8961fa39746ed12b4310
2019-12-19 11:27:42 -08:00
Andy Hung
f2310c7065 MediaMetrics: Add MediaMetrics Java interface
Test: Verify media.metrics dumpsys, atest MediaMetricsTest
Bug: 138583596
Change-Id: Ic0e86fcbb4768f9d21a32dae7e69e071a67d965d
2019-12-17 16:38:51 -08:00
Ytai Ben-Tsvi
7d383d1a98 Migrate SoundTrigger implementation to new service
The API offered by SoundTrigger.java is now implemented on top of
the new soundtrigger_middleware service.
There is no longer any need for JNI - the API now talks directly
with the AIDL interface of the new service.

In the process, some annotations and input validation have been added
to improve the overall quality of this API.

Change-Id: I731ffd5a275b88f38d84dd3daa022a13f97a5ee1
Bug: 142070343
2019-12-16 14:15:37 -08:00
Alex Buynytskyy
89247d28b8 Renaming: incremental_dataloader->dataloader.
Test: compiles
Bug: b/136132412
Change-Id: I23f61a86c14da92b7a60646040e424aaff831a47
2019-12-11 12:13:38 -08:00
Songchun Fan
adc860ec4c Merge "[incremental] base Incremental data loader service" 2019-12-11 17:47:11 +00:00
Jean-Michel Trivi
21cd5413e0 Audio routing by strategy SystemApi
Routing is done per AudioProductStrategy. For instance routing
media is done by using the AudioProductStrategy that supports
the AudioAttributes with USAGE_MEDIA.
  Routing is for a connected device, AudioDeviceInfo, or for on a
device that is not currently connected, uniquely specified by
its role, type and address.
  Preferred routing can be set, removed, queried (get).
  When audioserver crashes, AudioService restores the preferred
routing operating on the audio policy engine.

Bug: 144440677
Test: atest AudioServiceHostTest#PreferredDeviceRoutingTest

Change-Id: I0647608088fe2906e78b71341615975a56747c2f
2019-12-10 09:23:24 -08:00
Alex Light
d319192662 Merge "Start zygote with -Xopaque-jni-ids:swapable" am: 34bc0deb01 am: 3388ace5f7
am: e30f41315e

Change-Id: I6d4930bb76c607868d21928d49d44e08f578a875
2019-12-09 12:40:34 -08:00
Treehugger Robot
34bc0deb01 Merge "Start zygote with -Xopaque-jni-ids:swapable" 2019-12-09 20:21:43 +00:00
Songchun Fan
1a52cf7137 [incremental] base Incremental data loader service
This service will be extended by custom data loader services.

Hide for now till we update it with latest API.

Test: builds
Change-Id: I72d6a1528019dda5b1de4ca066dbda094d3bb4a3
2019-12-09 10:21:53 -08:00
Alex Light
febe967be4 Start zygote with -Xopaque-jni-ids:swapable
This allows the use of structural class redefinition on debuggable
apps.

Also allows override of this via the new 'dalvikvm.vm.opaque-jni-ids'
option.

Test: Manual
Test: ./art/tools/jvmti-agents/field-counts/count-fields.py 'Ldalvik/system/ClassExt;.instanceJfieldIDs:Ljava/lang/Object;' 'Ldalvik/system/ClassExt;.staticJfieldIDs:Ljava/lang/Object;' 'Ldalvik/system/ClassExt;.jmethodIDs:Ljava/lang/Object;'
Bug: 134162467
Change-Id: I9e9c7e5a7ff95d62f9969ebeb472e81a7357d7f9
2019-11-25 16:22:37 -08:00
Ytai Ben-Tsvi
a907efc3bc Add parceling support for HIDL memory in Java
This change adds support for reading/writing a HidlMemory
instance into / out of a HwParcel and HwBlob, in a format that
is compatible with the hidl_memory C++ type.
This paves the way to be able to exchange shared memory blocks
between native and Java via HwBinder, which will be exposed
as adding Java support for the HIDL 'memory' type.

Change-Id: I6cbbf852218c8a631f9014e7caa7a97d17e11889
Bug: 143566068
Merged-In: I6cbbf852218c8a631f9014e7caa7a97d17e11889
2019-11-21 15:19:47 -08:00
Ytai Ben-Tsvi
4659e18733 Add parceling support for HIDL memory in Java
This change adds support for reading/writing a HidlMemory
instance into / out of a HwParcel and HwBlob, in a format that
is compatible with the hidl_memory C++ type.
This paves the way to be able to exchange shared memory blocks
between native and Java via HwBinder, which will be exposed
as adding Java support for the HIDL 'memory' type.

Change-Id: I6cbbf852218c8a631f9014e7caa7a97d17e11889
Bug: 143566068
2019-11-21 13:38:39 -08:00
Orion Hodson
1c287a0318 Merge "Frameworks/base: Support dex2oat cpu-set system property" am: ba206b8f35 am: a89b234154
am: b69904cb6e

Change-Id: I52e8c3ad399d20e78d85abb57f7f2192f2d414e8
2019-11-19 19:34:38 -08:00
Orion Hodson
870ce3f6d7 Frameworks/base: Support dex2oat cpu-set system property
Check dalvik.vm.dex2oat-cpu-set in AndroidRuntime and pass to ART
with "--cpu-set=" as a compiler option, if found.

Check dalvik.vm.image-dex2oat-cpu-set in AndroidRuntime and pass
to ART with "--cpu-set=" as an image compiler option, if found.

Bug: 141446571
Test: manual

Change-Id: Ica6a39048292d3d43aeb58d25f79f1398a7d5a79
2019-11-15 12:40:53 +00:00
Marco Nelissen
f0ef85669c Move JetPlayer implemention and JNI
The JetPlayer implementation in libmedia was only used by the
JetPlayer JNI code in libandroid_runtime. This change moves
both implementation and JNI to libmedia_jni. This reduces
libandroid_runtime's dependency on libmedia, and results in
a net size reduction of the libraries involved.

Test: atest JetPlayerTest
Change-Id: I028c774fdea167924b064855267254c15f22fddb
Merged-In: I028c774fdea167924b064855267254c15f22fddb
2019-10-17 21:33:07 +00:00
Marco Nelissen
5ff1173ab1 Move JetPlayer implemention and JNI
The JetPlayer implementation in libmedia was only used by the
JetPlayer JNI code in libandroid_runtime. This change moves
both implementation and JNI to libmedia_jni. This reduces
libandroid_runtime's dependency on libmedia, and results in
a net size reduction of the libraries involved.

Test: atest JetPlayerTest
Change-Id: I028c774fdea167924b064855267254c15f22fddb
2019-10-17 11:11:46 -07:00
Robert Carr
48ec4e0b5c ViewRootImpl: Add USE_BLAST flag.
Add support for ViewRootImpl submitting buffers using
BLAST and put this support behind a disabled-by-default
FLAG.

Bug: 135786080
Change-Id: Ia3f205e34db9f9aa574c9c2e2c499dd3046af220
2019-10-08 14:36:38 -07:00
Derek Sollenberger
9ca0c52d4e Move registration of Android Graphics JNI behind the C API.
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Bug: 137655431
Change-Id: Ifa044281a3c36cbc1b413175711e9b172cda640f
2019-10-01 08:56:40 -04:00
Mathieu Chartier
5de75e749d Merge "Use APEX boot image for profilebootclasspath" am: 0726986b7c am: d10fe94410 am: 572ba49fd3
am: 9051b2d6c0

Change-Id: Ifddb243151e4cccc29d332564133a7008c8958a3
2019-09-25 11:42:36 -07:00
Mathieu Chartier
a557554def Use APEX boot image for profilebootclasspath
To get profiling info, we need to avoid having compiled code.

Also pass down the --count-hotness-in-compiled-code for measuring
performance in compiled code.

Bug: 139883463
Test: manual
Change-Id: Ib02b476522b7709172fc06d6517446cad59045d4
2019-09-25 15:55:40 +00:00
vichang
085fc26172 Merge "Check ANDROID_I18N_ROOT when starting the runtime" am: 4a09c691bf am: dba23bbec1 am: 7ec076c542
am: f316121225

Change-Id: Id1898bc481e19a5a4697ba5b851431b6a395a6aa
2019-09-25 05:54:21 -07:00
vichang
4a09c691bf Merge "Check ANDROID_I18N_ROOT when starting the runtime" 2019-09-25 12:01:15 +00:00
Martin Stjernholm
61a8c53eb3 Merge "Rename ANDROID_RUNTIME_ROOT to ANDROID_ART_ROOT following APEX module name change." am: 80fd44500c am: 59bcfb47fe am: 22e5747842
am: f44c9cb043

Change-Id: I1b4f81e5a8051a01fe442bdf29e6fae631090687
2019-09-24 11:29:08 -07:00
Victor Chang
3079c6c74b Check ANDROID_I18N_ROOT when starting the runtime
Bug: 137009149
Test: treehugger
Change-Id: I0f34d433c73a44c051724769067bd6ccf5d4a0db
2019-09-24 14:55:02 +01:00
Martin Stjernholm
5bbffbc827 Rename ANDROID_RUNTIME_ROOT to ANDROID_ART_ROOT following APEX module name change.
Test: Boot
Bug: 135753770
Change-Id: I930027fb0ad18d9d06165bbfbfe54d88bc28530d
2019-09-20 16:14:22 +01:00
Mathieu Chartier
d5f1fed45f Merge "Add phenotype property for enabling profiling of boot class path"
am: eb247e7abf

Change-Id: Ie09d3490e8da9712e2af70499295866c8c4975a8
2019-08-23 20:02:00 -07:00
Mathieu Chartier
58f4208dc1 Add phenotype property for enabling profiling of boot class path
If specified, does the same behavior as the dalvik.vm.profilebootimage
property used to do. The new property is called profilebootclasspath
and is in the runtime_native_boot namespace.

Added logic to pass down Xjitsaveprofilinginfo if profilebootclasspath
is specified.

Bug: 139883463
Test: adb shell setprop dalvik.vm.profilebootclasspath true
Test: look at logcat to verify the right options are passed down

(cherry picked from commit 7253961bd0)

Merged-In: I3e2ec37931a6f9239c5d0fa9fcaea61637061ac1
Change-Id: Iab2118822e522f9f80016c2c6ad42af9cd7eba03
2019-08-22 13:06:26 -07:00
Mathieu Chartier
7253961bd0 Add phenotype property for enabling profiling of boot class path
If specified, does the same behavior as the dalvik.vm.profilebootimage
property used to do. The new property is called profilebootclasspath
and is in the runtime_native_boot namespace.

Added logic to pass down Xjitsaveprofilinginfo if profilebootclasspath
is specified.

Bug: 138851258
Test: adb shell setprop dalvik.vm.profilebootclasspath true
Test: look at logcat to verify the right options are passed down

Change-Id: I3e2ec37931a6f9239c5d0fa9fcaea61637061ac1
2019-08-21 17:55:31 -07:00
Hai Zhang
f592aa85c9 Rewrite AtomicDirectory.
The previous version didn't close its FDs for directories, and called
fsync() on the wrong FDs. To make sure a rename() is persisted, we
need to call fsync() on the FD of the parent directory, because file
names are stored in directory entries instead of inodes.

Also removed the need for dedicated native code by calling the Os
class directly.

Fixes: 139302541
Bug: 138866253
Test: presubmit
Change-Id: I67fe98811814acba5158d760766a2ef3b121225a
2019-08-12 23:49:07 +00:00
Fedor Kudasov
fa4e46081d Split frame metrics functionality into a separate unit
Bug: 117921091
Test: all tests should pass
Change-Id: I2b06bf124dc2af9768e8c58af4d7b7b37274f661
2019-07-02 11:28:56 +00:00
Mathieu Chartier
d4a5bc1124 Merge "Remove support for image classes" am: 566bfcf475 am: e8131249e5 am: fd36670bd0
am: 0c2a0a352e

Change-Id: I872102c436f08b5d7cb06290ef45d20dfe10d78c
2019-06-28 10:50:20 -07:00
Mathieu Chartier
fd36670bd0 Merge "Remove support for image classes" am: 566bfcf475
am: e8131249e5

Change-Id: I52062c008a9b658471e4adfca8d5d116dd35790c
2019-06-28 09:49:41 -07:00
Mathieu Chartier
96fab6e32d Remove support for image classes
--image-classes is no longer supported by ART.

Test: make
Change-Id: I2d2a26594ab61a59237db730dd402ab9e53ecfab
2019-06-27 15:43:39 -07:00
Nicolas Geoffray
438e905135 Merge "Pass to the runtime the primary zygote option." am: c9bcf869db am: e21b8c9b57 am: b06bed082a
am: 269b05c370

Change-Id: Ia83233e71688260e8384fbec09448455e5667ee0
2019-06-14 02:00:08 -07:00
Nicolas Geoffray
b06bed082a Merge "Pass to the runtime the primary zygote option." am: c9bcf869db
am: e21b8c9b57

Change-Id: I8285b5822b45f3d817ed9b1cf0fa269ec646f5b9
2019-06-14 01:43:06 -07:00
Nicolas Geoffray
ce4f5c44dd Pass to the runtime the primary zygote option.
Will be used to customize when methods get JITted in jitzygote mode.

Test: boots
Bug: 119800099
Change-Id: Ib6c70cccfd1be6c867319cf78b5b2e4aec00bc80
2019-06-13 16:06:13 +01:00
David Sehr
a78727d1f2 Merge "Add system option to disable lock profiling" am: b1ec00b5ea am: f7da2c5812 am: f47b38277a
am: c2d2f245a3

Change-Id: I536b3187450743dc653f66fa96e51a93ef8d18c6
2019-05-31 07:48:19 -07:00
David Sehr
f47b38277a Merge "Add system option to disable lock profiling" am: b1ec00b5ea
am: f7da2c5812

Change-Id: I6e9c783a346d181fef7446beedf324de1e40daae
2019-05-31 07:37:52 -07:00
David Sehr
26a6427c44 Add system option to disable lock profiling
Disable lock profiling to test for overhead.

Bug: 133257467
Test: build
Change-Id: Ida5f83e626c82266de69b13dc2def0477cc87b0f
2019-05-30 18:04:16 -07:00
Jerome Gaillard
21e7e2d9b1 Build native android graphics library for desktop
The purpose of this is to be able to use the native graphics code from
the Android platform directly in Android Studio (running on desktop) to
do layout rendering.

This creates a host library that is a subset of libandroid_runtime
including only the JNI files relevant to Android graphics. It also
includes LayoutlibLoader.cpp which is used to load the JNI when using
it as part of layoutlib (the graphics library for Android Studio).

This also creates libhwui-host, a host library that is a subset of
libhwui.

Bug: 117921091
Test: lunch sdk && m libandroid_runtime
Change-Id: I3850020d2d4c13c85e377476bc463d3eb6a01c6d
2019-05-29 15:48:53 +01:00
Chiachang Wang
a3d942b43f Public StatsLog API for generic mainline logging.
This is a cherry pick to aosp.

Sets up a public api for logging atoms to statsd. The API excepts a
buffer which is already encoded in the proper format for the socket, as
well as the number of bytes of the buffer to write. It performs a JNI
call to perform the socket write. Autogenerated app code will be built
for each mainline module that needs to use this API to log.

Test: builds
Test: existing logs flow properly
Bug: 126134616
Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
Merged-In: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
2019-04-16 10:22:38 +08:00
David Brazdil
34bf2fc088 Merge "Pass core platform API policy property to ART" am: e4f9b348a5
am: 14432304bf

Change-Id: Ibd933c855553c2061661973bda365c22a92501dd
2019-04-12 09:22:53 -07:00
David Brazdil
1e58e8e3d7 Pass core platform API policy property to ART
When starting ART, read property
""persist.debug.dalvik.vm.core_platform_api_policy" and pass its value
on the command line. This enables users to enable core platform API
violation reporting on demand. Note that the settings take effect after
a reboot.

Bug: 125701194
Test: compiles, boots, reporting observed
Change-Id: I97507afc85d8e186736700979c5dbf2ad0f79f12
2019-04-12 11:18:07 +01:00
Orion Hodson
02440d3b1b Use libnativehelper to get access to NIO buffer internals
Changes to android_opengl_* are generated by editing glgen stubs and
re-running gen script.

Bug: 124338141
Test: atest CtsGraphicsTestCases

(cherry picked from commit 61783592df)

Change-Id: I179f90177c8b1b50a923baecef3b5071a9a25ccf
Merged-In: I715123e66f4ace1d6a11a42c8eafc1d02995e88b
2019-04-11 16:51:33 +01:00
Chenbo Feng
061cec7755 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 14:28:41 -07:00
Chenbo Feng
f2f1f27098 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Merged-In: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 11:33:40 -07:00
Tej Singh
e5f5a10478 Merge "Public StatsLog API for generic mainline logging." 2019-03-23 05:00:52 +00:00
Neil Fuller
69b90a4a6a Merge "Require the ANDROID_TZDATA_ROOT env var" am: f6c4aa1f67 am: 20fd6bdc01
am: 1f36ba9bef

Change-Id: I57438a71f9de6d18cc94734437af723c8747f4e3
2019-03-21 12:13:37 -07:00
Tej Singh
be0482b421 Public StatsLog API for generic mainline logging.
Sets up a public api for logging atoms to statsd. The API excepts a
buffer which is already encoded in the proper format for the socket, as
well as the number of bytes of the buffer to write. It performs a JNI
call to perform the socket write. Autogenerated app code will be built
for each mainline module that needs to use this API to log.

Test: builds
Test: existing logs flow properly
Bug: 126134616
Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
2019-03-20 17:44:53 -07:00
Neil Fuller
b99050d89c Require the ANDROID_TZDATA_ROOT env var
The ANDROID_TZDATA_ROOT serves a similar purpose to the
ANDROID_RUNTIME_ROOT: it determines the location that can be used to
find time zone data files. Since the Android Core Library will soon
require it to be set it makes sense to check it alongside the
ANDROID_RUNTIME_ROOT variable.

Bug: 128422035
Test: build / boot
Change-Id: Ie4860f60760905a06a744bd48fd773d0a4e8cf6d
2019-03-14 14:36:42 +00:00