Commit graph

6279 commits

Author SHA1 Message Date
Naseer Ahmed
ca3e2a276a utils: Allow non android namespaces to use ALOGD_IF_SLOW
Change-Id: I9207b64954fae2f56cc5f6aa5796a2e737400623
2013-07-30 13:57:00 -07:00
Nick Kralevich
d30884aa0c Revert "try to fix win_sdk build."
A better change was checked into system/core. See commit
941daef629

This reverts commit fa99d30ec773c5f9653d96570fb8961426bfe966.
2013-07-30 13:57:00 -07:00
Nick Kralevich
0656c9764a try to fix win_sdk build.
Change-Id: I55e78e339874a6d6a3381c2550556b65c7ec1ca0
2013-07-30 13:57:00 -07:00
Marco Nelissen
99ec303e45 Add NULL check to CallStack::toString
CallStack::toString() has a 0 default argument, which ends up getting
passed to strlen(), resulting in a crash.

Change-Id: If706aff8c400983670f49cdbb66e11191ac76e0e
2013-07-30 13:57:00 -07:00
Chris Craik
551fcf4fe3 Add LinearAllocator
Moving from external/webkit/Source/WebCore/platform/graphics/android/utils/

Change-Id: If91830aa9b207dbc8692b2ca7c4a0b76778addd5
2013-07-30 13:57:00 -07:00
Igor Murashkin
a27c1e0839 utils: fix warnings for unused parameters
Change-Id: Ibfb755a30ba2923669060fe0aed019beecbe38a1
2013-07-30 13:57:00 -07:00
Alex Ray
fcb349ff75 utils: clarify scoped tracing functionality
ScopedTrace objects were being used in place of ATRACE_NAME because of a
misunderstanding of it's function.  Cleared up documentation for usage.

Also explicitly use global namespace for sysprop callback.

Change-Id: I7c248b486b614ccdb841659ca0dcfc644fda670a
2013-07-30 13:57:00 -07:00
Chad Jones
0a19c906f2 Remove copy of atrace imported to wrong location 2013-07-30 13:57:00 -07:00
Alex Ray
5b2d36e38a utils: Use cutils tracing functionality.
Tracing functionality has moved to cutils.

Change-Id: Ie78ccc1d59dd5178f5058fbc3858a37f9adce552
2013-07-30 13:57:00 -07:00
Romain Guy
5ca402a4e2 Add LruCache::Iterator
Required by libhwui

Change-Id: I164b9a4a82d89d132da01a56535c0df084de86f7
2013-07-30 13:57:00 -07:00
Romain Guy
bdce9baa88 Add another ifndef and a couple of methods to LruCache
The new methods on LruCache are needed by libhwui to manage
the cache of paths.

Change-Id: If54fa325c54e2b04e7fe5dfe6dad66066c40127c
2013-07-30 13:57:00 -07:00
Romain Guy
b3176acd5f Add #ifndef to prevent multiple definitions
Change-Id: Ib861eee0f333fe29290437b7e67623622d8dabd0
2013-07-30 13:57:00 -07:00
Andy McFadden
45ad8f44d0 Reduce emulator logspam
The emulator doesn't support systrace, but we should point that out
at most once per process.

Bug 7436352

Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
2013-07-30 13:57:00 -07:00
Raph Levien
b6ea175b6b Add an LRU cache plus hashing primitives
This patch adds a hashtable-based LRU cache. This should be
significantly higher performance than the GenerationCache it is intended
to replace. It is a large part of the fix for bug 7271109
TextLayoutCache low-level performance issues.

We added a new method to BasicHashtable to detect when rehashing is
needed, because the internal linked list pointers would get invalidated
by that rehashing.

Also, the hash_type specialized to pointers had a small flaw.

Change-Id: I950c2083f96519777b851dbe157100e0a334caec
2013-07-30 13:57:00 -07:00
Glenn Kasten
fe34e45c21 Continue removing property debug.sys.noschedgroups
Also 0 means gettid() for get_sched_policy() and set_sched_policy().

Change-Id: Ic12edc3df6c9b3e99eae5cffaf9f6fe56cf14043
2013-07-30 13:57:00 -07:00
Jason Simmons
61db1669f4 Ensure that Vector::erase() returns a valid iterator
Vector::erase may reallocate the Vector's storage while removing an element.
However, erase() calls begin() before calling removeItemsAt(), thus caching
a pointer the the Vector's old storage.  If the storage is reallocated,
the iterator returned by erase() will be based on the old storage pointer
and will thus be invalid.

Change-Id: I2450c55fd418e6b1c558a4ca7c024573abbaa098
2013-07-30 13:57:00 -07:00
Dave Burke
d49555291a Revert "Revert "put back the unused virtuals in Vector<>""
This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3

Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
2013-07-30 13:57:00 -07:00
Romain Guy
3fc49adfd2 Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
2013-07-30 13:57:00 -07:00
Kenny Root
b9fd6f9864 Add TEMP_FAILURE_RETRY to ZipUtils
Change-Id: I275c415f14eeffaf9a58d45f3ea014d766441ec3
2013-07-30 13:57:00 -07:00
Kenny Root
5625087e6e Add TEMP_FAILURE_RETRY around open and write calls
Bug: 7330849
Change-Id: I9aef3c3d3a248c3eea7ca060124ad6decaa6b4da
2013-07-30 13:57:00 -07:00
Kenny Root
2fe13f185d Update tests for new build target
Change-Id: Ia1740d1b2c0b611c4559c5c846b12fb5c3e81b07
2013-07-30 13:57:00 -07:00
Ben Cheng
f4722b5910 Disable the use of clock_gettime for now.
Bug: 7100774
Change-Id: I6ede2a37a5d485134fe419b5dc766f70ae4af9d4
2013-07-30 13:57:00 -07:00
Ben Cheng
ad0a959aee Print warnings when backwards timestamps are detected.
Bug: 7100774

Change-Id: I752fd1680b32ce33d17d6042d6c82e27d7ba9dd2
2013-07-30 13:57:00 -07:00
Mathias Agopian
e79aadd143 minor SharedBuffer clean-up
Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
2013-07-30 13:57:00 -07:00
Mathias Agopian
919fa297fe Add a way to retrieve a Region as a SharedBuffer
Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
2013-07-30 13:57:00 -07:00
Mathias Agopian
11b9acf765 Revert "put back the unused virtuals in Vector<>"
This reverts commit 1648d4c13ba2eff3ea14cd87ee94028458a39f97.

Bug: 6977192

Change-Id: Idbb6b239aaed4fb1c054ce943f6ba06ede3492bb
2013-07-30 13:57:00 -07:00
Tareq A. Siraj
cacf429b56 Fixed clang build error for libgui
Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
2013-07-30 13:57:00 -07:00
Mathias Agopian
8d0c1a0316 put back the unused virtuals in Vector<>
some binaries are using these private APIs and broke
(as they should!) with this change. Temporarily restore the
virtuals to work around this.

Bug: 6977550
Change-Id: I7c37f24b16e4d586b89205c493db5169cf87e024
2013-07-30 13:57:00 -07:00
Mathias Agopian
156eb98091 get rid of mirrorItemAt() which isn't used anywhere
Change-Id: Id6f2dbeed21cabc127d39538c0ff464077ada83f
2013-07-30 13:57:00 -07:00
Mathias Agopian
2497a1524d improve [un]marshalling of non-binder objects
this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
2013-07-30 13:57:00 -07:00
Jeff Brown
6454f46166 Add a very simple helper function to log slow functions.
Change-Id: I2e2e072206d02b572a330dd25857c161b5b563bf
2013-07-30 13:57:00 -07:00
Mathias Agopian
bdf73c7efc improve Vector<> safety checks
- make errors that will always cause a memory corruption always fatal
  (for eg: KeyedVector<>::editValue{For|At}() failure)
- make other errors fatal in debug mode, those that can be caught by
  the caller.
- fix typos

Change-Id: I65cc7d81035c37ce2906fc4500c50e5d5b5c49eb
2013-07-30 13:56:59 -07:00
Mathias Agopian
5363183d2a libutils cleanup: remove unused or seldom used code from misc.{cpp|h}
Change-Id: I72206f16619d81887e3b85603494563faab3b445
2013-07-30 13:56:59 -07:00
Mathias Agopian
67b5851491 We now have a real list of displays.
displays can be dynamically added or removed, and the
list is part of the SF's transaction.

Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
2013-07-30 13:56:59 -07:00
Nick Pelly
af1e7b7721 Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.
Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807
2013-07-30 13:56:59 -07:00
Mathias Agopian
e6bee12f94 one more step towards multiple display support
- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
2013-07-30 13:56:59 -07:00
John Grossman
885a2fe3b5 Utils: Fix a bug in the linear transformation code.
Hand merge from ics-aah

> Utils: Fix a bug in the linear transformation code.
>
> Fix a bug where an incorrect result would be computed if you used the
> linear transformation code to do a reverse transformation (from B's
> domain into A's domain) when the scaler fraction was negative.
>
> Change-Id: I8e5f109314d235a177ab41f65d3c4cd08cff78be
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: Id90e18f685c61c1a89fd91c32adcf01363b3e8f3
Signed-off-by: John Grossman <johngro@google.com>
2013-07-30 13:56:59 -07:00
Jeff Brown
dd1b0378ce Support looper callbacks based on smart pointers.
Bug: 6559630
Change-Id: I5a667f219f431838638acefbc9fa6afa610971bd
2013-07-30 13:56:59 -07:00
Eino-Ville Talvala
970701fbd2 Add camera as an ATRACE tag
Change-Id: Ib4f22d593836c4b973d122efa114d359f1529914
2013-07-30 13:56:59 -07:00
Jeff Brown
5705e69825 Delete unused poll() code.
We don't need this code anymore and it is just in the way.

Bug: 6559630
Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
2013-07-30 13:56:59 -07:00
Jeff Brown
55195d745c Remove unused statistics code.
Bug: 6559630
Change-Id: Iacdf4bb4c1c125c09305cbd8cb443c7c80cfc010
2013-07-30 13:56:59 -07:00
Mathias Agopian
03b168a69b fix a corruption in Vector<> when adding new items
would happen when vectors are copied and new items is
added in both vectors. we didn't duplicate the underlying
storage when adding items in vectors.

Bug: 6515797
Change-Id: If544c07d96c05821e088d7f2c9b5736f7e306c31
2013-07-30 13:56:59 -07:00
Jamie Gennis
69fc3d4e1e libutils: add a tracing tag for video
Change-Id: Icbecc7184844e95ee81a558b0a54d5513d5cf59f
2013-07-30 13:56:59 -07:00
Glenn Kasten
2b1d4999b8 Workaround for add_tid_to_cgroup failed to write
Bug: 6467109
Change-Id: I6dff8e608d83c7a7c453c25c94ad100f113769b9
2013-07-30 13:56:59 -07:00
Dianne Hackborn
c1309d74e8 Add callback hack to find out when to reload system properties.
Every IBinder object can accept a new transaction to tell it that
it might want to reload system properties, and in the process
anyone can register a callback to be executed when this happens.

Use this to reload the trace property.

This is very much ONLY for debugging.

Change-Id: I55c67c46f8f3fa9073bef0dfaab4577ed1d47eb4
2013-07-30 13:56:59 -07:00
Dianne Hackborn
6c1cf1c8f2 Change name of system property for traces.
This allows the property to be changed from the settings UI.

Change-Id: Ife7424b3549e5bbe51b6ad2fb8e5edde3a9fd608
2013-07-30 13:56:59 -07:00
Glenn Kasten
7e6e7e0a54 Add audio tag to systrace
Change-Id: I4a558c43e4ccd81a4ed94684c5fad6b3c486bd14
2013-07-30 13:56:59 -07:00
Andy Stadler
90dd9e188e Add System Tracing capability to Sync Manager
See also: Change-Id: Ia8bc01adbba345a568405b0ac8ade96e56b40cc1

Change-Id: I2678974cf85464fbc09072b06f647a0787e6e23f
2013-07-30 13:56:59 -07:00
Andrew Hsieh
e8e5dc5478 Fixed 64-bit porting issues
Fixed two issues about casting between int and pointer which
cause compilation error in 64-bit mode (eg. for 64-bit emulator)

Change-Id: I5ca9a933a239db73e56d6f27de05aa42bd06a650
2013-07-30 13:56:59 -07:00
Dianne Hackborn
265743abde Add traces for window manager and activity manager.
Change-Id: I6677ca64164f234efc7856ddd173ad6989b4f59e
2013-07-30 13:56:59 -07:00