<div dir="ltr"><p dir="ltr">Alright, small update for all following a quick (non-mailing-list) exchange:</p>
<p dir="ltr">We did successfully complete a kernel-tracing port of LTTng for Android (somewhat old news), but we are still working on bringing our patches back up to date with the current version of the different projects (soon-ish still applies here, we're talking days). So far, we dwelled a little bit in LTTng-UST, but haven't done much changes, so userspace tracing is still not functional. Device that ran kernel traces successfully so far were the Nexus S and the Nexus 7 (example Nexus S trace available <a href="https://drive.google.com/folderview?id=0B55Ba7lWTLh4U0hGeTQ4bmRYRjQ&usp=sharing">here</a>; still not perfect).</p>
<p dir="ltr">Basically, we cross-compiled everything via the Android NDK (no Android makefiles involved here), and pushed all required bins to a device without having to flash it (unless the default kernel config didn't allow tracing -- then we'd have to flash). This approach is not compatible with the official Android build system (meaning we wouldn't be able to add it to Android like this), but we might eventually get working on the damned Android makefiles (they're extremely painful to write, especially since LTTng uses Autotools).</p>
<p dir="ltr">The librairies required by LTTng that are not already included in a regular Android build (uuid/popt) can actually be found/compiled from the official repo, in its 'external' directory (see oprofile and e2fsprog -- from memory). That might not be the easiest way to get them (full repo download is BIG), but compatibility is assured, and you can skip a full build by simply making those two individually for your device (if that's all you need).</p>
<p dir="ltr">You'll also need your device to be rooted to use LTTng at all; then, most initializations are done via scripts (we'll also provide those with our patches). We still had some trouble automating everything via daemons, so we always ran the sessiond locally (with success).</p>
<p style>Major problems we encountered so far were missing posix functions, and sysv shared memory. Basically, Android relies on Bionic for its system calls and other low-level functions, and since Bionic is pretty 'lightweight', they trimmed most of the fat out for performance. We had to make some more-or-less sketchy replacements here and there, but everything seems to be working decently now.</p>
<p style>So, simple 'how do I put LTTng on Android' workflow would be this:</p><p style> - Compile modules (using NDK) against device's kernel, making sure its config is appropriate, ship them over via ADB</p>
<p style> - Compile required external libraries (using repo build system) for the device, ship them over via ADB</p><p style> - Patch up LTTng-* (soon-ish! I could send you the outdated patches right now if you're interested though, they might be a month behind or so on the current trunks)</p>
<p style> - Cross-compile LTTng-* for the device (using NDK), ship binaries over via ADB</p><p style>Then, on the device, start up the sessiond manually & start tracing.</p><p style><br></p><p style>I think I went over everything, but if there's a part that's still cloudy, don't hesitate.</p>
<p style><br></p><p style>-PL</p><p style> </p>
<div class="gmail_quote">On May 17, 2013 1:32 AM, "Ionut D." <<a href="mailto:ionut5001@gmail.com" target="_blank">ionut5001@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>Hello all,</div><div><br></div><div>Recently I started to integrate LTTNG in Android ICS by compiling each package, each dependency, by using the Android build system. It is a lot of work because I met different problems and to be sincere, I do not know if at the end will work and I do not know how much I will need to modify the sources in order to work.<br>
</div><br>My questions are about this integration. I mention that I read a lot of discussions about this on Internet, on this mailing list, but the things are still not very clear for me.<br><br>It is ok? what I am trying to do ? to integrate and build by using the Android build system.<br>
Could you give me some guidelines, indications about how I should proceed, maybe a tutorial or maybe some android make files/patches that would help me to see how the job must be done and if I am doing it right ?<br><br>
Until now I managed to build lttng-modules, liburcu, libuuid from util-linux and configure lttng-ust by using the android toolchain for arm. I got a lot of errors but until now I managed to configure/make these packages.<br>
<br>I mention that I am trying to build lttng 2.x on ICS 4.0.3.<br><br><div>Would be great if you will give me a tutorial about how to do it.</div><div><br></div><div>Ionut</div></div>
<br>_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
<br></blockquote></div>
</div>