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
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
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
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
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
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
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
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
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
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
This will make it easier to add additional policies (cgroups) if needed.
Also added comments to the sched_policy APIs.
Change-Id: I33ce1cc4deae10983241f7391294b7a512d2c47c
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
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