360 Commits

Author SHA1 Message Date
Kris Giesing
6c97440849 DO NOT MERGE Revert "Load libraries directly from apk"
This reverts commit dec4688f40b0018fbd1f00db05581966f531d88f.

Change-Id: Ief869dec1641d5a376bc044719941536e0bf8442
2015-04-20 14:15:59 -07:00
Dmitriy Ivanov
d95e58cb60 Merge "Load libraries directly from apk" 2015-04-07 17:28:15 +00:00
Dmitriy Ivanov
dec4688f40 Load libraries directly from apk
Introduced new 'extractNativeLibs' attribute to manifest/application.
 Setting it to false prevents installer from extracting library from apk.

 The default value for extractNativeLibs is true.

Bug: 8076853
(cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-04-07 17:25:23 +00:00
Andreas Gampe
605cca1a98 Frameworks/base: Pass variant and feature-set to runtime
This is required so we pick up the settings correctly when compiling
the boot image on device, or compile any dex files through a
DexClassLoader.

Bug: 20055104
Change-Id: Ia3ab2e48855060894b36f7fd360fe17b978e45a6
2015-04-03 16:08:20 -07:00
Andreas Gampe
e324ba0e7c Frameworks/base: Use system property for cache prune counter
Expose ART's -Xzygote-max-boot-retry through a new system property
dalvik.vm.zygote.max-boot-retry.

Bug: 19983101
Change-Id: Ib88f807e0082d71292c14c7af38e02cca5a5602c
2015-04-01 19:50:58 +00:00
Andreas Gampe
e035238823 Frameworks/base: Support dex2oat threads system property
Check dalvik.vm.dex2oat-threads in AndroidRuntime and pass to ART
with "-j" as a compiler option, if found.

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

Bug: 19992386
Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc
2015-03-30 20:16:03 -07:00
Mathieu Chartier
1fb7aab9b2 Revert "Change jit properties to be debug properties"
Bug: 19735273

This reverts commit 1ad10ef1e4b83ef9e845761a82e202bb57e2379d.

Change-Id: Iac930925ab6d5cd5947fa4077c8d93e2984927d5
2015-03-18 19:07:02 -07:00
Mathieu Chartier
1ad10ef1e4 Change jit properties to be debug properties
Bug: 19735273
Change-Id: I266cf447a7af0595366bf89109d2823094f5cf41
2015-03-16 16:22:52 -07:00
Mathieu Chartier
773bcfa7ec am e59b7ce2: Merge "Add JIT system properties"
* commit 'e59b7ce2564a916240e561b36f4476f2d72a65c5':
  Add JIT system properties
2015-03-06 01:36:55 +00:00
Mathieu Chartier
6909c0e1e7 Add JIT system properties
Added the following runtime options.
"dalvik.vm.usejit" -> "-Xusejit:"
"dalvik.vm.jitcodecachesize" -> "-Xjitcodecachesize:"
"dalvik.vm.jitthreshold" -> "-Xjitthreshold:"

Bug: 17950037
Change-Id: I4996cdd1e34a1743d83c37069f545e6e09bccdb9
2015-03-05 17:02:54 -08:00
Narayan Kamath
1194e754a9 Merge "Add support for persist.sys.locale." automerge: dca2332
automerge: 117f161

* commit '117f161fee52dfa200f89282c487d58c29b41d4f':
  Add support for persist.sys.locale.
2015-01-22 13:56:01 +00:00
Narayan Kamath
d30dbb8ae1 Add support for persist.sys.locale.
AndroidRuntime has been changed to read "ro.product.locale" and
"persist.sys.locale" instead of "ro.product.locale.language" etc.
This is passed down as "-Duser.locale" to the runtime.

The system_server has been changed to write out persist.sys.locale
on locale changes.

bug: 17691569

Change-Id: I93360c8795c9620a133656dc491d13d7b6ed162e
2015-01-22 13:48:20 +00:00
Andreas Gampe
555ea653ba am ec64c0b6: am 022b1ba1: Merge "Core/jni: Disallow relocation for decryption"
* commit 'ec64c0b6e639b743398fb543218100fdaf9a7f69':
  Core/jni: Disallow relocation for decryption
2015-01-07 22:16:11 +00:00
neo.chae
155118fee8 Core/jni: Disallow relocation for decryption
When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.

If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.

This patch ensures that the boot image is not being relocated.

Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
2015-01-07 13:28:36 -08:00
Andreas Gampe
83cfb97323 am 5470c169: am 2b20efa7: Merge "Core/jni: Remove Dalvik options from AndroidRuntime"
* commit '5470c1699121135f0f1c615d080359f0bc9cf1c4':
  Core/jni: Remove Dalvik options from AndroidRuntime
2014-12-23 03:44:12 +00:00
Andreas Gampe
08b2d585b1 Core/jni: Remove Dalvik options from AndroidRuntime
Dalvik is dead. Remove old command-line options from AndroidRuntime.

Bug: 18833580
Bug: 18834205
Change-Id: If9a6f78cc0d74fc7a596b08065059b388a8d4b2f
2014-12-22 14:57:18 -08:00
Elliott Hughes
e6f2f9db42 am 5cd79d07: Merge "Move the remaining ZygoteInit native code over to Java."
automerge: e37f3af

* commit 'e37f3af76dc0c876ea7169b9153f79175d0c703d':
  Move the remaining ZygoteInit native code over to Java.
2014-12-18 20:54:28 +00:00
Elliott Hughes
26b56e628b Move the remaining ZygoteInit native code over to Java.
Bug: 18719692
Change-Id: I5f9834edecdbcc065a33a9921c740a53441636a4
2014-12-17 12:28:29 -08:00
Andreas Gampe
2e706eb5b7 am f1c84568: am 2a20f425: Merge "Frameworks/base: Compiled-classes support" into lmp-mr1-dev
* commit 'f1c84568bc48d51ace404452c9e18250c4d36de4':
  Frameworks/base: Compiled-classes support
2014-11-18 22:57:02 +00:00
Andreas Gampe
f59fb28cb8 Frameworks/base: Compiled-classes support
Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571

(cherry picked from commit ca775941f3b7981aabf3a6a3b84d6c94f4f76aff)

Change-Id: I2510316381f2661166af24d7e14b013f4e045556
2014-11-18 14:48:31 -08:00
Andreas Gampe
ca775941f3 Frameworks/base: Compiled-classes support
Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571
Change-Id: I2510316381f2661166af24d7e14b013f4e045556
2014-11-18 11:48:22 -08:00
Ying Wang
e77a906653 am bb637938: am 7f5fbe9e: Merge "Frameworks/base: AndroidRuntime standalone preloaded-classes" into lmp-mr1-dev
* commit 'bb637938d476e7927d2eed53255a3be7f5dd2d19':
  Frameworks/base: AndroidRuntime standalone preloaded-classes
2014-11-17 19:23:25 +00:00
Andreas Gampe
65ff8ee134 Frameworks/base: AndroidRuntime standalone preloaded-classes
Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157

(cherry picked from commit 995c62d6abd4b7080e52a60d1bffa32ae4a798a3)

Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
2014-11-17 10:57:57 -08:00
Andreas Gampe
995c62d6ab Frameworks/base: AndroidRuntime standalone preloaded-classes
Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157
Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
2014-11-14 16:15:17 -08:00
Andreas Gampe
035a7b0235 am 0626ec58: Merge "Frameworks/base: Wall Werror in core/jni"
* commit '0626ec58243c9dc7f4812a453ef9456b1f7ff1f4':
  Frameworks/base: Wall Werror in core/jni
2014-11-13 23:35:22 +00:00
Andreas Gampe
0f0b491966 Frameworks/base: Wall Werror in core/jni
Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
2014-11-13 15:20:37 -08:00
Dianne Hackborn
92faa96a26 am 8f53ad8e: am 7ef46316: Merge "Condense AndroidRuntime init log, include uid running under." into lmp-mr1-dev
* commit '8f53ad8e7335068b4dd96db10916c3889960de5a':
  Condense AndroidRuntime init log, include uid running under.
2014-10-30 23:44:20 +00:00
Dianne Hackborn
8e5aafe57d Condense AndroidRuntime init log, include uid running under.
Change-Id: Ifda3001fdc25d759f07a93b8569c59da89a8bcfc
2014-10-29 10:45:25 -07:00
Wei Jin
5cfbcd3b9e Fix the length of a profiler system property
This patch changes the profiler system property
"dalvik.vm.profile.max-stack-depth" to "dalvik.vm.profile.stack-depth"
so that the length of the option is less than PROP_NAME_MAX.

Bug: 17294224

(cherry picked from commit 4d033e1c44c1b94ea5311713b8cc8bfb56bdcdd2)

Change-Id: I10dd0b3bfa46b836def437a3822f6c48538167dd
2014-10-29 11:17:42 +00:00
Neil Fuller
1f2ad9eb74 am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"
* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
  Replacing FloatMath native implementation with calls to Math
2014-10-20 10:16:29 +00:00
Neil Fuller
38b63f0ede am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"
* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
  Replacing FloatMath native implementation with calls to Math
2014-10-20 10:16:08 +00:00
Nick Kralevich
7b3db39aa4 Replacing FloatMath native implementation with calls to Math
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7
2014-10-20 09:24:11 +01:00
Elliott Hughes
870367567a am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""
* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
  Revert "Replacing FloatMath native implementation with calls to Math"
2014-10-18 20:54:05 +00:00
Elliott Hughes
5fc9f9c293 am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""
* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
  Revert "Replacing FloatMath native implementation with calls to Math"
2014-10-18 20:53:38 +00:00
Elliott Hughes
b3b68d0333 Revert "Replacing FloatMath native implementation with calls to Math"
This reverts commit 32b88b48daa7383880088246d7222dd93cf55285.

Change-Id: I40ea17f3a68f2b53eb013aebd3ba1becdc724f94
2014-10-18 20:41:27 +00:00
Neil Fuller
06965cfd12 am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"
* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
  Replacing FloatMath native implementation with calls to Math
2014-10-16 09:35:43 +00:00
Neil Fuller
4ef9403577 am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"
* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
  Replacing FloatMath native implementation with calls to Math
2014-10-16 09:32:33 +00:00
Neil Fuller
32b88b48da Replacing FloatMath native implementation with calls to Math
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I8d1947d88b3c576643138b1df589fb9da7c1ab88
2014-10-15 11:47:58 +01:00
Mike Lockwood
15b3c63386 am b4b95714: am e996ea18: am ad421a8b: am 52e5e359: Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev
* commit 'b4b957144368a23cd916b7d7f5656141b7cb0dae':
  USB string descriptors are not UTF8, so it is not safe to treat them as such.
2014-09-19 09:30:08 +00:00
Mike Lockwood
99f8f21c16 am d3d6ecdb: am 52e5e359: Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev
* commit 'd3d6ecdb7a6b00347920c5e706275017854849af':
  USB string descriptors are not UTF8, so it is not safe to treat them as such.
2014-09-19 03:56:19 +00:00
Mike Lockwood
51938c205f Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev 2014-09-19 02:00:26 +00:00
Jeff Brown
c846e61639 am a38e59b1: am 683872af: Merge "Clean entire arg block when setting process name." into lmp-dev
* commit 'a38e59b1b4164a33c38fc522e56601d886c49833':
  Clean entire arg block when setting process name.
2014-09-12 05:45:07 +00:00
Jeff Brown
00c0cd4a24 Clean entire arg block when setting process name.
When Android processes fork from Zygote, we rewrite the command line
with a new name, eg. "system_server".  When we do this, we should
fill the entire block with zeros to remove corrupted argument
information that may otherwise remain in the /proc/<pid>/cmdline buffer
and be seen in tools and stack dumps.

Fixed an issue where VM options could be overwritten after setting
the nice name if the name was too long.

Bug: 17474152
Change-Id: Ie6cf9ed7752a04300a340e26cd6812bb35c59e1b
2014-09-11 14:19:52 -07:00
Svetoslav
87c8260341 am f1b72b86: am 3f49b128: Merge "Trim unnecessary pages when printing." into lmp-dev
* commit 'f1b72b86380b25b933be32c46d4f59a41699a546':
  Trim unnecessary pages when printing.
2014-09-10 00:49:17 +00:00
Svetoslav
62ce332c14 Trim unnecessary pages when printing.
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
2014-09-09 09:38:07 -07:00
Mike Lockwood
9ee5e7e17f USB string descriptors are not UTF8, so it is not safe to treat them as such.
Add AndroidRuntime::NewStringLatin1() to convert non-UTF8 strings to Java strings.

Bug: 17427781
Change-Id: I7df1d4e94a7beebc8b1a74c0c0a163b794025ae8
2014-09-08 17:05:44 -07:00
Calin Juravle
eee5254d78 am d5f23f2e: am 2d3571cc: Merge "Fix the length of a profiler system property"
* commit 'd5f23f2ec0769248d00cfd6e9049cfa354492cce':
  Fix the length of a profiler system property
2014-08-27 16:59:55 +00:00
Calin Juravle
2d3571cc17 Merge "Fix the length of a profiler system property" 2014-08-27 16:36:53 +00:00
Wei Jin
4d033e1c44 Fix the length of a profiler system property
This patch changes the profiler system property
"dalvik.vm.profile.max-stack-depth" to "dalvik.vm.profile.stack-depth"
so that the length of the option is less than PROP_NAME_MAX.

Bug: 17294224
Change-Id: I5723883d7fa38dd5eaa276182e5d680d152cedad
2014-08-27 15:50:17 +01:00
Calin Juravle
d71de10c42 Update the handling of the native bridge property.
ro.dalvik.vm.native.bridge is expected to be always be set. A value of
"0" means that the native bridge is disabled and that no value should be
passed to the runtime.

Bug: 17104449

(cherry picked from commit 831bd75b2bbc126f02578a967e925271b9cac6d3)

Change-Id: Ib483ac8e96bdc66af2725815807d4deb36fb36ab
2014-08-27 15:00:55 +01:00