219 Commits

Author SHA1 Message Date
Wei Jin
54fc18b925 Add profiler type options
This is related to the CL that adds a new type of profile data.

Change-Id: I3e4e502da8e1b0dd9b32ddcbc5d11eca0d1ba2e5
2014-06-24 12:16:55 -07:00
Calin Juravle
e279cd6d21 Fix the initialization of some profile properties
Change-Id: I959cb53f262cfb9d1621e4cd99bec05514f7f11f
2014-06-19 18:51:47 +01:00
Calin Juravle
994cd28e72 Shrink profiler.start-immediately to fit in the maximum property size
Change-Id: I25f24f5e5b128aa6a300bdc1008427451bd9cecf
2014-06-11 18:21:41 +01:00
Calin Juravle
3f967910d9 Improved profile.start-immediately comment
Change-Id: I41bda6a1cd99cb0a8230961e0462a41cb552887e
2014-06-10 14:52:24 +01:00
Calin Juravle
de99f08f65 Fixed comments related to profile properties.
Change-Id: Idd6de8fe2a193a36cf1ea6bcadacb3289973c5ab
2014-06-09 10:13:55 +01:00
Calin Juravle
9828d067fb Add missing profiler options.
Bug: 12877748

Change-Id: I311b8fb7e15d512e65631bc2a52c443a271d3d3f
2014-06-06 12:55:23 +01:00
Brian Carlstrom
5bc93866b0 Move to dalvik.vm.lib.2 to force default to libart
Bug: 14298175

(cherry-picked from commit 2ef5abb8d534f016582d6023054cbe69d8114b6b)

Change-Id: Icd91982c09076e87092906106cbff4a81589e8de
2014-05-28 14:53:40 -07:00
Mathieu Chartier
c01936a686 Add property for background GC type
To disable background compaction do:
adb shell setprop dalvik.vm.backgroundgctype CMS

To enable:
adb shell setprop dalvik.vm.backgroundgctype SS

Change-Id: I1d87b95fceaedac4df5ce6e718d7c14b35d524cc
2014-05-14 15:45:48 -07:00
Narayan Kamath
22ec1eefa4 Clean up argc / argv processing for runtime args.
- Make copies of argc, argv before argv is potentially
  overwritten with the process name.
- Allow multiple command line arguments to be passed to
  ZygoteInit (this is required for some of the 64 bit
  zygote work).
- Add an explanatory comment about how these argments
  are processed.

Change-Id: I752be69c5c0f97ed17d1a3dded19f46ee00929b0
2014-04-09 13:39:41 +01:00
Narayan Kamath
a23fcd7be8 Remove ProcessState::mArgc,mArgV,mArgLen
These look like historical oddities, and weren't really being
used for anything useful.

Process:setArgV0 was being called by android.util.Process, but
that functionality can be moved directly into the implementation
of that class.

bug: 13647418

Change-Id: I216c8f8a4c065f0cf3a61f19f9e32decd26f93f6
2014-04-03 12:29:07 +00:00
Narayan Kamath
973b4663b0 Move zygote startup logic to the frameworks.
The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
  logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
2014-04-02 10:18:43 +01:00
Dave Allison
07a1e2323b Move options buffers to top scope
It is important that the char buffers for options do
not go out of scope as the mOptions.add() does not copy
the buffer.  This moves all the buffers to the top
level scope of the function to prevent accidental
overwriting when they go out of scope.

Bug: 13448497
Change-Id: I5a97ddd32ff34f237915927906e1e1f833ff036e
2014-03-14 21:15:08 +00:00
Narayan Kamath
b3802a8e23 Remove java.io.tmpdir assignment in AndroidRuntime (again).
This was brought back by a bad merge conflict resolution
in change 0efbd9a463c848118c7685f4bfc8765a82caa761.

Change-Id: I0c7cbe8ee396293619eabf4d0a3c2f06c76bdd6e
2014-03-11 15:02:10 +00:00
Brian Carlstrom
98ba7bd5d1 Only pass -Xprofile-* options to ART
Bug: 13391896
Change-Id: I5d6a3b900c9b20f02e1d4ccb73f712e9260c7dfd
2014-03-10 10:22:10 -07:00
Dave Allison
0efbd9a463 ART profiler usage.
This is a change to add args to some of the profiler related
functions, including installd commands.

Also read properties and set command line options for the runtime
profiling parameters.

Changed calls to isDexOptNeeded() to isDexOptNeededInternal().  This
needs additional arguments passed for profiles.

Bug: 12877748
Change-Id: I1a426c9309d760bac0cf92daa298defee62287c1

Conflicts:
	core/jni/AndroidRuntime.cpp
2014-03-07 12:32:44 -08:00
Brian Carlstrom
3beff1e023 Add dex2oat-flags plumbing to AndroidRuntime
Change-Id: Idaa7e5351e146d76e1972cbe4d93af69f0b999a6
2014-03-04 14:08:46 -08:00
Ashok Bhat
42f06b0e22 Remove unused JNITest class
JNITest class is no longer actively used. This patch
removes the class (java and jni) files.

JNI interfaces and calls are extensively tested in
the art unit tests (art/tests) and in cts (see
CtsJniTestCases).

Change-Id: I62f7c72deb5d206fa3f545ae39a9cb9011110d0a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-21 14:34:35 +00:00
Narayan Kamath
3d03e5b90d Remove java.io.tmpdir assignment in AndroidRuntime.
This value is overridden by the framework anyway
(see ActivityThread.handleBindApplication). Besides,
it doesn't seem like a great idea to let tools clutter
/sdcard/ with temp files.

Change-Id: I26c710cbea7397f89e6103e54a73044a87da95b1
2014-02-14 17:42:24 +00:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Mathieu Chartier
7e4fdec6f0 Add dalvik.vm.gctype to enable switching between different GCs.
The option passes the specified GC type into the Xgc runtime
option.

Currently the three different supported GC types are MS, CMS, SS
which represent mark-sweep, concurrent mark-sweep, mark-sweep +
semi-space hybrid.

Change-Id: I6ad95c8d12c0d1158f7c861ff0c3180761619172
2013-12-02 15:50:18 -08:00
Jeff Sharkey
5aca2b8dc4 Plumb through physical device UUID and label.
vold now parse out UUID and label for inserted physical devices,
and reports them to framework.  Add these to hidden StorageVolume
class for use by DocumentsUI and MediaProvider.

Remove last JNI method in FileUtils!

Bug: 11175082
Change-Id: I1cfcd1ade61767b103f693319ea2600008ee2e3c
2013-10-16 16:34:21 -07:00
Svetoslav
6811f4e92c Move PdfDocument to android.graphics.pdf
1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
2013-09-19 17:12:47 -07:00
Leon Scroggins III
d0d7eaf129 Register jni objs in CreateJavaOutputStreamAdaptor
Write a registration function and call it in AndroidRuntime,
which calls FindClass/GetFieldID only once per class/method.
Use NewGlobalRef for classes that will be checked against later.

BUG:10612755
Change-Id: I25541da1b7bb1cd53a1579ea84c4620e1901310f
2013-09-06 18:27:16 -04:00
Elliott Hughes
d7a90ca50c The VM handles blocking SIGPIPE.
We don't need this any more.

Bug: 10211309

(cherry picked from commit 437e76208d451e7954699ead8931d0fe147bb07d)

Change-Id: I97b3ab4f65a70eacca2fbe95cfb11b1cc85c4021
2013-08-21 16:08:29 -07:00
Mathieu Chartier
e6c2241f7a Launch VM with -XX:LowMemoryMode if ro.config.low_ram is "true".
Bug: 10131789

Change-Id: Ib9962f7becdedd71f48123a4720dcce1d09abb9d
2013-08-20 17:38:24 -07:00
Elliott Hughes
b93489270d Merge "Remove a fixed-length buffer in the wifi code." into klp-dev 2013-08-19 18:08:49 +00:00
Elliott Hughes
a11d574fc6 Remove a fixed-length buffer in the wifi code.
Also increase the size of the buffer we do need, simplify the code, and
fix some of the error checking.

(cherry-pick of 56968581ce77d3c0ee4286da6b0d5548874934b9.)

Bug: http://code.google.com/p/android/issues/detail?id=36193
Bug: 10363597
Change-Id: Iadd2ee25469a37ddf06c3292b675a4cbcc4ecfa3
2013-08-16 14:48:38 -07:00
Jeff Sharkey
da5a3e12f4 Richer ParcelFileDescriptor close events.
When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed.  To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.

The writer end of a pipe or socket can closeWithError() to send a
message to the reader end.  When the reader encounters EOF, they
call checkError() to detect if any error occured.  This also detects
the case where the remote process died without sending a success
message.

This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.

Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.

Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
2013-08-16 14:34:43 -07:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Mathias Agopian
2ca204e4c0 get rid of PixelFormatInfo and simplify things
Change-Id: I487d4eef7db0095ace4babf5bb100a8769711257
2013-07-25 19:25:10 -07:00
Igor Murashkin
70725500dc Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: Ie6f02a7c0952b0f5ebc41905425b15cae221f7d3
2013-06-26 13:19:45 -07:00
Igor Murashkin
36483e9622 Revert "Initial camera device implementation"
This reverts commit 59bc67c732eab53b370b196066e8012d3f6bf09a.

Change-Id: I9e1ce3b9f4af4e2b9b98855c0ca533581c87ea7f
2013-06-25 05:13:55 +00:00
Igor Murashkin
59bc67c732 Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: I183dd47ddd737ec2c3c374e5c3461542a97f09b0
2013-06-24 17:41:10 -07:00
Svetoslav Ganov
b06accf34f Merge "Generate PDF from Canvas." 2013-06-21 20:09:51 +00:00
Brian Carlstrom
9f8203a159 Remove libdvm dependency
Change-Id: I7d37db4e72e9435ecd514340cf61a051dc272f04
2013-06-20 16:34:45 -07:00
Svetoslav Ganov
ff4adde573 Generate PDF from Canvas.
This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Ibac93d7c37b01a376ce7c48238657d8c7698d588
2013-06-19 19:35:38 -07:00
buzbee
b63de6de02 Process new system property for max JIT cache size
To allow low-memory devices to reduce (or eliminate entirely)
the RAM used by the JIT, dalvikvm has a new command-line
option to set the max size of the JIT's translation cache.
In this CL, we pass that new option based on a system property.

Change-Id: I2a01da4d19c1922b6ed52791ee513efef9caf3d4
2013-05-24 13:14:08 -07:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00
Jesse Hall
ce3fe5fd8a am 4d32a367: am 2787ba25: Merge "Register EGLExt JNI methods" into jb-mr2-dev
* commit '4d32a36759b619abdda9c895054f513aef3a3f03':
  Register EGLExt JNI methods
2013-05-07 10:18:38 -07:00
Jesse Hall
237c2b871f Register EGLExt JNI methods
Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
2013-05-06 11:36:59 -07:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Jesse Hall
d877efe3b1 Fix GLES30 JNI registration
Bug: 8657863
Change-Id: I498f32480863b0716b2a8dfce467143087573cce
2013-04-29 16:02:16 -07:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Jeff Brown
c28867a1d6 Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder.  This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
2013-03-26 15:42:39 -07:00
Mathias Agopian
58a1ca6642 Merge "split Surface in two classes: SurfaceControl and Surface" 2013-02-14 20:25:08 +00:00
Mathias Agopian
3866f0d581 split Surface in two classes: SurfaceControl and Surface
SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
2013-02-14 12:19:11 -08:00
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Elliott Hughes
9197d170b7 am fec5f611: Merge "It\'s 2012. We\'re always WITH_JIT."
* commit 'fec5f611fef4fc3b7afa5d7194f4f40d156157ac':
  It's 2012. We're always WITH_JIT.
2012-11-07 10:48:26 -08:00
Elliott Hughes
be8b47f6ce It's 2012. We're always WITH_JIT.
Change-Id: Ia3d1a1b1df06816f2cfa3879ec669b34c62cf9b9
2012-11-06 17:16:21 -08:00
Ian Rogers
7fef2b8a37 Fix target utilization property_get.
Copy and paste error where wrong compare meant the code thought a target
utilization option was specified even if there wasn't one.

b/7062303

Change-Id: Ibf1c6cf72743c5fbec7618a719d12d0373184754
2012-10-01 17:30:32 -07:00