summaryrefslogtreecommitdiffstats
path: root/libs/utils
Commit message (Collapse)AuthorAgeFilesLines
* improved CallStack a bitMathias Agopian2013-03-212-10/+13
| | | | | | | - added a ctor that updates and dumps the stack immediately - added a "logtag" parameter to dump() Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
* disable RefBase consistency checks (NDEBUG)Mathias Agopian2013-03-191-1/+1
| | | | | Bug: 8328715 Change-Id: Ib57646ff909fd8744610f37f3b50d90d884dff31
* Fix a crasher with RefBase debugging and vectors of wp<>Mathias Agopian2013-03-191-9/+15
| | | | | | | | | | | | | | | | | | | | | | | background: we have some code to fix-up the IDs of references when using RefBase's DEBUG_REFS when those refs are managed by arrays wp<> or sp<> (this is because wp<> / sp<> don't have a trivial ctor when DEBUG_REFS is enabled, and Vector treats them as trivial for obvious performance reasons) this is complicated by the fact that we don't want to have to recompile everything when enabling DEBUG_REFs (i.e.: the Vector code cannot know wheter it's enabled or not for its template stuff). problem: there was a bug in the fix-up code for wp<> which was trying to access the weakref_impl from the RefBase* however, this was moronic since RefBase could have been destroyed if there wasn't any more strong refs -- and this happned. Instead we need to get the weakref_impl directly from the wp<> Change-Id: Ie16e334204205fdbff142acb9faff8479a78450b
* A few tweaks to RefBase debuggingMathias Agopian2013-03-181-17/+11
| | | | | | | | | | | | | - stacks are now saved in /data/debug which must be created and writable by the user. - removed "always fatal" DEBUG_REFS option, it wasn't really needed. - DEBUG_REFS_ENABLED_BY_DEFAULT is not the default anymore (usually people want to target which refs they're tracking) Change-Id: I37fae72e9dacde6ce1fa8f7dbe2bc01b1a1b95e5
* Add Vector::resize()Jesse Hall2013-03-151-0/+10
| | | | | Bug: 8384764 Change-Id: Icee83d389f3e555eba7d419b64c8d52a9aa21b8b
* fix a couple race-conditions in RefBase::promote()Dianne Hackborn2013-03-141-26/+67
| | | | | Bug: 8390295 Change-Id: I7a48e3bf5b213cc1da2b8e844c6bb37ee24cb047
* temporary: enable ASSERTs in RefBaseMathias Agopian2013-03-111-0/+1
| | | | | | | this is in an attempt to get more data on bug 8328715. Change-Id: I9333a67c2d7f67f4d9b2fc5eb1ad8a7b2d1c6dcb
* Merge "Add Thread::isRunning and Condition::signal(WakeUpType)" into jb-mr2-devRomain Guy2013-03-111-0/+5
|\
| * Add Thread::isRunning and Condition::signal(WakeUpType)Romain Guy2013-03-111-0/+5
| | | | | | | | | | | | | | The signal() method is useful to choose whether to wake up one or all threads. Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
* | rename binder services main thread to Binder_*Mathias Agopian2013-03-071-18/+22
| | | | | | | | | | | | | | | | | | | | | | When a binder service's main thread joins the thread pool it retains its name (whatever the exec name was), which is very confusing in systrace. we now rename that thread just like its friends in the thread pool. Change-Id: Ibb3b6ff07304b247cfc6fb1694e72350c579513e
* | Fix RefBase debugging. O_CREAT must specify the mode.Mathias Agopian2013-03-061-1/+1
|/ | | | Change-Id: I51c6df3cfd59b20ca73c3edee86bc2f74dbde1b1
* Revert "try to fix win_sdk build."Nick Kralevich2013-02-021-1/+1
| | | | | | | A better change was checked into system/core. See commit 941daef629bd571032851edf7ae1dce24266640e This reverts commit fa99d30ec773c5f9653d96570fb8961426bfe966.
* try to fix win_sdk build.Nick Kralevich2013-02-011-1/+1
| | | | Change-Id: I55e78e339874a6d6a3381c2550556b65c7ec1ca0
* Add NULL check to CallStack::toStringMarco Nelissen2012-12-171-1/+3
| | | | | | | CallStack::toString() has a 0 default argument, which ends up getting passed to strlen(), resulting in a crash. Change-Id: If706aff8c400983670f49cdbb66e11191ac76e0e
* Add LinearAllocatorChris Craik2012-12-052-0/+232
| | | | | | Moving from external/webkit/Source/WebCore/platform/graphics/android/utils/ Change-Id: If91830aa9b207dbc8692b2ca7c4a0b76778addd5
* utils: clarify scoped tracing functionalityAlex Ray2012-11-301-1/+1
| | | | | | | | | 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
* utils: Use cutils tracing functionality.Alex Ray2012-11-291-45/+5
| | | | | | Tracing functionality has moved to cutils. Change-Id: Ie78ccc1d59dd5178f5058fbc3858a37f9adce552
* am 41f7736a: am 434e21bf: am 3fdeb48e: Reduce emulator logspamAndy McFadden2012-11-091-2/+2
|\ | | | | | | | | * commit '41f7736ad1e72df8796416a82ce3cede6193d1eb': Reduce emulator logspam
| * am 434e21bf: am 3fdeb48e: Reduce emulator logspamAndy McFadden2012-11-091-2/+2
| |\ | | | | | | | | | | | | * commit '434e21bfd6b14f8d99b9bcdb829e7252edd574f3': Reduce emulator logspam
| | * Reduce emulator logspamAndy McFadden2012-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The emulator doesn't support systrace, but we should point that out at most once per process. Bug 7436352 Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
* | | Merge "Add an LRU cache plus hashing primitives"Raph Levien2012-10-295-1/+358
|\ \ \ | |/ / |/| |
| * | Add an LRU cache plus hashing primitivesRaph Levien2012-10-265-1/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 04075569: Revert "Revert "put back the unused virtuals in Vector<>""Dave Burke2012-10-251-0/+19
|\ \ \ | |/ / |/| / | |/ | | * commit '04075569b565c949a6db8b4e8a9f10d281de4d9c': Revert "Revert "put back the unused virtuals in Vector<>""
| * Revert "Revert "put back the unused virtuals in Vector<>""Dave Burke2012-10-251-0/+19
| | | | | | | | | | | | This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3 Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
* | am 125becee: am 7abbbc68: Merge "Add TEMP_FAILURE_RETRY to ZipUtils"Kenny Root2012-10-162-27/+7
|\ \ | | | | | | | | | | | | * commit '125beceefd44f6abd17ff336bb989e1850965bd8': Add TEMP_FAILURE_RETRY to ZipUtils
| * | Add TEMP_FAILURE_RETRY to ZipUtilsKenny Root2012-10-162-27/+7
| | | | | | | | | | | | Change-Id: I275c415f14eeffaf9a58d45f3ea014d766441ec3
* | | am 9bdaa60b: Merge "Add TEMP_FAILURE_RETRY around open and write calls" into ↵Kenny Root2012-10-121-5/+8
|\ \ \ | | |/ | |/| | | | | | | | | | | | | jb-mr1-dev * commit '9bdaa60b809b223d14619d1f13afdd38acb1738d': Add TEMP_FAILURE_RETRY around open and write calls
| * | Add TEMP_FAILURE_RETRY around open and write callsKenny Root2012-10-121-5/+8
| | | | | | | | | | | | | | | Bug: 7330849 Change-Id: I9aef3c3d3a248c3eea7ca060124ad6decaa6b4da
* | | am ee42072b: am 52f1edb3: Merge "Update tests for new build target"Kenny Root2012-10-021-27/+15
|\ \ \ | |/ / |/| / | |/ | | * commit 'ee42072bcccab880dd685736a32a56ac62ffc331': Update tests for new build target
| * Update tests for new build targetKenny Root2012-10-021-27/+15
| | | | | | | | Change-Id: Ia1740d1b2c0b611c4559c5c846b12fb5c3e81b07
* | Disable the use of clock_gettime for now.Ben Cheng2012-09-191-1/+9
| | | | | | | | | | Bug: 7100774 Change-Id: I6ede2a37a5d485134fe419b5dc766f70ae4af9d4
* | Print warnings when backwards timestamps are detected.Ben Cheng2012-09-161-5/+55
| | | | | | | | | | | | Bug: 7100774 Change-Id: I752fd1680b32ce33d17d6042d6c82e27d7ba9dd2
* | minor SharedBuffer clean-upMathias Agopian2012-08-311-7/+7
| | | | | | | | Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
* | Revert "put back the unused virtuals in Vector<>"Mathias Agopian2012-08-241-19/+0
| | | | | | | | | | | | | | | | This reverts commit 1648d4c13ba2eff3ea14cd87ee94028458a39f97. Bug: 6977192 Change-Id: Idbb6b239aaed4fb1c054ce943f6ba06ede3492bb
* | put back the unused virtuals in Vector<>Mathias Agopian2012-08-201-0/+19
| | | | | | | | | | | | | | | | | | 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
* | Add a very simple helper function to log slow functions.Jeff Brown2012-08-102-0/+38
| | | | | | | | Change-Id: I2e2e072206d02b572a330dd25857c161b5b563bf
* | improve Vector<> safety checksMathias Agopian2012-08-101-31/+22
| | | | | | | | | | | | | | | | | | | | - 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
* | libutils cleanup: remove unused or seldom used code from misc.{cpp|h}Mathias Agopian2012-08-052-102/+19
| | | | | | | | Change-Id: I72206f16619d81887e3b85603494563faab3b445
* | Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.Nick Pelly2012-07-192-15/+26
| | | | | | | | Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807
* | Utils: Fix a bug in the linear transformation code.John Grossman2012-06-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | am d5085da3: am 4467bba7: Merge "Support looper callbacks based on smart ↵Jeff Brown2012-05-311-12/+36
|\ \ | |/ | | | | | | | | | | pointers." into jb-dev * commit 'd5085da3c0c103bba0c2c927382f7d414275b661': Support looper callbacks based on smart pointers.
| * Support looper callbacks based on smart pointers.Jeff Brown2012-05-311-12/+36
| | | | | | | | | | Bug: 6559630 Change-Id: I5a667f219f431838638acefbc9fa6afa610971bd
* | am 80586761: am dad23789: Merge "Delete unused poll() code." into jb-devJeff Brown2012-05-311-139/+0
|\ \ | |/ | | | | | | * commit '805867612c0c11d3bb494cbf454cbb2de21a1b75': Delete unused poll() code.
| * Delete unused poll() code.Jeff Brown2012-05-301-139/+0
| | | | | | | | | | | | | | We don't need this code anymore and it is just in the way. Bug: 6559630 Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
* | am dce1547d: am 9e2e781a: Merge "Remove unused statistics code." into jb-devJeff Brown2012-05-311-68/+0
|\ \ | |/ | | | | | | * commit 'dce1547d65877b89cec4e52ee8e5b39830911d00': Remove unused statistics code.
| * Remove unused statistics code.Jeff Brown2012-05-301-68/+0
| | | | | | | | | | Bug: 6559630 Change-Id: Iacdf4bb4c1c125c09305cbd8cb443c7c80cfc010
* | am e0607f05: am 5aed6843: Merge "fix a corruption in Vector<> when adding ↵Mathias Agopian2012-05-213-1/+77
|\ \ | |/ | | | | | | | | | | new items" into jb-dev * commit 'e0607f0507fe647bd9262facfaf75146c074e933': fix a corruption in Vector<> when adding new items
| * fix a corruption in Vector<> when adding new itemsMathias Agopian2012-05-173-1/+77
| | | | | | | | | | | | | | | | | | 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
* | am f30fd014: Merge "Workaround for add_tid_to_cgroup failed to write" into ↵Glenn Kasten2012-05-101-1/+3
|\ \ | |/ | | | | | | | | | | jb-dev * commit 'f30fd01497a53cbff8692721026c3f7b6830158e': Workaround for add_tid_to_cgroup failed to write
| * Workaround for add_tid_to_cgroup failed to writeGlenn Kasten2012-05-101-1/+3
| | | | | | | | | | Bug: 6467109 Change-Id: I6dff8e608d83c7a7c453c25c94ad100f113769b9