summaryrefslogtreecommitdiffstats
path: root/include/cutils
Commit message (Collapse)AuthorAgeFilesLines
* Merge "cutils: add a way to disable tracing for a process" into jb-mr2-devJamie Gennis2013-04-161-1/+7
|\
| * cutils: add a way to disable tracing for a processJamie Gennis2013-04-151-1/+7
| | | | | | | | | | | | | | | | | | This change adds the atrace_set_tracing_enabled call to libcutils. The call can be used to disable all tracing (of the atrace variety) for the current process. This is to be used to disable tracing in the Zygote process, as there is no way for Zygote to be notified of changes to the enabled trace tags. Change-Id: I0b691cc0dcfc65b16e3d17e1db2866a4deb253a7
* | Merge "klog: Have klog_write() call klog_init() if needed" into jb-mr2-devKen Sumrall2013-04-151-0/+6
|\ \
| * | klog: Have klog_write() call klog_init() if neededKen Sumrall2013-04-111-0/+6
| |/ | | | | | | | | | | Also change klog_init() to do nothing if already initialized. Change-Id: Ia2dfe914c9d9fd119fb8939508d57b15c9884663
* | Add new resources trace.Dianne Hackborn2013-04-121-1/+2
|/ | | | Change-Id: I63398f282fe7bf04f1c4cefa8f602100f403fa7c
* Modify debuggerd to cope with the abort message.Elliott Hughes2013-04-051-1/+1
| | | | | | | (cherry picked from commit 707b8bbe1800dbebd932f54e86347563ee86c36e) Bug: 8531731 Change-Id: I2785a07ef83e085f338d3094f9972de23117807c
* libcutils: add support for app tracingJamie Gennis2013-03-281-1/+11
| | | | | | | | | | | This change adds support for tracing using the ATRACE_TAG_APP tag. This tag is enabled only for processes in which the /proc/<pid>/cmdline value appears in the comma-separated list of such values in the debug.atrace.app_cmdlines system property. It is also only enabled if either the ro.debuggable system property is set to 1 or the application has declared itself debuggable in its manifest, which gets reported to libcutils by the framework. Change-Id: Ic94ba55f4e70a9cf994056acbf151e523428b65d
* Inline ldrex/strex for thumb2, remove ARMv5 remnants.Ian Rogers2013-03-211-123/+33
| | | | | | | | | | We assume ARMv7 which with thumb2 has ldrex/strex operations that may be inlined if -mthumb is defined. Remove remnants of ARMv5 support. (cherry picked from commit 80c3b278fde7b92504614b7d47b9fecf6f736081) Change-Id: I194a3d08e933c63f79d48288d9235b4e64099340
* cutils: trace: add asynchronous eventsAlex Ray2013-03-181-0/+41
| | | | Change-Id: Ia09d34cbc6c8c85fb3d0f1a7e95de53d1b79e998
* Revert "property_get: do argument checking."Nick Kralevich2013-02-041-20/+0
| | | | This reverts commit 75cc88546b893280add608becfd5887470573813.
* Revert "Fix win_sdk build."Nick Kralevich2013-02-041-6/+4
| | | | | | This reverts commit 941daef629bd571032851edf7ae1dce24266640e. Change-Id: I6b509492964baf535e0eeb1a731bf70c91715942
* Fix win_sdk build.Nick Kralevich2013-02-021-4/+6
| | | | | | | | Don't depend on sys/cdefs.h, which doesn't exist when building for the host.Don't try to compile property_len() checking code in mingw32, it doesn't work. Change-Id: I6a56b759bd4e8d30d6ca136e43d6515bf7408cc6
* property_get: do argument checking.Nick Kralevich2013-01-311-0/+20
| | | | | | | | | | Try to verify, at compile time, that the supplied value buffer is large enough. There's more we can do here, but this is a good first pass. Change-Id: Iac8153826c89114b2755735032423c6744f7a61b
* cutils: remove dead code.Nick Kralevich2013-01-291-1/+0
| | | | | | | | The last caller of this code was removed in dalvik commit eb1703442f3fc0577b3395b7eb4d55300b4125db (https://android-review.googlesource.com/50689) Change-Id: I3f4865c02092752a13369a3b2c3289fc9a4f6a62
* Merge "cutils: add simple reference counter"Alex Ray2013-01-111-0/+62
|\
| * cutils: add simple reference counterAlex Ray2013-01-101-0/+62
| | | | | | | | Change-Id: Iefb34abc864cb4ca2da2f1c85c45f89af8c7fe8b
* | cutils: bitops: add include for boolAlex Ray2013-01-071-0/+1
|/ | | | Change-Id: I3eca5a7c1f5ec66ded1229ccb6ca1dbb5d608ffd
* cutils: Add bitmask utilities to bitopsAlex Ray2013-01-071-0/+68
| | | | | | Bitmask utils handle resource tracking using a (multi-word) bitmask. Change-Id: I2ae45df1ac8c665c29ea9cae32a757168686b96c
* am 7f692fe6: am 523e21d3: Merge "Fail-proof the inline directives for SMP ↵Ben Cheng2012-12-073-88/+123
|\ | | | | | | | | | | | | atomic operations." * commit '7f692fe6448049dca2795d7d648615a2dc7a500c': Fail-proof the inline directives for SMP atomic operations.
| * Fail-proof the inline directives for SMP atomic operations.Ben Cheng2012-12-073-88/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various atomic operations are declared as inline in the header files to cut the function call overhead. However, the plain inline keyword is just a suggestion to the compiler which makes its own decision on whether to inline them or not. Worst, if they are not inlined, the -fvisibility-inlines-hidden compiler flag will render them as hidden symbols in the object file. If they are picked up by the linker over the ones supplied in libcutils.so the following warning will be reported: warning: hidden symbol 'android_atomic_inc' in foo.o is referenced by DSO bar.so One way is to add __attribute__((visibility("default"))) to those inline functions to suppress the linker warnings. A better way is to force inlining as with this patch. Change-Id: Ie4fcfdfaaf06f42d351619a0d89671a9df15ca2f
* | cutils: trace: use ANDROID_SMP to switch atomicsAlex Ray2012-11-301-1/+6
| | | | | | | | | | | | | | | | | | With inline atomics, trace functions have no non-inline function calls in the fast (tracing off) path. To enable this, ANDROID_SMP must be defined for the project. Otherwise, normal (non-inline) atomics are used. Change-Id: Id1f75bdf7db2f5d319a389ad411f55073d78c48c
* | cutils: trace: add atrace_update_tags()Alex Ray2012-11-281-0/+6
| | | | | | | | | | | | | | Adds a function to read the current trace system property value, and sets the trace tags to it, do be used as a sysprop change callback. Change-Id: Ia6336652173aa5b07188898736c2c795a69fe79a
* | cutils: Add tracing supportAlex Ray2012-11-281-0/+192
| | | | | | | | | | | | | | | | | | Basic tracing functionality to cutils, which can be turned on at start, or dynamically controlled by the frameworks. The goal is for hardware modules to add tracing that will be controlled by their respective services. Change-Id: I84eeb7d6be0038f734e719074fa4a2fae4ffe9c0
* | Add RLOGxWink Saville2012-11-161-1/+82
| | | | | | | | | | | | | | | | This will eventually allow us to remove the code in logd_write.c#__android_log_write which uses the tag to direct logs to the radio buffer. Change-Id: Ic992c0b8d1cf000b1814dc7786d2a40becf75eaf
* | The localtime_tz and mktime_tz extensions are now in bionic.Elliott Hughes2012-10-181-38/+1
|/ | | | | | | | | | | | Bug: 7012465 (cherry-pick of d03072ffde3279fbb60591a0d07c820d8e792762.) Conflicts: libcutils/Android.mk Change-Id: I5e34edd4c8f59cc0a4d5dcc4740707ae063608a0
* Wrap system calls in TEMP_FAILURE_RETRY.Jeff Sharkey2012-09-131-0/+15
| | | | | | | | fs_prepare_dir() is used heavily during Zygote init, and can easily run into EINTR. Bug: 7151474 Change-Id: I7aac43a43483d55db47ca20456fff68ce51bbc46
* File-system utilities for installd and zygote.Jeff Sharkey2012-08-302-3/+50
| | | | | Bug: 7008879 Change-Id: Ia54b8d4ad434e8973f235e2a4728651814bef8a9
* Revert "Revert "Upgrade to dlmalloc 2.8.5.""Ian Rogers2012-08-281-128/+0
| | | | This reverts commit 42b83c6df7e4f65461a32a711d5dd4f46b9b85e0.
* Revert "Upgrade to dlmalloc 2.8.5."Brian Carlstrom2012-08-221-0/+128
| | | | This reverts commit 2d13791ce7ff61221ca047553891f31a23b2e943.
* am e05ac541: am 9d779bf1: Merge "Upgrade to dlmalloc 2.8.5."Brian Carlstrom2012-08-201-128/+0
|\ | | | | | | | | * commit 'e05ac5415e861dee6a3f175c8066ff577736ba1f': Upgrade to dlmalloc 2.8.5.
| * Upgrade to dlmalloc 2.8.5.Ian Rogers2012-08-201-128/+0
| | | | | | | | | | | | | | | | | | | | Remove mspace functionality from cutils. Directly declare mspace from dlmalloc in code flinger's code cache, and manage without using morecore. Depends upon: https://android-review.googlesource.com/41717 Change-Id: If927254febd4414212c690f16509ef2ee1b44b44
* | Merge "Multi-user external storage support." into jb-mr1-devJeff Sharkey2012-08-161-3/+3
|\ \
| * | Multi-user external storage support.Jeff Sharkey2012-08-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remount rootfs as recursively shared, so that mount changes are propagated into child namespaces. Mount external storage for access from adb. Clean multi-user dependencies for use in Dalvik. Also define external storage paths. Bug: 6925012 Change-Id: I375de581a63f4f36667894c56a34a9dd45361e8f
* | | am e8e73b01: am 311a4758: Merge "Remove system/core\'s remnants of SH support."Jean-Baptiste Queru2012-08-131-2/+0
|\ \ \ | |/ / |/| / | |/ | | * commit 'e8e73b01399e8d3c3fc6b94d26ef9cc49b33dda8': Remove system/core's remnants of SH support.
| * Remove system/core's remnants of SH support.Elliott Hughes2012-08-111-2/+0
| | | | | | | | | | | | SH support is long dead. Change-Id: I6be2763ca9f1ad8b3f9b09a8ad2f1d67f1e7f802
* | am 2ff60998: am 605f8706: Merge "Add Mips architecture to system/core/include"Elliott Hughes2012-08-112-0/+189
|\ \ | |/ | | | | | | * commit '2ff6099854691e3406a17797d4aa83624174e6f4': Add Mips architecture to system/core/include
| * Merge "Add Mips architecture to system/core/include"Elliott Hughes2012-08-112-0/+189
| |\
| | * Add Mips architecture to system/core/includeDuane Sand2012-05-292-0/+189
| | | | | | | | | | | | Change-Id: Ief7bdbd8d09cabe3f11f3ed47a932a7faa81cad9
| | * Rename LOG_ASSERT to ALOG_ASSERTSteve Block2012-01-171-4/+7
| | | | | | | | | | | | Change-Id: Iff15ac5e7ab226d437c08d23f18fd54e6793e65c
| | * Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)Steve Block2012-01-171-7/+16
| | | | | | | | | | | | Change-Id: I52fce957db06c281e2618daa4e2ecba19974f2eb
| | * Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)Steve Block2012-01-171-7/+16
| | | | | | | | | | | | Change-Id: I6c2a1d56dadb7e5c69e478f4d8c7d9f2127db2af
| | * Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)Steve Block2012-01-171-7/+16
| | | | | | | | | | | | Change-Id: I929ea38bc6fe6efeefa7870c8e7e4c19cd0029b3
| | * Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)Steve Block2012-01-171-7/+16
| | | | | | | | | | | | Change-Id: Ia0476219b71ece949595515ee07ea072ed349d73
| | * Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)Steve Block2012-01-171-13/+22
| | | | | | | | | | | | Change-Id: Ia9a357dec5ad12eea93fd03401a3b02b38e4e94f
| | * Rename (IF_)LOG() to (IF_)ALOG()Steve Block2012-01-171-20/+28
| | | | | | | | | | | | Change-Id: Ifb82ae2c242becaffa3cf19e548b526e6616c2c7
* | | Include to define uid_t.Jeff Sharkey2012-08-081-0/+2
| | | | | | | | | | | | Change-Id: I02d36346fc3c6236bd64309798b434405f8dfef7
* | | Native utils for working with user and app IDs.Jeff Sharkey2012-08-071-0/+39
|/ / | | | | | | | | Bug: 6925012 Change-Id: I56f18826fd324f60b6e446cebd30719258e40990
* | Enhance native stack dumps.Jeff Brown2012-06-081-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides a new mechanism for dumpstate (while running as root) to request that debuggerd dump the stacks of native processes that we care about in bug reports. In this mode, the backtrace is formatted to look similar to a Dalvik backtrace. Moved the tombstone generating code into a separate file to make it easier to maintain. Fixed a bug where sometimes the stack traces would be incomplete because we were not waiting for each thread to stop after issuing PTRACE_ATTACH, only the main thread. So sometimes we were missing traces for some threads. Refactored the logging code to prevent accidentally writing data to logcat when explicitly dumping a tombstone or backtrace from the console. Only root or system server can request to dump backtraces but only root can dump tombstones. Bug: 6615693 Change-Id: Ib3edcc16f9f3a687e414e3f2d250d9500566123b
* | Add more SP_ constantsGlenn Kasten2012-04-231-0/+3
| | | | | | | | Change-Id: I52c8ea33b9b915fc08546f2ca0b191391f58506b
* | Scheduling group cleanup - add comment, SP_DEFAULTGlenn Kasten2012-04-201-0/+5
| | | | | | | | | | | | | | | | Also tid == 0 maps to gettid() on platforms that support it. This is needed by mediaserver code that was formerly using the old C++ API. Change-Id: I8baaa3e42315c9b924cec26b6da01e7cb69e0078