Commit graph

152 commits

Author SHA1 Message Date
Jeff Sharkey
ddb1733944 Wrap system calls in TEMP_FAILURE_RETRY.
fs_prepare_dir() is used heavily during Zygote init, and can easily
run into EINTR.

Bug: 7151474
Change-Id: I7aac43a43483d55db47ca20456fff68ce51bbc46
2012-09-13 15:02:53 -07:00
Jeff Sharkey
9685194fc9 File-system utilities for installd and zygote.
Bug: 7008879
Change-Id: Ia54b8d4ad434e8973f235e2a4728651814bef8a9
2012-08-30 10:29:41 -07:00
Ian Rogers
fd7f1b6a50 Revert "Revert "Upgrade to dlmalloc 2.8.5.""
This reverts commit 42b83c6df7.
2012-08-28 15:52:20 -07:00
Brian Carlstrom
42b83c6df7 Revert "Upgrade to dlmalloc 2.8.5."
This reverts commit 2d13791ce7.
2012-08-22 12:10:19 -07:00
Brian Carlstrom
1768707951 am e05ac541: am 9d779bf1: Merge "Upgrade to dlmalloc 2.8.5."
* commit 'e05ac5415e861dee6a3f175c8066ff577736ba1f':
  Upgrade to dlmalloc 2.8.5.
2012-08-20 17:04:24 -07:00
Ian Rogers
2d13791ce7 Upgrade to dlmalloc 2.8.5.
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
2012-08-20 15:30:35 -07:00
Jeff Sharkey
2be5338a84 Merge "Multi-user external storage support." into jb-mr1-dev 2012-08-16 14:33:00 -07:00
Jeff Sharkey
885342a0f2 Multi-user external storage support.
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
2012-08-15 21:10:07 -07:00
Jean-Baptiste Queru
93be76f5c0 am e8e73b01: am 311a4758: Merge "Remove system/core\'s remnants of SH support."
* commit 'e8e73b01399e8d3c3fc6b94d26ef9cc49b33dda8':
  Remove system/core's remnants of SH support.
2012-08-13 16:03:30 -07:00
Elliott Hughes
98ebf1975f am 2ff60998: am 605f8706: Merge "Add Mips architecture to system/core/include"
* commit '2ff6099854691e3406a17797d4aa83624174e6f4':
  Add Mips architecture to system/core/include
2012-08-11 11:53:08 -07:00
Elliott Hughes
6521a41dcf Remove system/core's remnants of SH support.
SH support is long dead.

Change-Id: I6be2763ca9f1ad8b3f9b09a8ad2f1d67f1e7f802
2012-08-11 10:04:00 -07:00
Elliott Hughes
605f8706c8 Merge "Add Mips architecture to system/core/include" 2012-08-11 09:56:47 -07:00
Jeff Sharkey
46ac0ef00b Include to define uid_t.
Change-Id: I02d36346fc3c6236bd64309798b434405f8dfef7
2012-08-08 13:59:34 -07:00
Jeff Sharkey
9509d27252 Native utils for working with user and app IDs.
Bug: 6925012
Change-Id: I56f18826fd324f60b6e446cebd30719258e40990
2012-08-07 17:56:48 -07:00
Jeff Brown
053b865412 Enhance native stack dumps.
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
2012-06-08 13:29:23 -07:00
Duane Sand
096041174b Add Mips architecture to system/core/include
Change-Id: Ief7bdbd8d09cabe3f11f3ed47a932a7faa81cad9
2012-05-29 16:18:42 -07:00
Glenn Kasten
10ec3c7645 Add more SP_ constants
Change-Id: I52c8ea33b9b915fc08546f2ca0b191391f58506b
2012-04-23 17:34:06 -07:00
Glenn Kasten
69bfb1f099 Scheduling group cleanup - add comment, SP_DEFAULT
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
2012-04-20 10:31:50 -07:00
Geremy Condra
15621e0970 cutils: return the remote uid on netlink recv failure
This change adds a layer of indirection to uevent's
uevent_kernel_multicast_recv, allowing dependent code to
get the remote endpoint if desired.

Change-Id: If2f00708a1dd6196c415b1ebc2a7eeb72399a90e
2012-03-29 17:07:24 -07:00
Nick Kralevich
6756a0c9fe logger: Add the update kernel struct to userspace
Android's kernel logger can optionally return UID information
in addition to the previously returned information. This
information is available by telling the kernel to use the
updated structure via the newly introduced LOGGER_SET_VERSION
ioctl.

int fd = open("/dev/log/main", O_RDONLY);
int version = 2;
ioctl(fd, LOGGER_SET_VERSION, &version);

Change-Id: I6bfe7bfb9df45a56124aa8d0d19e7d7a18e06862
2012-03-22 15:51:24 -07:00
Nick Kralevich
10331ed16c Revert "logger: Add the update kernel struct to userspace"
This reverts commit 56c3065b79.

Breaks win_sdk build.
2012-03-22 10:18:20 -07:00
Nick Kralevich
3076bfd036 Merge "logger: Add the update kernel struct to userspace" 2012-03-22 09:25:18 -07:00
Nick Kralevich
56c3065b79 logger: Add the update kernel struct to userspace
Android's kernel logger can optionally return UID information
in addition to the previously returned information. This
information is available by telling the kernel to use the
updated structure via the newly introduced LOGGER_SET_VERSION
ioctl.

int fd = open("/dev/log/main", O_RDONLY);
int version = 2;
ioctl(fd, LOGGER_SET_VERSION, &version);

Change-Id: I3914be41de55342c2918f8978fcd4d2b96a09288
2012-03-20 16:21:22 -07:00
Kenny Root
77a62ceac5 MinGW does not have sys/cdefs.h
Change-Id: I5cafafce8488d355ed3865a9fd1173fbebbc5b03
2012-03-20 13:46:30 -07:00
Kenny Root
418fbe66e0 Merge "Add cdefs decoration to list.h" 2012-03-19 17:42:15 -07:00
Jeff Brown
4a6b384f60 Provide portable wrapper for qsort_r.
qsort_r() is declared differently on BSD and GNU libc and
may be absent on other platforms.

Provide qsort_r_compat() which should work everywhere.

Change-Id: I17a9026573b1ed971ff7d79895e7eb41ba108807
2012-03-19 14:07:26 -07:00
Kenny Root
0009b73ed8 Add cdefs decoration to list.h
In case someone includes this from C++ code.

Change-Id: I3b5a8bde5b5b9e8dcee64abaf33383f21eff7046
2012-03-15 21:45:07 -07:00
Glenn Kasten
86c7cc8189 Add get_sched_policy_name() and use in ps and top
This will make it easier to add additional policies (cgroups) if needed.
Also added comments to the sched_policy APIs.

Change-Id: I33ce1cc4deae10983241f7391294b7a512d2c47c
2012-03-15 15:10:45 -07:00
Andrew Hsieh
d2c8f52189 Fixed two 64-bit porting issues; Make pid/tid type consistent
1. In printf, use "%zu" for variable of type size_t
2. Print tid in %5d
3. Make type of pid/tid in AndroidLogEntry and logger_entry consistent

Change-Id: I3e3d9536ee58823f349a4734ae093d30eabe1bfe
2012-02-29 17:00:46 -08:00
Steve Block
2ac29d0250 Rename LOG_ASSERT to ALOG_ASSERT
Change-Id: Iff15ac5e7ab226d437c08d23f18fd54e6793e65c
2012-01-17 17:56:20 +00:00
Steve Block
8aeb6e244a Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I52fce957db06c281e2618daa4e2ecba19974f2eb
2012-01-17 17:56:20 +00:00
Steve Block
4f07a1f826 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
Change-Id: I6c2a1d56dadb7e5c69e478f4d8c7d9f2127db2af
2012-01-17 17:56:20 +00:00
Steve Block
4163b45949 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
Change-Id: I929ea38bc6fe6efeefa7870c8e7e4c19cd0029b3
2012-01-17 17:56:19 +00:00
Steve Block
9786ec417f Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
Change-Id: Ia0476219b71ece949595515ee07ea072ed349d73
2012-01-17 17:56:19 +00:00
Steve Block
66b68757f6 Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: Ia9a357dec5ad12eea93fd03401a3b02b38e4e94f
2012-01-17 17:56:18 +00:00
Steve Block
61fbcbe976 Rename (IF_)LOG() to (IF_)ALOG()
Change-Id: Ifb82ae2c242becaffa3cf19e548b526e6616c2c7
2012-01-17 17:56:18 +00:00
David 'Digit' Turner
7913bc05be libcutils: Use proper private header to access C library's <time.h> extension
The strftime_tz() function is not a standard C library function and should not
appear in <time.h>. Instead, it is being moved to <bionic_time.h>, a private
header only available to platform libraries.

Change-Id: I4dc18939b9380725dfaa20c9e417296363bc52f4
2012-01-13 13:38:40 +01:00
Steve Block
ceabb17306 Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
Bug: 5449033
Change-Id: I991dc84c366d8f33e5439894c23df561bbc50b83
2012-01-10 21:13:57 +00:00
Steve Block
8f2e8b0a45 am a9b84a7e: Add ALOG version of LOG_ASSERT
* commit 'a9b84a7e0b3ecb389a62bc6abb8c2fea3a4a30a6':
  Add ALOG version of LOG_ASSERT
2012-01-10 11:32:17 -08:00
Steve Block
a9b84a7e0b Add ALOG version of LOG_ASSERT
This is now required by some projects.

Change-Id: If4015c6a9f2391b205d2886bcf7f6e51f371ce08
2012-01-09 22:50:36 +00:00
Steve Block
01dda204cd Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: Ibcffdcf620ebae1c389446ce8e9d908f11ac039c
2012-01-08 11:03:26 +00:00
Steve Block
ae8b56c0d1 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I1e070511b6a538e9f1c94657356437a457d58882
2012-01-05 22:25:38 +00:00
Steve Block
fe71a61e5b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I4951baa981f09a84ce483e3d1bd0f9ebe009035f
2012-01-04 19:23:34 +00:00
Steve Block
8d66c49258 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: I9244d927f14c750cd359ebffb1fc1c355a755d5a
2012-01-03 22:32:30 +00:00
Steve Block
e7e7fac974 Add ALOG versions of LOGD, LOGI, LOGW and LOGE
These are now required by some projects.

Change-Id: I0d51c950178504474d803620a6cd1c9f084804b5
2011-12-29 11:58:24 +00:00
Jean-Baptiste Queru
17aad1469a Revert "Fix build"
This reverts commit 25a89e771a.
2011-11-15 13:59:05 -08:00
Steve Block
98520ab9a6 am 67b11cba: am 25a89e77: Fix build
* commit '67b11cba5bccd0cdc3ce6117a19c5f036f95d35f':
  Fix build
2011-11-15 13:07:22 -08:00
Steve Block
67b11cba5b am 25a89e77: Fix build
* commit '25a89e771aae292193244852166564e83e36232b':
  Fix build
2011-11-15 11:10:09 -08:00
Steve Block
25a89e771a Fix build
Change-Id: Icbe57024e6018600d47a68132f53f15d7602dc92
2011-11-15 10:58:49 -08:00
Jean-Baptiste Queru
1941c91389 am 4ef824e9: am 71619f13: am 604f52e3: Reconcile with AOSP master
* commit '4ef824e9481625270aa065cc4d0625e8c8d9e0df':
2011-10-28 15:43:04 +00:00