340 Commits

Author SHA1 Message Date
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
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
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
Calin Juravle
9b5112c36b Merge "Make native bridge property read-only." 2014-08-27 13:19:20 +00:00
Calin Juravle
be20ed41f7 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
Change-Id: I94e60c68e732abdab18f14f960d3b80f32048a79
2014-08-26 23:15:23 +01:00
Calin Juravle
685a12b446 Make native bridge property read-only.
Bug: 17104449

(cherry picked from commit 53db6ae7819177abb9df156b269726a69a8c72df)

Change-Id: I926356f1e472a20d571e40c0c7dbb9c5a66a44a9
2014-08-26 20:07:51 +01:00
Calin Juravle
53db6ae781 Make native bridge property read-only.
Bug: 17104449
Change-Id: If2e2a0c2cd1783883ef34d25a527ee93f9eadfa5
2014-08-18 16:56:08 +01:00
Brian Carlstrom
1567d2f0b7 Disable verification based on vold.decrypt. [frameworks/base]
Bug: 15165413

(cherry picked from commit 6d05323e97e98022be7fc1a803115e2628f2d1f4)

Change-Id: I5454488a9db0fd70c64e8fc78b622c56ea96e6fd
2014-08-15 10:08:16 -07:00
Brian Carlstrom
261e240c05 Merge "Disable verification based on vold.decrypt. [frameworks/base]" into lmp-dev 2014-08-15 05:27:16 +00:00
Brian Carlstrom
df6c83fa7b Disable verification based on vold.decrypt. [frameworks/base]
Bug: 15165413
Change-Id: I7aff8e2a2890971fe97769d42121c207dc36aa7c
2014-08-15 09:58:03 -07:00
Narayan Kamath
29564cd245 Remove system_server classes from the boot image.
We set the system_server classpath in the environment
(like we do with BOOTCLASSPATH). After the zygote forks
the system_server, we dexopt the classpath (if needed)
and then launch the system server with the correct
PathClassLoader. This needed several small / medium
refactorings :

- The logic for connecting to installd is now in a separate
  class and belongs in the system_server.
- SystemService / SystemServiceManager have now moved to
  classes.jar. They are only used from there, and since they
  use Class.forName, we want them to be loaded by the
  system_server classloader, and not the bootclassloader.
- BootReceiver now moves to frameworks.jar, because it is
  used by ActivityThread and friends.

bug: 16555230

Change-Id: Ic84f0b2baf611eeedff6d123cb7191bb0259e600
2014-08-15 13:37:03 +01:00
Calin Juravle
2f4cf2cfd1 Pass the name of the native bridge library to the runtime
Bug: 16843953
Change-Id: Ia0f57a9b3e30a74fe4e93eb4453f841c1ef512eb
2014-08-08 18:45:19 +01:00
Calin Juravle
01db916970 Pass the name of the native bridge library to the runtime
Bug: 16843953

(cherry picked from commit 2f4cf2cfd1125abfe928d6137f3d1553b0888f61)

Change-Id: I223f9041e424be024265e46bcff19cd9dfd18dfc
2014-08-11 11:37:17 +01:00
Brian Carlstrom
ce5bbbea08 Move image classes options from art to AndroidRuntime [frameworks/base]
Bug: 15165413

(cherry picked from commit 108166c749f0418d45f220419a9611c4afec1311)

Change-Id: Ib0d638ac3ca6668a5be04cdbdfd46740dabeceaa
2014-08-06 22:25:01 -07:00
Brian Carlstrom
0d8fb01963 Disable compilation based on vold.decrypt. [frameworks/base]
Bug: 15165413

(cherry picked from commit 4fd561637a173c7fa6a1d71e9115db1db90514ff)

Change-Id: I2a13b63f9d4a7ffd69a8d21666c6dce84739c6ed
2014-08-06 22:25:01 -07:00
Brian Carlstrom
3fbfbb4ade Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]
This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413

(cherry picked from commit f60d3a4702f6d00d7edb5d348c53b9b03ae16b76)

Change-Id: I293c81ba817e9abbf9c05b3fb554ef2f0ad0c4ed
2014-08-06 22:25:00 -07:00
Brian Carlstrom
108166c749 Move image classes options from art to AndroidRuntime [frameworks/base]
Bug: 15165413
Change-Id: I69c064b05f62a2e8a3801dc924f5b032dedc8e51
2014-07-31 14:27:29 -07:00
Brian Carlstrom
4fd561637a Disable compilation based on vold.decrypt. [frameworks/base]
Bug: 15165413
Change-Id: I1972c5af5f392c2ed247888ef33c03e9ffe4d588
2014-07-31 14:27:29 -07:00
Brian Carlstrom
f60d3a4702 Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]
This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413
Change-Id: I1676987c69a3cad4217dc4b56465ef3ae886122a
2014-07-31 14:27:29 -07:00
Neil Fuller
3b852e3489 Rewriting android.text.format.Time without the native _tz functions
(cherry picked from commit d7f0849b8c053ccc6abf0dc7d5bc07da502782a4)
Bug: 15765976

Change-Id: I00f72bd1043ef20f22d25559206b2f741334ba9c
2014-07-24 11:37:20 +01:00
Neil Fuller
d7f0849b8c Rewriting android.text.format.Time without the native _tz functions
Bug: 15765976
Change-Id: I666b72ecf9da8a9dcfb97cc503006b415909a558
2014-07-22 15:06:16 +01:00
destradaa
a4fa3b5aa5 Add support in the platform for Activity Recognition Hardware.
Change-Id: I7c4fff3526583475a5edf1f4ba8fede4e9419ead
2014-07-11 15:58:36 -07:00
Eino-Ville Talvala
e1f57d6f44 Camera2: Add CPU/GPU overhead measurement to legacy mode
Dumps GL and CPU processing duration and frame timestamps to a file,
whenever the device is closed or the stream configuration is changed.

- Add PerfMeasurement class to legacy mode
- Wire up minimal usage to SurfaceTextureRenderer

Change-Id: Ic9d74ca26f706780b746175aa615c7aae4ae52e7
2014-07-10 23:49:07 +00:00