Commit Graph

64 Commits

Author SHA1 Message Date
Eric Holk
3d91b513f9 Merge "[view compiler] Compile all layouts in an APK" am: a95eac0c59 am: 0ca2e2c2dd
am: 72ffe3b785

Change-Id: I6f16b1be188a8a2539f595d221a7a0f3d38ea175
2019-01-08 10:49:25 -08:00
Eric Holk
72ffe3b785 Merge "[view compiler] Compile all layouts in an APK" am: a95eac0c59
am: 0ca2e2c2dd

Change-Id: I9106f0893aef1569b7ba6b9944cc2d7b8081ee94
2019-01-08 10:28:53 -08:00
Eric Holk
b377e5177e [view compiler] Compile all layouts in an APK
Test: atest
Bug: 111895153
Change-Id: I5f4b9b4c1160acf1c04a4492f5e3a736fbaf2fdc
2019-01-07 14:40:44 -08:00
Igor Murashkin
4de1e16570 services: Add iorap forwarding service
Add a new service to system_server. It purely forwards
data from internal APIs to iorapd over binder, it is not a binder
service itself.

Currently forwards ActivityMetricsLaunchObserver APIs from
ActivityTaskManagerInternal.

Bug: 72170747
Change-Id: Ic4fa283df1c16660099030c74a0039ef24866819
2019-01-07 13:46:47 -08:00
Eric Holk
ffdf092a77 Merge "[view compiler] Add XML to DEX compilation" am: d426ee84a0 am: 755467bb4f
am: c31debe037

Change-Id: Ib457db49ebdade8a9b9e8d52ceeb64d5aee4bbd6
2019-01-07 10:20:09 -08:00
Eric Holk
c31debe037 Merge "[view compiler] Add XML to DEX compilation" am: d426ee84a0
am: 755467bb4f

Change-Id: I32e325db7d9176910e271b721c0adf1b98d1a688
2019-01-07 10:08:49 -08:00
Eric Holk
4273457c9e [view compiler] Add XML to DEX compilation
Test: atest
Bug: 111895153
Change-Id: I91c01ff4474e080c87b902ae963b5d655346f859
2019-01-05 01:36:05 +00:00
Eric Holk
4d4ce90805 Merge "[view-compiler] Better namespacing of util functions" am: ff77ea8d58 am: 36c3953339
am: b63e813feb

Change-Id: I29c804c0342649f325c4b95981f7deb18c3a04e0
2019-01-02 11:58:45 -08:00
Eric Holk
b63e813feb Merge "[view-compiler] Better namespacing of util functions" am: ff77ea8d58
am: 36c3953339

Change-Id: I5aa433d38991ec73280b267076ca20b784a032f8
2019-01-02 11:46:15 -08:00
Eric Holk
ddc8990f09 [view-compiler] Better namespacing of util functions
This moves some helper functions into our own namespace to avoid conflicting
with other util.h files.

Bug: 111895153
Change-Id: I2b4c77732a97b34a8528d69867c15ed802686703
2019-01-02 18:02:31 +00:00
Eric Holk
ff709020ab Merge "[view compiler] Re-enable host-side tests" am: abe06f9138 am: ca50bb3980
am: 531c40f8b8

Change-Id: I61dbe3cc58aa124ec0691f474261e62fad058d00
2019-01-02 08:31:19 -08:00
Eric Holk
531c40f8b8 Merge "[view compiler] Re-enable host-side tests" am: abe06f9138
am: ca50bb3980

Change-Id: I02bfcdd456344cb05c05c767d63a105324deb6dd
2019-01-02 08:17:45 -08:00
Eric Holk
162c812b65 [view compiler] Re-enable host-side tests
TEST_MAPPING supports both host and device tests now, so we should run both.

Test: atest
Bug: 111895153
Change-Id: I48f26093fc0ae3cdaa9e5295375945b5a519e1c2
2018-12-21 16:10:49 -08:00
Chih-Hung Hsieh
36db4ebbb3 Merge "Fix/suppress startop google-explicit-constructor warnings" am: 667dba5c14 am: b3bc82c7f5
am: 4b4210f342

Change-Id: I18db8023d36fb1b0e18e6bd66d470dc1c3f3bb01
2018-12-20 22:29:26 -08:00
Chih-Hung Hsieh
4b4210f342 Merge "Fix/suppress startop google-explicit-constructor warnings" am: 667dba5c14
am: b3bc82c7f5

Change-Id: I0efecc008ff21584fbec19fd68b2a94368821b4f
2018-12-20 22:14:59 -08:00
Chih-Hung Hsieh
81aff0fbab Fix/suppress startop google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I9e7b929cfa65c68f4cdb4710c1c5c6760d56e4d5
2018-12-20 13:53:28 -08:00
Eric Holk
d050d98687 Merge "[view-compiler] DexBuilder: Add check-cast instruction" am: bce4bd1745 am: 758823ae17
am: 77e8678219

Change-Id: Ie19dda0c48d24df1bf5ea79a3dd8a4c3bbdffebf
2018-12-18 16:32:02 -08:00
Eric Holk
77e8678219 Merge "[view-compiler] DexBuilder: Add check-cast instruction" am: bce4bd1745
am: 758823ae17

Change-Id: I12ce815eb4f83c6abc60ad7402c754e3c69cb0d9
2018-12-18 16:14:25 -08:00
Treehugger Robot
bce4bd1745 Merge "[view-compiler] DexBuilder: Add check-cast instruction" 2018-12-18 23:27:46 +00:00
Eric Holk
44d8cdfb06 [view-compiler] DexBuilder: Add check-cast instruction
Bug: 111895153
Test: atest

Change-Id: I767e56713fab6beaa6970e58c4fc4d3560cc1304
2018-12-18 16:47:05 +00:00
Eric Holk
d4cb8a148c Merge "[view-compiler] Add layout validation" am: ceea877ddd am: 1e41ae605d
am: 9020a7cd30

Change-Id: I62894502aa797466212ef3f91285ea0c5099f390
2018-12-17 14:07:44 -08:00
Eric Holk
9020a7cd30 Merge "[view-compiler] Add layout validation" am: ceea877ddd
am: 1e41ae605d

Change-Id: I2bfe50dbb03c6cdcb7cde9b1c1a8f2cf932c41e0
2018-12-17 13:55:25 -08:00
Treehugger Robot
ceea877ddd Merge "[view-compiler] Add layout validation" 2018-12-17 21:28:37 +00:00
Eric Holk
aa0b712ad3 Merge "[view-compiler] DexBuilder: Add more instructions" am: 88f0e734b7 am: a310f87ffa
am: 19b6b983b8

Change-Id: I6273dcba4021657f068868cad072156bb15d600e
2018-12-17 10:51:16 -08:00
Eric Holk
19b6b983b8 Merge "[view-compiler] DexBuilder: Add more instructions" am: 88f0e734b7
am: a310f87ffa

Change-Id: Ia0d4aac9ae998174b64c35d28e8b532c160ab669
2018-12-17 10:39:51 -08:00
Eric Holk
3cbf176e7c [view-compiler] Add layout validation
Layout validation walks over a layout resource and verifies that the layout only
uses features the layout compiler supports.

Currently this means we reject layouts that use any of the following tags:
  * include
  * fragment
  * merge
  * view

In the future, we will extend the layout compiler to handle these, but for now
we want to be liberal in what we reject.

Bug: 111895153
Test: atest view-compiler-tests
Change-Id: I8dca30c035a83b6763497a36fc60c68438fa1b0c
2018-12-14 09:36:14 -08:00
Eric Holk
c69449d95c [view-compiler] DexBuilder: Add more instructions
This CL adds the ability to generate code that calls static and virtual methods
which return objects, as well as the not-equal-to-zero comparison operator.

Bug: 111895153
Change-Id: I4ae9b3cb2edc6540671112b73c02bf6380d23051
2018-12-14 09:14:12 -08:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Elliott Hughes
01fb624e09 Merge "C++17 is the default now." am: fbb102ea84 am: ccb3d1d61a
am: 8dd21cd6b5

Change-Id: I79e72e3a99c9590fdbaab72507044aa85dfa38ef
2018-12-03 18:05:24 -08:00
Elliott Hughes
60a42ccac5 C++17 is the default now.
Test: builds
Change-Id: I64495775afe4ded7d3312cc35a154fecba64adc3
2018-12-03 09:38:35 -08:00
Eric Holk
ee8fbc72e1 Merge "[view_compiler] cleanup: Use format-specific bytecode encoding functions" am: 9d599fde8e am: 6eeb8bef8d
am: decaa96ae1

Change-Id: Id65479b53822303bfb26fe1f220e9881a97f1cfc
2018-11-15 10:37:17 -08:00
Eric Holk
eb0db2f2a8 Merge "[view_compiler] DexBuilder: Add support for new and calling constructors" am: 2583def750 am: d6d6097c16
am: ae1a057780

Change-Id: Ie092cb59bf118d66362d654ad5e38c33807bb4cb
2018-11-15 10:25:32 -08:00
Eric Holk
1c0f3f099c [view_compiler] cleanup: Use format-specific bytecode encoding functions
This change corrals most of the bit shifting and ORing needed to encode Dex
instructions into EncodeXXX functions that follow the naming scheme at
https://source.android.com/devices/tech/dalvik/instruction-formats. Overall, it
makes the code easier to follow and probably even less error prone because we
only have to make the format right in one place.

Bug: 111895153
Change-Id: I902ec3c8bca6b5dc4ad900503af7aef58d4bbf5f
2018-11-15 17:44:03 +00:00
Eric Holk
8ee9d7d11d Merge "[view_compiler] DexBuilder: add support for string literals and null pointers" am: c96993154a am: f1c4799cb3
am: 32cdabf510

Change-Id: Ic0f834a704afafda2a644bd35e7cfe5e6448bbef
2018-11-15 06:01:20 -08:00
Eric Holk
b392758a65 [view_compiler] DexBuilder: Add support for new and calling constructors
This change also includes support for calling methods with more that one
argument. In fact, we can go up to four.

Bug: 111895153
Change-Id: I49472171cefcf57cdfce2ac4d41646ed4df29074
2018-11-13 13:47:29 -08:00
Eric Holk
3cc4afc610 [view_compiler] DexBuilder: add support for string literals and null pointers
Bug: 111895153
Change-Id: If6bdd9a280f6feed175be4da57733f3442e6dd14
2018-11-13 13:41:56 -08:00
Eric Holk
254fe344ed Merge "[view compiler] Add conditional branch instruction" am: d659ad62f4 am: 9d82929472
am: a60e020ac5

Change-Id: I4fc1500995770d5adbf5d6905ec4b74067b27648
2018-11-12 13:45:10 -08:00
Eric Holk
d62c5aa954 [view compiler] Add conditional branch instruction
This CL adds support for the if-eqz instruction. It should be easy to add
additional comparisons as needed.

This also introduces a new kind of Value called a Label. Labels may be created
any time and then must be bound to a location in code at some point. References
to labels are tracked, and when a label is bound all references are patched to
refer to the concrete address.

Bug: 111895153
Change-Id: I15424aec75425004f0f1f4bbc6e760bac3a6c7de
2018-11-10 00:46:07 +00:00
Eric Holk
1bf3b364a9 Merge "[view_compiler] Add end-to-end DexBuilder tests" am: 60b722a005 am: 66f78192a9
am: b6d1454fe3

Change-Id: Ifc10927b1dbf043648815aed57a686b9bd413689
2018-11-09 13:51:47 -08:00
Eric Holk
d683f9fa31 [view_compiler] Add end-to-end DexBuilder tests
These tests verify that code produced by DexBuilder can be loaded and run on
device. It works by introducing a new tool, dex_testcase_generator, which writes
out a couple of DEX files with test cases. This tool runs as a build step. The
generated DEX are then copied over to the device where they are loaded and run
the on-device DexBuilderTest.

Bug: 111895153

Change-Id: I06f5edd0e3e2f4e9ec2d14a0db7d22b75b424119
2018-11-08 21:14:32 +00:00
Eric Holk
bc120bcce6 Merge "[view-compiler] Support method declaration and invocation in Dex builder" am: 0b16b3c07f am: 4f60333798
am: 48d7de33fa

Change-Id: Ibe56507dd96e26dd14af4a7642b710b7fbb49c57
2018-11-07 12:59:13 -08:00
Eric Holk
faefd4f6c7 [view-compiler] Support method declaration and invocation in Dex builder
The Dex builder can now generate calls to methods (although not in all forms
yet). To help do this, we add a new virtual Instruction and Value class. This is
needed to generate code with values that are not known until the entire method
has been generated. In particular, we can now refer to function parameters.

The test method now accepts a String and returns the the length of the string.

Bug: 111895153
Change-Id: I11d52b083ae51d8151fccb1a65e45d40ff05fd81
2018-11-07 00:05:48 +00:00
Eric Holk
be452b24b5 Merge "Move startop/tools/view_compiler to startop/view_compiler" am: af22f56863 am: d99adc0e45
am: 4c8a976a0e

Change-Id: I09a8bcd5a4bc6420bb1b71ca27c0197b1d8aa5fd
2018-10-25 18:11:12 -07:00
Eric Holk
acf3fbde82 Move startop/tools/view_compiler to startop/view_compiler
This is planned to ship on device, so by convention the view_compiler should not
be in a tools directory.

Change-Id: I0eb03812d77ec38edc3908725acb40bacb345ecd
2018-10-22 11:13:42 -07:00
Igor Murashkin
013d97ca09 Merge "iorap: Remove blank newline in TEST_MAPPING" am: 22fe21df93 am: cbe655e781
am: d40cb164d5

Change-Id: I6637b6233ce90ec19437465050394232731540bb
2018-10-16 21:12:30 -07:00
Treehugger Robot
22fe21df93 Merge "iorap: Remove blank newline in TEST_MAPPING" 2018-10-17 01:50:35 +00:00
Igor Murashkin
3f12e8cc20 Merge "iorap: Add presubmit/postsubmit support" am: 7cbabff3f0 am: ff3a8bf0f7
am: eaef91f7aa

Change-Id: Ifa811049b34a90ea607e8d18d423890217dd4b0c
2018-10-16 16:22:28 -07:00
Treehugger Robot
7cbabff3f0 Merge "iorap: Add presubmit/postsubmit support" 2018-10-16 22:21:33 +00:00
Igor Murashkin
e53713c514 iorap: Remove blank newline in TEST_MAPPING
Change-Id: I378e86327951daa05512efd2ac491d27f9995ddd
2018-10-16 15:15:21 -07:00
Eric Holk
2014c4f051 Merge "Start on DexBuilder" am: 3e7d810a2f am: d4d3e215d7
am: d8a522c89c

Change-Id: I20614099a342c5ff2db14633c17672d471f72831
2018-10-16 10:30:44 -07:00