134 Commits

Author SHA1 Message Date
Jiyong Park
e86e89acff Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ifd6cfc77acf2284804a2f64011c2733b5c222369
(cherry picked from commit bae2e907966dce0cb3eaf3e3a81cca4364b7d941)
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-12-11 15:55:33 +09:00
Orion Hodson
cc8b8ca466 Adds ToBits helper method to convert instructon opcode enum to bits
Bug: 142948359
Test: atest dex-builder-test
Change-Id: Ic1c02e74dd787107c08bd34ca861eee89d6d1423
2019-11-04 16:58:26 +00:00
Orion Hodson
59d07201d9 Switch to slicer DEX opcode definitions
Removes dependency on art/libdexfile and uses equivalent definitions
from the dexter/slicer library.

Bug: 133140750
Bug: 142948359
Test: m
Test: atest dex-builder-test \
            view-compiler-tests \
            android.view.cts.PrecompiledLayoutTest
Change-Id: I49562ac4867254ecde287b828f76d23cb5132dd0
2019-11-01 11:38:56 +00:00
Treehugger Robot
f5617abe09 Merge "Refactor DexViewBuilder" 2019-09-25 16:57:37 +00:00
Steven Moreland
598bda8624 Host users of libutils trace use libcutils.
Reducing device/host differences. This is now required since libutils
Trace.h always calls the libcutils functions, instead of before where
it only called these functions on device.

Bug: 124524556
Test: build & boot
Change-Id: Ic096ed7caf8ca59292b3427a16c4e2545d12dfd9
2019-09-20 11:27:59 -07:00
Eric Holk
5c6a1a516b Refactor DexViewBuilder
The code was previously pretty messy and hard to follow. This reworks some
things to make it more manageable. Among the changes:

* Pull out fragments of code into their own method, so the high level steps are
  more apparent in methods like DexViewBuilder::Start.
* Pull frequently used types into global constants in dex_layout_compiler.cc.
* Rework register handling to track liveness so a strict stack discipline is no
  longer needed.

Change-Id: Idb4b41f88c96a1ac4efb2c7b9bed05c2de0da999
2019-09-18 17:04:50 -07:00
Eric Holk
06a213820d [view compiler] Add test coverage for layouts compiled from APK
The existing LayoutCompilerTest only covered compiled layouts generated from
text XML files. It did not cover layouts that were extracted from the APK. This
is an important area to cover.

This test works by calling `pm compile --compile-layouts` on the test APK, and
then directly loads the `compiled_view.dex` file. From there, it pulls out the
compiled layouts and executes their inflater. This makes sure the generated DEX
files validate and execute without error.

Bug: 111895153
Merged-In: Ifc6719c2f438474b5474def02422ef68eee800b2
Change-Id: I7024069bb4d77a81871366f259fb34ae54a55aac
2019-09-05 11:20:05 -07:00
Eric Holk
130c3cc2b1 Merge "[view compiler] Remove dex_builder_test.cc"
am: 63f6a62163

Change-Id: Ib73ed6f1fee41358eabe4b93fd99fe96339c205d
2019-08-05 10:06:15 -07:00
Eric Holk
e167823f12 [view compiler] Remove dex_builder_test.cc
This test is problematic because it links against libdexfile and we would like
to remove this dependency. All of the functionality covered by this test is also
tested more thoroughly by the on-device dex-builder-test, so there's no reason
to test it here as well.

Change-Id: Ie45d4a1c99668b68476168fc072a220fa5db3695
2019-08-02 09:32:02 -07:00
Eric Holk
f6b04a5e3b Merge "[view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag"
am: 94d801a515

Change-Id: I19439c000c8372db0ee3f68f904d9ebe84c74a06
2019-07-31 16:24:46 -07:00
Treehugger Robot
94d801a515 Merge "[view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag" 2019-07-31 22:03:46 +00:00
Eric Holk
615fd40982 Merge "[view compiler] Add DexBuilder support for getting and setting instance fields"
am: c0b1a32260

Change-Id: I9efc2af44faa17b40de1b3630ecfb54ca0b15f6d
2019-07-31 12:29:23 -07:00
Eric Holk
d2364572fe [view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag
Change-Id: I9f83b2a5d61e92dee9cded239626dcaa0ebb1993
2019-07-31 11:07:51 -07:00
Eric Holk
f3b9589e7b [view compiler] Add DexBuilder support for getting and setting instance fields
Bug: 111895153
Change-Id: I5fa2936501c79e30a66f3863b76229ec83433928
2019-07-30 14:47:06 -07:00
Eric Holk
1c2e3a181d Merge changes I12b38fa5,Ia11195b1
am: 8aa2b1dffd

Change-Id: I2ac308ac94fd49298641c1230e731c1406913281
2019-07-26 20:13:32 -07:00
Treehugger Robot
8aa2b1dffd Merge changes I12b38fa5,Ia11195b1
* changes:
  [viewcompiler] Add support for static field put to DexBuilder
  [viewcompiler] Add static field get instructions to DexBuilder
2019-07-27 02:40:37 +00:00
Eric Holk
70445d0d89 [viewcompiler] Add support for static field put to DexBuilder
Bug: 111895153
Change-Id: I12b38fa520790debec545d7d1f6b3522a65ce03b
2019-07-26 09:46:18 -07:00
Eric Holk
3092f99ae6 [viewcompiler] Add static field get instructions to DexBuilder
This allows us to generate code that can read static fields in a class. Once we
include several other field operations, we will be able to generate more
specialized inflation code in the view compiler.

Bug: 111895153
Change-Id: Ia11195b1cea6d5a3ddbc60d972922586a062c853
2019-07-26 09:42:41 -07:00
Jeongik Cha
869f3888bd Merge "Add platform_apis in Android.bp"
am: cebe8f985f

Change-Id: Ia9f556a6066985a4c210192b196f54c5c35d6cd6
2019-07-25 01:53:31 -07:00
Treehugger Robot
cebe8f985f Merge "Add platform_apis in Android.bp" 2019-07-25 08:29:00 +00:00
Jeongik Cha
a1bf8a9b75 Add platform_apis in Android.bp
platform_apis must be true when sdk_version is empty.
So add platform_apis into file that is not included it.

Bug: 132780927
Test: m
Change-Id: Ie7badd61248bbabaf51ef8fb30bdd832af88da15
2019-07-11 15:40:04 +09:00
Jonathan Ward
c32890e0bd Merge "App that changes screen to multiple colors"
am: bd09ce590c

Change-Id: I209e0b256c583c7d5f7fc0546fa9257b8612d14b
2019-07-10 10:25:37 -07:00
Jonathan Ward
548c587a58 App that changes screen to multiple colors
This app will be used to sync the timestamps for screen recording
in Perfetto.

Bug: 135278534

Test: Ran the app with the Perfetto trace and screenrecord

Change-Id: I505fcb752a1e29455680ffd4a13c5803740c0b8f
2019-07-09 14:11:51 -07:00
Carmen Jackson
197e665060 Merge "Add textview and framelayout inflation cases, refactor." am: 1b3687c0e9
am: e11cfda38c

Change-Id: Iad4539ec0eae2fb1e64fe9f733791251ea974a93
2019-06-26 22:15:40 -07:00
Carmen Jackson
8be08e5679 Add textview and framelayout inflation cases, refactor.
This change adds a base activity to inflate views, and then adds two
more views to inflate: one with 1000 TextViews and the other with 1000
FrameLayouts in a LinearLayout nested inside a ScrollView.

This change also adds launcher icons for each of the new cases for
ease in testing a launcher-based start.

Bug: 132721345
Test: Verified that the layout segments appear in traces as expected.

Change-Id: Id8c3e867a1ad5df5c3322ce5d69c9b4255042b69
2019-06-26 18:59:09 -07:00
Eric Holk
7192be9d24 Merge "[startop] Add an app for testing startup performance" am: e563643312
am: 58ed47d87b

Change-Id: I2b502a0cf4e0950f44dc80016c9b8a54ee257173
2019-06-19 15:03:36 -07:00
Eric Holk
e6e17c734a [startop] Add an app for testing startup performance
This CL includes a simple app for testing aspects of startup performance. It
will probably gain new activities as we focus on different parts in
particular. Currently it has an empty activity and an activity that focuses on
layout inflation.

Test: mma, adb install, adb shell start (see README.md for exact commands)
Change-Id: I4e98994f0c25ce61a89d13f86eda2320a1fdcafa
2019-06-18 15:41:11 -07:00
Mathieu Chartier
27ee83dca3 Merge "Disable iorap test mapping"
am: 46b3d6d05d

Change-Id: Ic644f166fee8f74818e03b8ec72cbae1756795bf
2019-04-22 14:01:38 -07:00
Mathieu Chartier
6aaa03ab91 Disable iorap test mapping
Post submit tests are failing, disable the tests for now.

Bug: 123659771
Bug: 72170747
Bug: 130883339
Test: TH

(cherry picked from commit 6565a34d7ff731180ddb9c4ef05c51bcf6691ec7)

Merged-In: I17befa52ebad92413122253f692168cf93cbab6e
Change-Id: Ida6c6cb2ee30ebb08c959df83ae05fabb112d9c2
2019-04-22 12:38:00 -07:00
Sasha Smundak
7f0a256a78 Merge "Convert Android.mk file to Android.bp"
am: e6bcf626be

Change-Id: I960027bd43c94d6d9908b83a1a13bffab8973549
2019-04-03 11:39:45 -07:00
Sasha Smundak
a0ce095241 Convert Android.mk file to Android.bp
Files failing automerge from AOSP.
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I92f7584aeaf502336f67e04fbc22634784c9305d
Merged-In: I92f7584aeaf502336f67e04fbc22634784c9305d
2019-03-28 15:11:46 -07:00
Sasha Smundak
b61bab6a58 Convert Android.mk file to Android.bp
Files failing automerge from AOSP.
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I92f7584aeaf502336f67e04fbc22634784c9305d
2019-03-26 15:18:41 -07:00
Colin Cross
cd18790959 Merge "Fix ODR issue in viewcompiler" am: b9879d00c4 am: d1e12a6112
am: bf200e78a8

Change-Id: Ib8afbe33ef39a140e8d9855a13aa1296a6b5bd61
2019-03-21 01:44:16 -07:00
Colin Cross
d1e12a6112 Merge "Fix ODR issue in viewcompiler"
am: b9879d00c4

Change-Id: I2fda6bdf7ebc082a732d75d55694d47f5a755fdc
2019-03-21 01:23:40 -07:00
Colin Cross
d7632929ea Fix ODR issue in viewcompiler
libz is already linked as a static library through
libdexfile_static_defaults, don't also link it as a shared library.
Fixes:
=================================================================
==43189==ERROR: AddressSanitizer: odr-violation (0x55d1ed723a60):
[1] size=48 'inflate_copyright' external/zlib/src/inftrees.c:11:12
[2] size=48 'inflate_copyright' external/zlib/src/inftrees.c:11:12
These globals were registered at these points:
[1]:
 #0 0x55d1ed769a0e (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0xf3a0e)
 #1 0x55d1ed991b1b (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0x31bb1b)

[2]:
 #0 0x55d1ed769a0e (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0xf3a0e)
 #1 0x7f5dff20a09b (/buildbot/src/android/master/out/soong/host/linux-x86/bin/../lib64/libz-host.so+0x3e09b)

Test: m SANITIZE_HOST=address viewcompiler && viewcompiler
Change-Id: I4ebdf7ef4ec1641488fbc25275dbf6aa0cdbe2eb
2019-03-20 21:19:57 -07:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
Xin Li
b455c3a7f3 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08:00
Chih-hung Hsieh
d8b390c88b Merge "Add default code reviewers into OWNERS" am: e45eefe8ec am: 3a59c9f70e
am: f59468295e

Change-Id: I1f5055c6c83f1659b4a75cc4af2008d89c622195
2019-02-06 22:51:55 -08:00
Chih-hung Hsieh
f59468295e Merge "Add default code reviewers into OWNERS" am: e45eefe8ec
am: 3a59c9f70e

Change-Id: I65f8c7aa64ee34388341c6e8687adc3dbdcfa595
2019-02-06 22:42:47 -08:00
Chih-Hung Hsieh
34cd77a651 Add default code reviewers into OWNERS
Bug: 33166666
Test: gerrit uploader
Change-Id: Ief5d4bf9005bb3a712803101f98dd2b876662eb8
2019-02-06 22:19:19 -08:00
Chih-hung Hsieh
fd1dcbde32 Merge "Work around clang-tidy bug in dex_builder.cc." am: c6036971e7 am: 24a986bfb1
am: acd74cfac0

Change-Id: Id213b483d0439dd03f198552d8ca78831347256a
2019-02-06 14:56:37 -08:00
Chih-hung Hsieh
acd74cfac0 Merge "Work around clang-tidy bug in dex_builder.cc." am: c6036971e7
am: 24a986bfb1

Change-Id: Ic46821b9512dc4b73ce153202012984a714649c5
2019-02-06 14:34:50 -08:00
Chih-Hung Hsieh
2b61bddc1a Work around clang-tidy bug in dex_builder.cc.
Bug: 123880763
Test: build with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,
    -google-readability-*,-google-runtime-references,-cppcoreguidelines-*,
    -modernize-*,-llvm-*,-bugprone-narrowing-conversions,
    -misc-non-private-member-variables-in-classes,
    -misc-unused-parameters,-hicpp-*,-fuchsia-*

Change-Id: Ibf80f951ae2369a55570770febe8a1c4422181e1
2019-02-05 17:11:05 -08:00
Chih-Hung Hsieh
eb009eb990 Merge "Temporarily disable clang-tidy for dex_builder.cc." am: 171dfad60c am: e6d84ae4c9
am: 6cb189e322

Change-Id: I65741102dfe0989c82f4244ef4c45954129dd513
2019-02-04 22:17:39 -08:00
Chih-Hung Hsieh
6cb189e322 Merge "Temporarily disable clang-tidy for dex_builder.cc." am: 171dfad60c
am: e6d84ae4c9

Change-Id: I13efd650ad82f46e7c060558809109b72de17047
2019-02-04 21:36:52 -08:00
Chih-Hung Hsieh
7ae7f169fb Temporarily disable clang-tidy for dex_builder.cc.
Bug: 123880763
Test: build with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,
-google-readability-*,-google-runtime-references,-cppcoreguidelines-*,
-modernize-*,-llvm-*,-bugprone-narrowing-conversions,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,-hicpp-*,-fuchsia-*

Change-Id: I7be72b9db232a375bf7caf3b2dbeb9c6f7368a8e
2019-02-04 10:35:55 -08:00
Eric Holk
846b59eafa Merge "[viewcompiler] Support more than 16 registers in invoke instructions" am: f96ebc501e am: 18fa74cbe4
am: 1660db4818

Change-Id: Ie3c443c1cff90d5bbceb4a067963f1009259de7f
2019-02-01 13:32:41 -08:00
Eric Holk
1660db4818 Merge "[viewcompiler] Support more than 16 registers in invoke instructions" am: f96ebc501e
am: 18fa74cbe4

Change-Id: I2bbe8793d7bf3b1e06ec5576ba250f10a0f9c304
2019-02-01 12:44:32 -08:00
Treehugger Robot
f96ebc501e Merge "[viewcompiler] Support more than 16 registers in invoke instructions" 2019-02-01 18:57:18 +00:00
Eric Holk
baa8e66c0e Merge "[viewcompiler] Add PrecompiledLayoutTest to TEST_MAPPING" am: 1cb64c6a85 am: d8ec417dd6
am: 55398cf19d

Change-Id: I55026e983954f5af3913eaf0a5caa93721ffa796
2019-01-31 19:27:53 -08:00