[lttng-dev] Port to Android Linux

Harald Gustafsson hgu1972 at gmail.com
Mon Feb 27 04:41:49 EST 2012

Forgot to add a link to our short documentation of the work:

On Mon, Feb 27, 2012 at 9:46 AM, Harald Gustafsson <hgu1972 at gmail.com> wrote:
> Hi all,
>> Did anyone successfully port LTTng to Android Linux?
> Yes, we (Ericsson) have ported UST to Android and we have a fully
> working but a bit rough code for it. It uses URCU and UST, we have
> used it to trace for example pthread_mutex operation by LD_PRELOAD a
> wrapper to bionic and hence it can handle that kind of load of traces.
> A few weeks back I got clearance for contributing this back to LTTng
> but I have not yet had time to upload, I will do that during the week.
> The rough part is the reimplementation of System V shared memory, we
> use temporary files, this was a quick fix since using binder and ashm
> would had involved larger changes to UST. The URCU changes are similar
> to what Marek Vavrusa mailed (22th Jan) about URCU thread local
> storage handling, this is needed since gcc with bionics can't do the
> __thread. Also since the code we forked in May did not have proper
> atomics for ARM we fixed that as well. One part can't be released it
> is our trace clock implementation since it is device specific, but
> since we tested on a pre-production system we did not need to be
> concerned about security. We implemented the trace-clock by mmap the
> memory (/dev/mem) having the device's clock-register and code read
> that from user space directly.
> So I'll get back with a patch when I cleaned the code a bit.
> Unfortunately, we don't have that much time to maintain this but would
> gladly help anyone wanting to work with the code.
> /Harald

More information about the lttng-dev mailing list