summaryrefslogtreecommitdiff
path: root/libs/utils
AgeCommit message (Collapse)Author
2012-03-07remove files that moved to frameworks/native Mathias Agopian
Change-Id: I140d291e520097b1148930f736823650e08488f7
2012-02-29Merge "Fixed several 64-bit porting issues" Andrew Hsieh
2012-02-27Fixed several 64-bit porting issues Andrew Hsieh
1. Use "%zu" instead of "%d" for size_t in printf 2. Variable precision specifier (eg. "%.*s") in printf should be of type int. (iov_len is size_t which is 64-bit when compiled with -m64) 3. Use PRId64 instead of "%lld" to print variables of type int64_t Change-Id: I2be40a6514b5dffa0038d62b9bccc3401b8756e6
2012-02-26libutils: add a system-wide tracing utility Jamie Gennis
This change adds some utility functionality for doing userland tracing into the kernel trace log. Change-Id: Id0a8cee9ea515b1d8765afd1cecf472a88b4b9e8
2012-02-20frameworks/base refactoring Mathias Agopian
create the new libandroidfw from parts of libui and libutils Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
2012-02-17frameworks/base refactoring. Mathias Agopian
step 2: move libutils headers to their new home: androidfw Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17libs/utils: replace malloc() + memset() to zero with calloc() Iliyan Malchev
Change-Id: I8bdf4360147e51e35c162856c9a859aed6acac34 Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-02-02Merge "Thread::getTid returns pid_t gettid() after run" Glenn Kasten
2012-01-31aapt now sorts the strings in the resource string pool. Dianne Hackborn
In our current environment with very many translations, this can save a lot of RAM -- for example over 200K in Gmail just by sorting the strings in the Gmail .apk (not the framework). Also add a new aapt command to print the contents of the resource table string pool. Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2012-01-17Thread::getTid returns pid_t gettid() after run Glenn Kasten
This is needed when the parent or any other thread besides the child needs access to the child's kernel tid. Change-Id: Ib148505913eb78314cfd76657c30d7b20663dffd
2012-01-09Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
2012-01-08Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-06Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2012-01-04Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-03Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2011-11-22Add a basic hashtable data structure, with tests! Jeff Brown
The basic hashtable is intended to be used to support a variety of different datastructures such as map, set, multimap, multiset, linkedmap, generationcache, etc. Consequently its interface is fairly primitive. The basic hashtable supports copy-on-write style functionality using SharedBuffer. The change introduces a simple generic function in TypeHelpers for specifying hash functions. The idea is to add template specializations of hash_type<T> next to the relevant data structures such as String8, String16, sp<T>, etc. Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
2011-11-21Use libcorkscrew to format the stack trace. Jeff Brown
Change-Id: I3a5439ada76bc77c2dd491eaed2272e16a811cc7
2011-11-04Merge "Slight change to the unwinder API." Jeff Brown
2011-11-03Slight change to the unwinder API. Jeff Brown
Change-Id: I5424de76a21b74842e004e0281936b3f492d3c7a
2011-11-03am 236aea35: Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1 Jamie Gennis
* commit '236aea3579787961fdd41d87574760b63323c0c1': BlobCache: implement cache serialization BlobCache: remove the mutex locking
2011-10-31BlobCache: implement cache serialization Jamie Gennis
This change adds serialization and deserialization functionality to BlobCache, conforming to the Flattenable interface. Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
2011-10-31BlobCache: remove the mutex locking Jamie Gennis
This change removes the mutex from the BlobCache class. The caller must be responsible for thread synchronization in order to properly implement the Flattenable interface, which is coming soon. Otherwise would be the potential for the cache contents to change between the call to the getFlattenedSize and flatten methods. Because the caller must do this synchronization anyway there's no reason to also some synchronization inside BlobCache. Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
2011-10-26Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2011-10-25Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE Steve Block
See https://android-git.corp.google.com/g/#/c/141576 Bug: 5449033 Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
2011-10-22Use libcorkscrew for stack unwinding. Jeff Brown
Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
2011-10-20add -ldl to host executables Iliyan Malchev
This fixes the build on Linux when RefBase is compiled with reference tracking enabled. Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3 Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-07Fix regression in CursorWindow.copyStingToBuffer. Jeff Brown
Bug: 5332296 Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
2011-09-28may fix the build Mathias Agopian
Change-Id: I065b1e6652f0e800ba5674a6d9aa954c3ac6c790
2011-09-16Fix androidGetThreadPriority for non-pthread configurations. Andreas Huber
related-to-build Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
2011-09-16A new API "androidGetThreadPriority" Andreas Huber
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-07Resurrect verbose binder logging Andy McFadden
Updated the command name lists, and masked off the additional bits in the command word when doing the name lookup. Made descriptor values easier to grep for and consistent with kernel output (i.e. decimal rather than hex). Attempt to show transaction descriptors as such (they're in a union with a pointer). Also, the writeLines() function in Static was using a no-op logging call to write an iovec. It looks like all callers are using N=1, so I just added a log for the first string. Bug 5155269 Change-Id: I417b8d77da3eb6ee1d2069ba94047210f75738bc
2011-08-29Merge "Add C++ thread API androidGetThreadSchedulingGroup" Glenn Kasten
2011-08-11fix a memory leak and memory corruption in RefBase Mathias Agopian
we would leak a weakref_impl if a RefBase was never incWeak()'ed. there was also a dangling pointer that would cause memory corruption and double-delete when a custom destroyer was used to delay the execution of ~RefBase. it turns out that the custom destroyer feature caused most of the problems, so it's now gone. The only client was SurfaceFlinger who now handles things on its own. RefBase is essentially back its "gingerbread" state, but the code was slightly cleaned-up. Bug: 5151207, 5084978 Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
2011-07-27Merge "Move extract native libraries to JNI code" Kenny Root
2011-07-26Move extract native libraries to JNI code Kenny Root
The built-in ZipFile class was quite a long time to find an unpack libraries. Move everything to using the libutils ZipFileRO class that goes quite a bit faster. Initial measurements are 6 times faster than the Java code. Also, read files off the disk and compare their CRC against the APK's CRC to see if we need to write the new file to disk. This also cuts down the bootup time by up to a second per APK that has native files. Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
2011-07-25am 64ed1059: am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap ↵ Kenny Root
generation even if name lookup fails." * commit '64ed105957098a900d58e7c2598e060cb37755ce': Continue idmap generation even if name lookup fails.
2011-07-25am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even ↵ Kenny Root
if name lookup fails." * commit 'e612c881ecf74770098aa9c07d4f0611ac982038': Continue idmap generation even if name lookup fails.
2011-07-21am 3cf03987: Merge "Continue idmap generation even if name lookup fails." Kenny Root
* commit '3cf039876177b5b314b635bb12a1dae1b42f4605': Continue idmap generation even if name lookup fails.
2011-07-20Remove unimplemented memory pool. Jeff Brown
dlmalloc does such a great job that we don't need a pool anyways. Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
2011-07-14Add a call to pthread_attr_destroy to avoid potential memory leaks. Le-Chun Wu
Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7
2011-07-14Minor code cleanups in vector. Jeff Brown
Fixed a potential bug where calling replaceAt with a reference to an existing element in the vector at the same index would cause the element to be destroyed while being copied to itself. Refactored the conditions in _grow and _shrink for clarity. The computations are exactly the same but I think it reads better this way. In particular, the ssize_t variable 's' is gone: it didn't need to be signed anyways because its value could never be negative. Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
2011-07-14Replace Vector _grow/_shrink checks with assert. Jeff Brown
On review of the code, _grow and _shrink are checking for conditions that cannot happen and that don't even really make sense. For example, if _shrink is called with where + amount > mCount then this is really bad, however the check only considered the case when where >= mCount and then it would arbitrarily choose a new value for where. Huh? As it happens, the callers are correctly validating the arguments before passing them down to these methods so we can get rid of this code. Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
2011-07-13Compress the backup output stream Christopher Tate
Zlib compression, with a full flush between each application's data. Encryption will be performed on the already-compressed data once that's implemented. On restore, the streamed data is similarly uncompressed on the fly. Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
2011-07-12Merge "Remove the simulator target from all makefiles. Bug: 5010576" Jeff Brown
2011-07-11Remove the simulator target from all makefiles. Jeff Brown
Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11Fix typo in an assert's log Mathias Agopian
Change-Id: I94883a23a0a92eaf3e4976f942f747a2137499ac
2011-07-08Add C++ thread API androidGetThreadSchedulingGroup Glenn Kasten
This API is intended for applications that need to read a thread's scheduling group, while using the higher-level (C++) family of thread APIs. Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
2011-07-06Merge "Add Thread::join" Glenn Kasten
2011-07-05Merge "Thread ID zero for androidSetThreadSchedulingGroup" Glenn Kasten
2011-06-28Add a linear transform library to libutils Jason Simmons
Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774