Re: [lttng-dev] lttng for android
Thanks a lot.I will take a try. At 2014-12-06 04:00:47, Charles Briere c.bri...@samsung.com wrote: Hi Chao, You could also build from my github repository[1] on branch android. At the moment, I did not have time to clean the modifications I've made for lttng-ust, so expect only kernel space tracing. Although userspace tracing is totally possible on Android (and working here) and I should submit that when kernelspace in upstream. I have a repo on github[2] (branch pending) in which I put my scripts/makefile to compile the lttng suite with dependencies. If something goes wrong you can always fill an issue on github or let me know by e-mail. Charles [1] https://github.com/flatzo/lttng-tools/tree/android [2] https://github.com/flatzo/LTTng-Android/tree/pending On Fri, 2014-12-05 at 10:17 -0500, Francis Deslauriers wrote: Hi Chao, There has been some work going on to port LTTng to Android but I don't think it's upstream yet. You can try to apply the patchset that Charles Brière has submitted earlier this fall[1] but since those are big changes it takes more time the review and test them. Don't hesitate to share you experience with us. Have a look at the archives of the mailing list. [1] http://lists.lttng.org/pipermail/lttng-dev/2014-October/023678.html Cheers, Francis On Fri, Dec 5, 2014 at 5:23 AM, Chao Xie xiechao_m...@163.com wrote: Hi If i want to collect the trace data from the target system which is the android platform with ARM chip, how can i compile the lttng and collect the trace data? ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] lttng for android
Hi Chao, There has been some work going on to port LTTng to Android but I don't think it's upstream yet. You can try to apply the patchset that Charles Brière has submitted earlier this fall[1] but since those are big changes it takes more time the review and test them. Don't hesitate to share you experience with us. Have a look at the archives of the mailing list. [1] http://lists.lttng.org/pipermail/lttng-dev/2014-October/023678.html Cheers, Francis On Fri, Dec 5, 2014 at 5:23 AM, Chao Xie xiechao_m...@163.com wrote: Hi If i want to collect the trace data from the target system which is the android platform with ARM chip, how can i compile the lttng and collect the trace data? ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTng on Android
For long term I think it is the right thing to port LTTng to bionic/android. What I mean is to get a running version without going through this hassle, e.g. taking a non-android buildroot and compile LTTng static with matching flags for the android target. This should be possible, I just wanted to ask if anyone had success going this way or if there is something I'm missing. thx, Jan 2014-07-01 19:35 GMT+02:00 Charles Brière charles.bri...@polymtl.ca: Hi Jan, Even when disabling ust while configuring, there is still some shm_open (need to be replaced by ashmem) and pthread_cancel calls within the tools code. But I don't understand what you mean by using static linking. How would that help in the case where you are missing headers? Cheers, Charles On Tue, Jul 1, 2014 at 2:55 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi Charles, thanks for your answer. So the main problem seems to be bionic and missing headers of the NDK. How about compiling LTTng user-space as static to avoid these issues? Cheers, Jan 2014-06-30 19:47 GMT+02:00 Charles Brière charles.bri...@polymtl.ca: Hi Jan, I was part of the students working on it a year ago. We had kernel tracing working at the time, though we had some trouble as bionic doesn't have pthread_cancel. I think we had replaced that by a dummy pthread_kill at the time and that is part of the reason our patches were not accepted. I recently resent some patches for libURCU so this should not be a problem to compile for android out of master branch, even with NDK. I have been trying lately to get lttng-tools compiling out of NDK (faster than checking out the whole Android tree) but there is a lot of headers missing, most important are related to shared memory. I was about to continue working on it, this time with the whole Android tree, but ran out of disk space so had to postpone until I receive some more storage. I hope I'll be able to release patches within the next month. Cheers, Charles On Mon, Jun 30, 2014 at 7:03 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi LTTngers, I want to ask about the status of LTTng on Android. Is anyone using it already? I remember there was some student project to get LTTng running with bionic but I don't know how far they got. thanks, Jan ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTng on Android
Hi Charles, thanks for your answer. So the main problem seems to be bionic and missing headers of the NDK. How about compiling LTTng user-space as static to avoid these issues? Cheers, Jan 2014-06-30 19:47 GMT+02:00 Charles Brière charles.bri...@polymtl.ca: Hi Jan, I was part of the students working on it a year ago. We had kernel tracing working at the time, though we had some trouble as bionic doesn't have pthread_cancel. I think we had replaced that by a dummy pthread_kill at the time and that is part of the reason our patches were not accepted. I recently resent some patches for libURCU so this should not be a problem to compile for android out of master branch, even with NDK. I have been trying lately to get lttng-tools compiling out of NDK (faster than checking out the whole Android tree) but there is a lot of headers missing, most important are related to shared memory. I was about to continue working on it, this time with the whole Android tree, but ran out of disk space so had to postpone until I receive some more storage. I hope I'll be able to release patches within the next month. Cheers, Charles On Mon, Jun 30, 2014 at 7:03 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi LTTngers, I want to ask about the status of LTTng on Android. Is anyone using it already? I remember there was some student project to get LTTng running with bionic but I don't know how far they got. thanks, Jan ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTng on Android
Hi Jan, Even when disabling ust while configuring, there is still some shm_open (need to be replaced by ashmem) and pthread_cancel calls within the tools code. But I don't understand what you mean by using static linking. How would that help in the case where you are missing headers? Cheers, Charles On Tue, Jul 1, 2014 at 2:55 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi Charles, thanks for your answer. So the main problem seems to be bionic and missing headers of the NDK. How about compiling LTTng user-space as static to avoid these issues? Cheers, Jan 2014-06-30 19:47 GMT+02:00 Charles Brière charles.bri...@polymtl.ca: Hi Jan, I was part of the students working on it a year ago. We had kernel tracing working at the time, though we had some trouble as bionic doesn't have pthread_cancel. I think we had replaced that by a dummy pthread_kill at the time and that is part of the reason our patches were not accepted. I recently resent some patches for libURCU so this should not be a problem to compile for android out of master branch, even with NDK. I have been trying lately to get lttng-tools compiling out of NDK (faster than checking out the whole Android tree) but there is a lot of headers missing, most important are related to shared memory. I was about to continue working on it, this time with the whole Android tree, but ran out of disk space so had to postpone until I receive some more storage. I hope I'll be able to release patches within the next month. Cheers, Charles On Mon, Jun 30, 2014 at 7:03 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi LTTngers, I want to ask about the status of LTTng on Android. Is anyone using it already? I remember there was some student project to get LTTng running with bionic but I don't know how far they got. thanks, Jan ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTng on Android
Hi Jan, I was part of the students working on it a year ago. We had kernel tracing working at the time, though we had some trouble as bionic doesn't have pthread_cancel. I think we had replaced that by a dummy pthread_kill at the time and that is part of the reason our patches were not accepted. I recently resent some patches for libURCU so this should not be a problem to compile for android out of master branch, even with NDK. I have been trying lately to get lttng-tools compiling out of NDK (faster than checking out the whole Android tree) but there is a lot of headers missing, most important are related to shared memory. I was about to continue working on it, this time with the whole Android tree, but ran out of disk space so had to postpone until I receive some more storage. I hope I'll be able to release patches within the next month. Cheers, Charles On Mon, Jun 30, 2014 at 7:03 AM, Jan Glauber jan.glau...@gmail.com wrote: Hi LTTngers, I want to ask about the status of LTTng on Android. Is anyone using it already? I remember there was some student project to get LTTng running with bionic but I don't know how far they got. thanks, Jan ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTng on Android: no session daemon available
You'll want to dig into the past month's threads referring to Android on the lttng-dev mailing list. Some work has been done on lttng-tools to support it, but the patches have never been cleaned up following our feedback, so it is not merged yet. Thanks, Mathieu * Cao Gao (cao...@umich.edu) wrote: Hi, I’m trying to use LTTng on Android 4.0.4 with Linux kernel version of 3.0.15. I cross-compiled the LTTng modules and tools on my Ubuntu 12.04 machine. First I installed all the LTTng modules using *insmod*, because there is no *modprobe* in Android. It worked fine. However, when I tried to run *lttng*, it failed due to No session daemon is available error. I tried to run* lttng-sessiond*, then it just kept hanging and cannot finish. Even I kept *lttng-sessiond* hanging in a new terminal session and ran * lttng* in a separate terminal, it gave the same error. I'm posting the log below. Any help would be greatly appreciated! Thanks, Cao *root@android:/data/lttng/bin # ./lttng -vvv list -k* DEBUG1 [2016/2016]: Session daemon at: /data/lttng/bin/lttng-sessiond (in check_sessiond() at lttng.c:381) Spawning a session daemon sh: /sbin/modprobe: not found Error: Unable to load module lttng-tracer sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found Error: Unable to load module lttng-lib-ring-buffer sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-client-discard sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-client-overwrite sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-metadata-client sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-client-mmap-discard sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-client-mmap-overwrite sh: /sbin/modprobe: not found Error: Unable to load module lttng-ring-buffer-metadata-mmap-client sh: /sbin/modprobe: not found Error: Unable to load module lttng-probe-lttng sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found sh: /sbin/modprobe: not found Warning: No tracing group detected DEBUG1 [2016/2016]: SIGUSR1 caught (in sighandler() at lttng.c:204) DEBUG2 [2016/2016]: Session name: (null) (in cmd_list() at commands/list.c:743) DEBUG1 [2016/2016]: Getting kernel tracing events (in list_kernel_events() at commands/list.c:433) Error: Unable to list kernel events: No session daemon is available Error: Command error DEBUG1 [2016/2016]: Clean exit (in clean_exit() at lttng.c:175) *root@android:/data/lttng/bin # ./lttng-sessiond -vvv* DEBUG3 [2132/2132]: Creating LTTng run directory: /data/lttng (in create_lttng_rundir() at main.c:3853) DEBUG2 [2132/2132]: Kernel consumer err path: /data/lttng/kconsumerd/error (in main() at main.c:4140) DEBUG2 [2132/2132]: Kernel consumer cmd path: /data/lttng/kconsumerd/command (in main() at main.c:4142) DEBUG1 [2132/2132]: Client socket path /data/lttng/client-lttng-sessiond (in main() at main.c:4195) DEBUG1 [2132/2132]: Application socket path /data/lttng/lttng-ust-sock-4 (in main() at main.c:4196) DEBUG1 [2132/2132]: Application wait path /lttng-ust-wait-4 (in main() at main.c:4197) DEBUG1 [2132/2132]: LTTng run directory path: /data/lttng (in main() at main.c:4198) DEBUG2 [2132/2132]: UST consumer 32 bits err path: /data/lttng/ustconsumerd32/error (in main() at main.c:4207) DEBUG2 [2132/2132]: UST consumer 32 bits cmd path: /data/lttng/ustconsumerd32/command (in
Re: [lttng-dev] LTTNG on Android ICS
It is working. I managed to send traces on another machine. Basically you have 2 machines, machine A which is traced (it runs Android) and machine B which will receive all the logs (in my case Ubuntu 12.04). On machine B you have to start lttng-relayd with the following command `lttng-relayd -C tcp://xxx.xxx.xxx.xxx:5342 -D tcp://xxx.xxx.xxx.xxx:5343 -o /tmp/lttng` and on machine A when you have to create the session use -U net://xxx.xxx.xxx.xxx parameter and should work. Cheers! On Tue, May 28, 2013 at 4:27 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Good question: I don't suppose it's fully working right now, as we've barely touched/tested it yet (we worked mostly locally or via Eclipse). It should be amongst the next improvement batch though; could you provide the commands you used to trigger that exact crash? I'll try to replicate it later this week. On Tue, May 28, 2013 at 8:18 AM, Ionut D. ionut5...@gmail.com wrote: lttng-relayd is functional? Because I want to start it and fails with: DEBUG3 [3661/3661]: URI string: tcp://0.0.0.0:5342 (in uri_parse() at uri.c:250) DEBUG3 [3661/3661]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5342, data: 0 (in uri_parse() at uri.c:464) DEBUG3 [3661/3661]: URI string: tcp://0.0.0.0:5343 (in uri_parse() at uri.c:250) DEBUG3 [3661/3661]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5343, data: 0 (in uri_parse() at uri.c:464) DEBUG1 [3661/3661]: Signal handler set for SIGTERM, SIGPIPE and SIGINT (in set_signal_handler() at main.c:346) DEBUG1 [3661/3661]: epoll set max size is 76382 (in compat_epoll_set_max_size() at compat-epoll.c:270) DEBUG1 [3661/3662]: [thread] Relay dispatcher started (in relay_thread_dispatcher() at main.c:646) DEBUG1 [3661/3662]: Futex n to 1 prepare done (in futex_nto1_prepare() at futex.c:75) DEBUG1 [3661/3662]: Woken up but nothing in the relay command queue (in relay_thread_dispatcher() at main.c:656) DEBUG1 [3661/3664]: [thread] Relay listener started (in relay_thread_listener() at main.c:484) DEBUG1 [3661/3663]: [thread] Relay worker started (in relay_thread_worker() at main.c:1772) DEBUG1 [3661/3664]: Listening on sock 7 (in relay_init_sock() at main.c:430) assertion URCU_TLS(rcu_reader).need_mb == 0 failed: file urcu.c, line 435, function rcu_register_thread_mb DEBUG1 [3661/3664]: Listening on sock 9 (in relay_init_sock() at main.c:430) DEBUG1 [3661/3664]: Listener accepting connections (in relay_thread_listener() at main.c:517) Segmentation fault On Fri, May 24, 2013 at 11:36 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Good news: you (most likely) won't need to recompile the whole platform to fix the problem! I think we bumped in a similar bitter-sweet-awful error a while back: after some hefty searches, we found it might have something to do with the Android build system globally 'fortifying' the sources against unsafe functions when compiling some of the most recent versions of the platform. I believe adding -D_FORTIFY_SOURCE=0 to the CPPFLAGS when building the tools solved it for us. -PL On Fri, May 24, 2013 at 3:04 PM, Francis Giraldeau francis.girald...@gmail.com wrote: Hi, I got some problem compiling required libraries for lttng-tools. I did a full android build within repo: $ source build/envsetup.sh $ lunch # with full_maguro-eng $ m Build is fine, but when trying to run configure in lttng-tools, it can't find liboprofile_popt. Here is the error message in config.log: /home/francis/android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/francis/android/repo/out/target/product/maguro/obj/STATIC_LIBRARIES/liboprofile_popt_intermediates/liboprofile_popt.a(popthelp.o): in function singleOptionHelp.isra.4:bionic/libc/include/stdio.h:483: error: undefined reference to '__sprintf_chk' It seems that only the static library of liboprofile_popt is compiled. The symbol is defined in libc.a and libc.so: $ nm ./out/target/product/maguro/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so | grep -E __strlen_chk|__sprintf_chk 0001395d T __sprintf_chk 00012df1 T __strlen_chk I tried to compile the configtest.c file by hand and it worked, so it really seems to be some kind of environment variable that make it fail. For the people who managed to do the configure, what arguments should be supplied to configure? Or maybe it's my android build that is incomplete? Should I build sub-directories in addition to the build in the root android repo sources? Cheers! Francis 2013/5/24 Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca The required kernel configuration options for the modules are listed in the lttng-module README file, located in its project root directory. Some of the 'optional' options also listed there are simply not supported by 3.0.x
Re: [lttng-dev] LTTNG on Android ICS
lttng-relayd is functional? Because I want to start it and fails with: DEBUG3 [3661/3661]: URI string: tcp://0.0.0.0:5342 (in uri_parse() at uri.c:250) DEBUG3 [3661/3661]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5342, data: 0 (in uri_parse() at uri.c:464) DEBUG3 [3661/3661]: URI string: tcp://0.0.0.0:5343 (in uri_parse() at uri.c:250) DEBUG3 [3661/3661]: URI dtype: 1, proto: 1, host: 0.0.0.0, subdir: , ctrl: 5343, data: 0 (in uri_parse() at uri.c:464) DEBUG1 [3661/3661]: Signal handler set for SIGTERM, SIGPIPE and SIGINT (in set_signal_handler() at main.c:346) DEBUG1 [3661/3661]: epoll set max size is 76382 (in compat_epoll_set_max_size() at compat-epoll.c:270) DEBUG1 [3661/3662]: [thread] Relay dispatcher started (in relay_thread_dispatcher() at main.c:646) DEBUG1 [3661/3662]: Futex n to 1 prepare done (in futex_nto1_prepare() at futex.c:75) DEBUG1 [3661/3662]: Woken up but nothing in the relay command queue (in relay_thread_dispatcher() at main.c:656) DEBUG1 [3661/3664]: [thread] Relay listener started (in relay_thread_listener() at main.c:484) DEBUG1 [3661/3663]: [thread] Relay worker started (in relay_thread_worker() at main.c:1772) DEBUG1 [3661/3664]: Listening on sock 7 (in relay_init_sock() at main.c:430) assertion URCU_TLS(rcu_reader).need_mb == 0 failed: file urcu.c, line 435, function rcu_register_thread_mb DEBUG1 [3661/3664]: Listening on sock 9 (in relay_init_sock() at main.c:430) DEBUG1 [3661/3664]: Listener accepting connections (in relay_thread_listener() at main.c:517) Segmentation fault On Fri, May 24, 2013 at 11:36 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Good news: you (most likely) won't need to recompile the whole platform to fix the problem! I think we bumped in a similar bitter-sweet-awful error a while back: after some hefty searches, we found it might have something to do with the Android build system globally 'fortifying' the sources against unsafe functions when compiling some of the most recent versions of the platform. I believe adding -D_FORTIFY_SOURCE=0 to the CPPFLAGS when building the tools solved it for us. -PL On Fri, May 24, 2013 at 3:04 PM, Francis Giraldeau francis.girald...@gmail.com wrote: Hi, I got some problem compiling required libraries for lttng-tools. I did a full android build within repo: $ source build/envsetup.sh $ lunch # with full_maguro-eng $ m Build is fine, but when trying to run configure in lttng-tools, it can't find liboprofile_popt. Here is the error message in config.log: /home/francis/android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/francis/android/repo/out/target/product/maguro/obj/STATIC_LIBRARIES/liboprofile_popt_intermediates/liboprofile_popt.a(popthelp.o): in function singleOptionHelp.isra.4:bionic/libc/include/stdio.h:483: error: undefined reference to '__sprintf_chk' It seems that only the static library of liboprofile_popt is compiled. The symbol is defined in libc.a and libc.so: $ nm ./out/target/product/maguro/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so | grep -E __strlen_chk|__sprintf_chk 0001395d T __sprintf_chk 00012df1 T __strlen_chk I tried to compile the configtest.c file by hand and it worked, so it really seems to be some kind of environment variable that make it fail. For the people who managed to do the configure, what arguments should be supplied to configure? Or maybe it's my android build that is incomplete? Should I build sub-directories in addition to the build in the root android repo sources? Cheers! Francis 2013/5/24 Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca The required kernel configuration options for the modules are listed in the lttng-module README file, located in its project root directory. Some of the 'optional' options also listed there are simply not supported by 3.0.x ARM kernels (such as HAVE_SYSCALL_TRACEPOINTS), so you might be missing some modules compared to what you would get on a (x86 arch w/ recent kernel) platform. You can find more information on syscall tracing on ARM here: http://comments.gmane.org/gmane.linux.kernel.tracing.lttng.devel/5086 On Fri, May 24, 2013 at 6:44 AM, Ionut D. ionut5...@gmail.com wrote: I managed to fix it. It was not finding `lttng-consumerd`, I fixed it by configuring the package with the right path. But, about the kernel modules the question is still pertinent. What options should I check in the kernel configuration? I saw that in my case not all the lttng kernel modules have been compiled. On Fri, May 24, 2013 at 11:07 AM, Ionut D. ionut5...@gmail.com wrote: Hello, Thank you for the slides. I manged to build the kernel modules and I insmod them manually. On the device I copied in /data/lttng following binaries `lttng`, `lttng-relayd` and `lttng-sessiond`. If I execute `./lttng list -k` it shows
Re: [lttng-dev] LTTNG on Android ICS
Hello, Thank you for the slides. I manged to build the kernel modules and I insmod them manually. On the device I copied in /data/lttng following binaries `lttng`, `lttng-relayd` and `lttng-sessiond`. If I execute `./lttng list -k` it shows me a list of available kernel events. I create a session called mysession with `./lttng create mysession` and I enable tracing on all the event with `./lttng enable-event -a -k`. But here starts my problem. The output of the last command is the following: root@android:/data/lttng # ./lttng enable-event -a -k PERROR [3681/3681]: kernel start consumer exec: (null) (in spawn_consumerd() at main.c:2007) Error: Condition timed out. The consumer thread was never ready. Killing it Warning: Using pthread_kill as pthread_cancel is missing on the current platform PERROR [3608/3658]: write poll pipe: (null) (in notify_thread_pipe() at utils.c:43) Error: Events: Fatal error of the session daemon (channel channel0, session mysession) Do you have any idea about what could be wrong? What options should I check in the kernel configuration? (I checked all that is under Tracing) --Ionut On Thu, May 23, 2013 at 6:09 PM, Charles Brière charles.bri...@polymtl.cawrote: Module location doesn't really matter, we used to push them to /data/... or /sdcard/... . Modprobe doesn't exists on Android so you'll need to use insmod. We used this script https://docs.google.com/file/d/0B56W2viIJ4oqOU1qTHJZY0V2MzQ/editin order to compile, push to device and load modules. We also made a presentation you might be interested in that can be viewed on https://docs.google.com/presentation/d/14lte2AchEAyxMk3WSQ53SdbBm2tfmABBFQojuUhxg7Y/pub?start=falseloop=falsedelayms=3000 On Thu, May 23, 2013 at 10:40 AM, Ionut D. ionut5...@gmail.com wrote: About the kernel modules. Where should they be located on the target? Should I have modprobe or insmod it is enough? On Thu, May 23, 2013 at 2:19 PM, Ionut D. ionut5...@gmail.com wrote: Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.com wrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.comwrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function)
Re: [lttng-dev] LTTNG on Android ICS
I managed to fix it. It was not finding `lttng-consumerd`, I fixed it by configuring the package with the right path. But, about the kernel modules the question is still pertinent. What options should I check in the kernel configuration? I saw that in my case not all the lttng kernel modules have been compiled. On Fri, May 24, 2013 at 11:07 AM, Ionut D. ionut5...@gmail.com wrote: Hello, Thank you for the slides. I manged to build the kernel modules and I insmod them manually. On the device I copied in /data/lttng following binaries `lttng`, `lttng-relayd` and `lttng-sessiond`. If I execute `./lttng list -k` it shows me a list of available kernel events. I create a session called mysession with `./lttng create mysession` and I enable tracing on all the event with `./lttng enable-event -a -k`. But here starts my problem. The output of the last command is the following: root@android:/data/lttng # ./lttng enable-event -a -k PERROR [3681/3681]: kernel start consumer exec: (null) (in spawn_consumerd() at main.c:2007) Error: Condition timed out. The consumer thread was never ready. Killing it Warning: Using pthread_kill as pthread_cancel is missing on the current platform PERROR [3608/3658]: write poll pipe: (null) (in notify_thread_pipe() at utils.c:43) Error: Events: Fatal error of the session daemon (channel channel0, session mysession) Do you have any idea about what could be wrong? What options should I check in the kernel configuration? (I checked all that is under Tracing) --Ionut On Thu, May 23, 2013 at 6:09 PM, Charles Brière charles.bri...@polymtl.ca wrote: Module location doesn't really matter, we used to push them to /data/... or /sdcard/... . Modprobe doesn't exists on Android so you'll need to use insmod. We used this script https://docs.google.com/file/d/0B56W2viIJ4oqOU1qTHJZY0V2MzQ/editin order to compile, push to device and load modules. We also made a presentation you might be interested in that can be viewed on https://docs.google.com/presentation/d/14lte2AchEAyxMk3WSQ53SdbBm2tfmABBFQojuUhxg7Y/pub?start=falseloop=falsedelayms=3000 On Thu, May 23, 2013 at 10:40 AM, Ionut D. ionut5...@gmail.com wrote: About the kernel modules. Where should they be located on the target? Should I have modprobe or insmod it is enough? On Thu, May 23, 2013 at 2:19 PM, Ionut D. ionut5...@gmail.com wrote: Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.comwrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.comwrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not
Re: [lttng-dev] LTTNG on Android ICS
Hi, I got some problem compiling required libraries for lttng-tools. I did a full android build within repo: $ source build/envsetup.sh $ lunch # with full_maguro-eng $ m Build is fine, but when trying to run configure in lttng-tools, it can't find liboprofile_popt. Here is the error message in config.log: /home/francis/android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/francis/android/repo/out/target/product/maguro/obj/STATIC_LIBRARIES/liboprofile_popt_intermediates/liboprofile_popt.a(popthelp.o): in function singleOptionHelp.isra.4:bionic/libc/include/stdio.h:483: error: undefined reference to '__sprintf_chk' It seems that only the static library of liboprofile_popt is compiled. The symbol is defined in libc.a and libc.so: $ nm ./out/target/product/maguro/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so | grep -E __strlen_chk|__sprintf_chk 0001395d T __sprintf_chk 00012df1 T __strlen_chk I tried to compile the configtest.c file by hand and it worked, so it really seems to be some kind of environment variable that make it fail. For the people who managed to do the configure, what arguments should be supplied to configure? Or maybe it's my android build that is incomplete? Should I build sub-directories in addition to the build in the root android repo sources? Cheers! Francis 2013/5/24 Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca The required kernel configuration options for the modules are listed in the lttng-module README file, located in its project root directory. Some of the 'optional' options also listed there are simply not supported by 3.0.x ARM kernels (such as HAVE_SYSCALL_TRACEPOINTS), so you might be missing some modules compared to what you would get on a (x86 arch w/ recent kernel) platform. You can find more information on syscall tracing on ARM here: http://comments.gmane.org/gmane.linux.kernel.tracing.lttng.devel/5086 On Fri, May 24, 2013 at 6:44 AM, Ionut D. ionut5...@gmail.com wrote: I managed to fix it. It was not finding `lttng-consumerd`, I fixed it by configuring the package with the right path. But, about the kernel modules the question is still pertinent. What options should I check in the kernel configuration? I saw that in my case not all the lttng kernel modules have been compiled. On Fri, May 24, 2013 at 11:07 AM, Ionut D. ionut5...@gmail.com wrote: Hello, Thank you for the slides. I manged to build the kernel modules and I insmod them manually. On the device I copied in /data/lttng following binaries `lttng`, `lttng-relayd` and `lttng-sessiond`. If I execute `./lttng list -k` it shows me a list of available kernel events. I create a session called mysession with `./lttng create mysession` and I enable tracing on all the event with `./lttng enable-event -a -k`. But here starts my problem. The output of the last command is the following: root@android:/data/lttng # ./lttng enable-event -a -k PERROR [3681/3681]: kernel start consumer exec: (null) (in spawn_consumerd() at main.c:2007) Error: Condition timed out. The consumer thread was never ready. Killing it Warning: Using pthread_kill as pthread_cancel is missing on the current platform PERROR [3608/3658]: write poll pipe: (null) (in notify_thread_pipe() at utils.c:43) Error: Events: Fatal error of the session daemon (channel channel0, session mysession) Do you have any idea about what could be wrong? What options should I check in the kernel configuration? (I checked all that is under Tracing) --Ionut On Thu, May 23, 2013 at 6:09 PM, Charles Brière charles.bri...@polymtl.ca wrote: Module location doesn't really matter, we used to push them to /data/... or /sdcard/... . Modprobe doesn't exists on Android so you'll need to use insmod. We used this scripthttps://docs.google.com/file/d/0B56W2viIJ4oqOU1qTHJZY0V2MzQ/editin order to compile, push to device and load modules. We also made a presentation you might be interested in that can be viewed on https://docs.google.com/presentation/d/14lte2AchEAyxMk3WSQ53SdbBm2tfmABBFQojuUhxg7Y/pub?start=falseloop=falsedelayms=3000 On Thu, May 23, 2013 at 10:40 AM, Ionut D. ionut5...@gmail.com wrote: About the kernel modules. Where should they be located on the target? Should I have modprobe or insmod it is enough? On Thu, May 23, 2013 at 2:19 PM, Ionut D. ionut5...@gmail.com wrote: Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture
Re: [lttng-dev] LTTNG on Android ICS
Good news: you (most likely) won't need to recompile the whole platform to fix the problem! I think we bumped in a similar bitter-sweet-awful error a while back: after some hefty searches, we found it might have something to do with the Android build system globally 'fortifying' the sources against unsafe functions when compiling some of the most recent versions of the platform. I believe adding -D_FORTIFY_SOURCE=0 to the CPPFLAGS when building the tools solved it for us. -PL On Fri, May 24, 2013 at 3:04 PM, Francis Giraldeau francis.girald...@gmail.com wrote: Hi, I got some problem compiling required libraries for lttng-tools. I did a full android build within repo: $ source build/envsetup.sh $ lunch # with full_maguro-eng $ m Build is fine, but when trying to run configure in lttng-tools, it can't find liboprofile_popt. Here is the error message in config.log: /home/francis/android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/francis/android/repo/out/target/product/maguro/obj/STATIC_LIBRARIES/liboprofile_popt_intermediates/liboprofile_popt.a(popthelp.o): in function singleOptionHelp.isra.4:bionic/libc/include/stdio.h:483: error: undefined reference to '__sprintf_chk' It seems that only the static library of liboprofile_popt is compiled. The symbol is defined in libc.a and libc.so: $ nm ./out/target/product/maguro/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so | grep -E __strlen_chk|__sprintf_chk 0001395d T __sprintf_chk 00012df1 T __strlen_chk I tried to compile the configtest.c file by hand and it worked, so it really seems to be some kind of environment variable that make it fail. For the people who managed to do the configure, what arguments should be supplied to configure? Or maybe it's my android build that is incomplete? Should I build sub-directories in addition to the build in the root android repo sources? Cheers! Francis 2013/5/24 Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca The required kernel configuration options for the modules are listed in the lttng-module README file, located in its project root directory. Some of the 'optional' options also listed there are simply not supported by 3.0.x ARM kernels (such as HAVE_SYSCALL_TRACEPOINTS), so you might be missing some modules compared to what you would get on a (x86 arch w/ recent kernel) platform. You can find more information on syscall tracing on ARM here: http://comments.gmane.org/gmane.linux.kernel.tracing.lttng.devel/5086 On Fri, May 24, 2013 at 6:44 AM, Ionut D. ionut5...@gmail.com wrote: I managed to fix it. It was not finding `lttng-consumerd`, I fixed it by configuring the package with the right path. But, about the kernel modules the question is still pertinent. What options should I check in the kernel configuration? I saw that in my case not all the lttng kernel modules have been compiled. On Fri, May 24, 2013 at 11:07 AM, Ionut D. ionut5...@gmail.com wrote: Hello, Thank you for the slides. I manged to build the kernel modules and I insmod them manually. On the device I copied in /data/lttng following binaries `lttng`, `lttng-relayd` and `lttng-sessiond`. If I execute `./lttng list -k` it shows me a list of available kernel events. I create a session called mysession with `./lttng create mysession` and I enable tracing on all the event with `./lttng enable-event -a -k`. But here starts my problem. The output of the last command is the following: root@android:/data/lttng # ./lttng enable-event -a -k PERROR [3681/3681]: kernel start consumer exec: (null) (in spawn_consumerd() at main.c:2007) Error: Condition timed out. The consumer thread was never ready. Killing it Warning: Using pthread_kill as pthread_cancel is missing on the current platform PERROR [3608/3658]: write poll pipe: (null) (in notify_thread_pipe() at utils.c:43) Error: Events: Fatal error of the session daemon (channel channel0, session mysession) Do you have any idea about what could be wrong? What options should I check in the kernel configuration? (I checked all that is under Tracing) --Ionut On Thu, May 23, 2013 at 6:09 PM, Charles Brière charles.bri...@polymtl.ca wrote: Module location doesn't really matter, we used to push them to /data/... or /sdcard/... . Modprobe doesn't exists on Android so you'll need to use insmod. We used this scripthttps://docs.google.com/file/d/0B56W2viIJ4oqOU1qTHJZY0V2MzQ/editin order to compile, push to device and load modules. We also made a presentation you might be interested in that can be viewed on https://docs.google.com/presentation/d/14lte2AchEAyxMk3WSQ53SdbBm2tfmABBFQojuUhxg7Y/pub?start=falseloop=falsedelayms=3000 On Thu, May 23, 2013 at 10:40 AM, Ionut D. ionut5...@gmail.comwrote: About the kernel modules. Where should they be located on the target? Should I have
Re: [lttng-dev] LTTNG on Android ICS
Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.com wrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.com wrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:29: error: expected ';', ',' or ')' before '*' token In file included from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: bionic/libc/include/sys/select.h:42: error: expected ';', ',' or ')' before '*' token On Sat, May 18, 2013 at 10:21 AM, Ionut D. ionut5...@gmail.com wrote: Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a quick (non-mailing-list) exchange: 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
Re: [lttng-dev] LTTNG on Android ICS
About the kernel modules. Where should they be located on the target? Should I have modprobe or insmod it is enough? On Thu, May 23, 2013 at 2:19 PM, Ionut D. ionut5...@gmail.com wrote: Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.com wrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.com wrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:29: error: expected ';', ',' or ')' before '*' token In file included from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: bionic/libc/include/sys/select.h:42: error: expected ';', ',' or ')' before '*' token On Sat, May 18, 2013 at 10:21 AM, Ionut D. ionut5...@gmail.comwrote: Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a
Re: [lttng-dev] LTTNG on Android ICS
Module location doesn't really matter, we used to push them to /data/... or /sdcard/... . Modprobe doesn't exists on Android so you'll need to use insmod. We used this script https://docs.google.com/file/d/0B56W2viIJ4oqOU1qTHJZY0V2MzQ/editin order to compile, push to device and load modules. We also made a presentation you might be interested in that can be viewed on https://docs.google.com/presentation/d/14lte2AchEAyxMk3WSQ53SdbBm2tfmABBFQojuUhxg7Y/pub?start=falseloop=falsedelayms=3000 On Thu, May 23, 2013 at 10:40 AM, Ionut D. ionut5...@gmail.com wrote: About the kernel modules. Where should they be located on the target? Should I have modprobe or insmod it is enough? On Thu, May 23, 2013 at 2:19 PM, Ionut D. ionut5...@gmail.com wrote: Sorry for my late response. At the end after different some adds (defines in libc) I managed to compile them for ICS with NDK r7c. I was a problem of environment. On Tue, May 21, 2013 at 9:26 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.com wrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.com wrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token
Re: [lttng-dev] LTTNG on Android ICS
I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:29: error: expected ';', ',' or ')' before '*' token In file included from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: bionic/libc/include/sys/select.h:42: error: expected ';', ',' or ')' before '*' token On Sat, May 18, 2013 at 10:21 AM, Ionut D. ionut5...@gmail.com wrote: Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a quick (non-mailing-list) exchange: 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 herehttps://drive.google.com/folderview?id=0B55Ba7lWTLh4U0hGeTQ4bmRYRjQusp=sharing; still not perfect). 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). 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). 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). 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. So, simple 'how do I put LTTng on Android' workflow would be this: - Compile modules (using NDK) against device's kernel, making sure its config is appropriate, ship them over via ADB - Compile required external libraries (using repo build system) for the device, ship them over via ADB - Patch up LTTng-* (soon-ish! I could send you the outdated patches
Re: [lttng-dev] LTTNG on Android ICS
The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.com wrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:29: error: expected ';', ',' or ')' before '*' token In file included from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: bionic/libc/include/sys/select.h:42: error: expected ';', ',' or ')' before '*' token On Sat, May 18, 2013 at 10:21 AM, Ionut D. ionut5...@gmail.com wrote: Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a quick (non-mailing-list) exchange: 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 herehttps://drive.google.com/folderview?id=0B55Ba7lWTLh4U0hGeTQ4bmRYRjQusp=sharing; still not perfect). 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
Re: [lttng-dev] LTTNG on Android ICS
Well, I cannot get my hands on a R7 NDK this very moment, but I'm surprised there are no grep hits in the ./platforms/android-XX/arch-arm directory; can you verify that the NDK you have does include an ARM architecture sysroot? That's the the one you should be compiling with, and I believe you'll find the asm/unistd.h header there (as there is no 32/64 bit difference on Android+ARM yet). On Tue, May 21, 2013 at 11:29 AM, Ionut D. ionut5...@gmail.com wrote: The problem is that I am trying to build it on ICS with NDK r7 and I tried to build it in the both ways with the ndk and also by creating Android.mk files and it looks like is not working. I searched with grep firstly through NDK and second through bionic and these are the results: NDK: #grep -r __NR_splice . ./platforms/android-9/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 ./platforms/android-14/arch-x86/usr/include/asm/unistd_32.h:#define __NR_splice 313 bionic: grep -r __NR_splice bionic bionic/libc/kernel/arch-sh/asm/unistd_32.h:#define __NR_splice 313 bionic/libc/kernel/arch-sh/asm/unistd_64.h:#define __NR_splice 341 bionic/libc/kernel/arch-x86/asm/unistd_32.h:#define __NR_splice 313 Looking through results I see that '__NR_splice' it not in unistd.h and I know this is important. Ionut On Tue, May 21, 2013 at 5:15 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: The first error refers to __NR_splice, which should be declared once asm/unistd.h is included; in this case, it is included right above the problematic line (src/common/compat/fcntl.h @ L35). Could you verify that __NR_splice is defined somewhere in that file? If not, it might be a little more problematic. As for the second error, I believe it is also caused by a missing symbol that should be included in asm/signal.h, which is in turn usually included via signal.h itself. Compiling with the NDK (v8, platform 14) is successful here, and I can find all these missing symbols in the default system includes there. Are you sure you specified the target sysroot when compiling? -PL On Tue, May 21, 2013 at 6:26 AM, Ionut D. ionut5...@gmail.com wrote: I tried to compile lttng-tools and at compile time exits with the bellow error. I looked in the sources and it looks like for arm this is not implemented. Do you have any idea about how could this be fixed? In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h: In function 'splice': external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: '__NR_splice' undeclared (first use in this function) external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: (Each undeclared identifier is reported only once external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:44: error: for each function it appears in.) In file included from external/lttng-tools/src/common/compat/compat-fcntl.c:19: external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:48:1: warning: POSIX_FADV_DONTNEED redefined In file included from external/lttng-tools/src/common/compat/../../../src/common/compat/fcntl.h:47, from external/lttng-tools/src/common/compat/compat-fcntl.c:19: bionic/libc/kernel/common/linux/fadvise.h:24:1: warning: this is the location of the previous definition In file included from bionic/libc/include/sys/select.h:34, from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: external/lttng-tools/src/common/compat/signal.h: At top level: external/lttng-tools/src/common/compat/signal.h:27: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:28: error: expected ';', ',' or ')' before '*' token external/lttng-tools/src/common/compat/signal.h:29: error: expected ';', ',' or ')' before '*' token In file included from bionic/libc/include/unistd.h:34, from external/lttng-tools/src/common/compat/compat-fcntl.c:20: bionic/libc/include/sys/select.h:42: error: expected ';', ',' or ')' before '*' token On Sat, May 18, 2013 at 10:21 AM, Ionut D. ionut5...@gmail.com wrote: Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a quick (non-mailing-list) exchange: 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
Re: [lttng-dev] LTTNG on Android ICS
Great informations! I will post back the results. On Fri, May 17, 2013 at 4:47 PM, Pierre-Luc St-Charles pierre-luc.st-char...@polymtl.ca wrote: Alright, small update for all following a quick (non-mailing-list) exchange: 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 herehttps://drive.google.com/folderview?id=0B55Ba7lWTLh4U0hGeTQ4bmRYRjQusp=sharing; still not perfect). 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). 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). 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). 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. So, simple 'how do I put LTTng on Android' workflow would be this: - Compile modules (using NDK) against device's kernel, making sure its config is appropriate, ship them over via ADB - Compile required external libraries (using repo build system) for the device, ship them over via ADB - 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) - Cross-compile LTTng-* for the device (using NDK), ship binaries over via ADB Then, on the device, start up the sessiond manually start tracing. I think I went over everything, but if there's a part that's still cloudy, don't hesitate. -PL On May 17, 2013 1:32 AM, Ionut D. ionut5...@gmail.com wrote: Hello all, 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. 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. It is ok? what I am trying to do ? to integrate and build by using the Android build system. 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 ? 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. I mention that I am trying to build lttng 2.x on ICS 4.0.3. Would be great if you will give me a tutorial about how to do it. Ionut ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTNG on Android ICS
Le 2013-05-17 01:32, Ionut D. a écrit : Hello all, 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. 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. It is ok? what I am trying to do ? to integrate and build by using the Android build system. 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 ? Hi! A group of students at Ecole Polytechnique of Montreal worked on that topic. They were able to get a kernel trace from Nexus 7 tablet. It required small modifications to tools, and cleanup is in process to merge patches upstream[1]. Kernel tracing is working, while UST requires still some work on few bugs. I received the confirmation from the students the build scripts they created will be released under open source licence soon. LTTng tools depends on two libraries libpopt and libuuid that are in android sources. It's simpler to just build the whole thing. Once tools are built, then they can be installed on the target. A tutorial would be a must! I'm installing it on my phone right now, if nobody else did the tutorial by then, I will do so. That would be great if this was to be integrated in the dev tools in the android source repo! Cheers, Francis [1] http://git.dorsal.polymtl.ca/~cbriere?p=lttng-tools.git;a=summary http://git.dorsal.polymtl.ca/%7Ecbriere?p=lttng-tools.git;a=summary branch portAndroid-rebased-signed smime.p7s Description: Signature cryptographique S/MIME ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] LTTNG on Android ICS
Alright, small update for all following a quick (non-mailing-list) exchange: 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 herehttps://drive.google.com/folderview?id=0B55Ba7lWTLh4U0hGeTQ4bmRYRjQusp=sharing; still not perfect). 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). 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). 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). 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. So, simple 'how do I put LTTng on Android' workflow would be this: - Compile modules (using NDK) against device's kernel, making sure its config is appropriate, ship them over via ADB - Compile required external libraries (using repo build system) for the device, ship them over via ADB - 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) - Cross-compile LTTng-* for the device (using NDK), ship binaries over via ADB Then, on the device, start up the sessiond manually start tracing. I think I went over everything, but if there's a part that's still cloudy, don't hesitate. -PL On May 17, 2013 1:32 AM, Ionut D. ionut5...@gmail.com wrote: Hello all, 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. 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. It is ok? what I am trying to do ? to integrate and build by using the Android build system. 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 ? 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. I mention that I am trying to build lttng 2.x on ICS 4.0.3. Would be great if you will give me a tutorial about how to do it. Ionut ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] lttng on android
I believe a group at l'ecole polytechnique de Montreal is working on this, Genvieve, could you please comment more? On 13-01-21 06:48 AM, Amit Balboul wrote: Hi, Is there a way to build the LTTng tools to Android (3.0.31) on ARM ?? I've managed to compile the modules(2.0.6), put them in the Android device and modprobe them. Now I would like to extract the traces logs from the device. How can I do it ? Is there any support for this at all in the LTTng project ? Thank you for your response ! Amit. ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] lttng on android
Hi Amit, Indeed there is a group of students working on putting lttng on android, maybe make it work through adb. As the semester advances, they may publish some of their work and hopefully by the end of april, lttng will be supported and documented on Android. In the meantime, if you have managed to compile and modprobe the modules, have you tried obtaining a trace from the command line. What does it do, what message do you get? Geneviève On 01/21/2013 10:23 AM, Matthew Khouzam wrote: I believe a group at l'ecole polytechnique de Montreal is working on this, Genvieve, could you please comment more? On 13-01-21 06:48 AM, Amit Balboul wrote: Hi, Is there a way to build the LTTng tools to Android (3.0.31) on ARM ?? I've managed to compile the modules(2.0.6), put them in the Android device and modprobe them. Now I would like to extract the traces logs from the device. How can I do it ? Is there any support for this at all in the LTTng project ? Thank you for your response ! Amit. ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] lttng on android
Hi, I'm one of the student working on porting lttng to android at Ecole Polytechnique Montreal. As of right now we haven't begun to develop tools to support creating and extracting traces on android devices. It should take a few months before we finish the project, in the mean time you could look at these previous porting attempts: https://docs.google.com/open?id=0B2aE_idi5Wt8MzZER1dLTGxRWmloU3ZZWEY1cUdzZw http://lists.lttng.org/pipermail/lttng-dev/2012-February/017626.html Have a nice day! Francis Labarre ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] lttng on android
We are indeed exploring a few ways to extract the traces through ADB at the moment, but our work has barely taken off yet; we should have a more solid grasp on the subject in a few more days. Until then, I believe other students that are part of this work group are on the mailing list (and they could have explored the topic a bit more than I did), and might be able to give you a few more details today or tomorrow. On Mon, Jan 21, 2013 at 10:23 AM, Matthew Khouzam matthew.khou...@ericsson.com wrote: I believe a group at l'ecole polytechnique de Montreal is working on this, Genvieve, could you please comment more? On 13-01-21 06:48 AM, Amit Balboul wrote: Hi, Is there a way to build the LTTng tools to Android (3.0.31) on ARM ?? I've managed to compile the modules(2.0.6), put them in the Android device and modprobe them. Now I would like to extract the traces logs from the device. How can I do it ? Is there any support for this at all in the LTTng project ? Thank you for your response ! Amit. ___ lttng-dev mailing listlttng-dev@lists.lttng.orghttp://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ___ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev