On Fri, Feb 09, 2018 at 11:07:47PM -0500, Shieryn Tjandra wrote: > Good Evening, > > Hi There, > > I have inquiries regarding LTTNG, I followed the tutorial in this link : > > http://lttng.org/docs/v2.10/#doc-tracing-your-own-user-application
Does it work with the basic application described in this section ? Without thread and all? > > However, after executing the c application, when I checked whether the > process was in the userspace event (UST), the process was not there. Next, > I tried to record the traces, as I thought, my traces output file does not > contain any traces. I also have make sure that liblttng-ust has been > installed. I really appreciate if you can help me to overcome this problem, > if you need additional file, let me know. > > I am using centos 7 by the way. > > Here is my command line > [root@localhost tracepractice]# gcc -c -I. app_tp.c > [root@localhost tracepractice]# gcc -c app.c -lpthread > [root@localhost tracepractice]# gcc -o try app.o app_tp.o -lpthread > -llttng-ust -ldl > [root@localhost tracepractice]# ./try and beyond > Main thread: : pid = 17231 lwp = 17231 priority = 0 > Thread 4: : pid = 17231 lwp = 17234 priority = 0 > Thread 2: : pid = 17231 lwp = 17236 priority = 8 > Thread 1: : pid = 17231 lwp = 17237 priority = 12 > Thread 1: Hello! I am thread 4 and I more important than 1, 2 and 3. My > count is now 0 > Thread 3: : pid = 17231 lwp = 17235 priority = 4 > Thread 4: Hello! I am thread 1 and I not very important. My count > is now 1 > Thread 2: Hello! I am thread 3 and I more important than 1 and 2. My > count is now 0 > Thread 3: Hello! I am thread 2 and I more important than 1. My > count is now 1 > Thread 2: Hello! I am thread 3 and I more important than 1 and 2. My > count is now 262144 > Thread 3: Hello! I am thread 2 and I more important than 1. My > count is now 262145 > sig_ala [cound down=1] > sig_ala [cound down=0] > [root@localhost tracepractice]# lttng-sessiond --daemonize > [root@localhost tracepractice]# lttng list --userspace > UST events: > ------------- > None Is your application running at that point? If not, "lttng list --userspace" will only list tracepoints for ongoing application. > > [root@localhost tracepractice]# lttng create mytrace > Session mytrace created. > Traces will be written in /root/lttng-traces/mytrace-20180209-013417 > [root@localhost tracepractice]# lttng enable-event --userspace > app_tp:first_tracepoint > UST event app_tp:first_tracepoint created in channel channel0 > [root@localhost tracepractice]# lttng start > Tracing started for session mytrace > [root@localhost tracepractice]# ./try Could you launch your application with LTTNG_UST_DEBUG=y and provide us the resulting output? e.g: LTTNG_UST_DEBUG=y ./try Does your application uses fork()? Could you provide the source code of your test application (github?). > Main thread: : pid = 17301 lwp = 17301 priority = 0 > Thread 4: : pid = 17301 lwp = 17304 priority = 0 > Thread 2: : pid = 17301 lwp = 17306 priority = 8 > Thread 1: : pid = 17301 lwp = 17307 priority = 12 > Thread 1: Hello! I am thread 4 and I more important than 1, 2 and 3. My > count is now 0 > Thread 4: Hello! I am thread 1 and I not very important. My count > is now 1 > Thread 3: : pid = 17301 lwp = 17305 priority = 4 > Thread 2: Hello! I am thread 3 and I more important than 1 and 2. My > count is now 0 > Thread 3: Hello! I am thread 2 and I more important than 1. My > count is now 1 > Thread 2: Hello! I am thread 3 and I more important than 1 and 2. My > count is now 262144 > Thread 3: Hello! I am thread 2 and I more important than 1. My > count is now 262145 > sig_ala [cound down=1] > Thread 2: Hello! I am thread 3 and I more important than 1 and 2. My > count is now 524288 > Thread 3: Hello! I am thread 2 and I more important than 1. My > count is now 524289 > sig_ala [cound down=0] > [root@localhost tracepractice]# lttng stop > Waiting for data availability > Tracing stopped for session mytrace > [root@localhost tracepractice]# babeltrace ~/lttng-traces/mytrace* > [root@localhost tracepractice]# ls ~/lttng-traces/mytrace* -l > total 0 > drwxrwx---. 3 root root 17 Feb 9 01:35 ust Actual trace files are normally deeper in the trace directory. e.g $ tree -h lttng-traces/auto-20180207-150736/ lttng-traces/auto-20180207-150736/ └── [4.0K] ust └── [4.0K] uid └── [4.0K] 1000 └── [4.0K] 64-bit ├── [296K] channel0_0 ├── [576K] channel0_1 ├── [300K] channel0_2 ├── [400K] channel0_3 ├── [4.0K] index │ ├── [ 232] channel0_0.idx │ ├── [ 376] channel0_1.idx │ ├── [ 232] channel0_2.idx │ └── [ 304] channel0_3.idx └── [ 16K] metadata 5 directories, 9 files Cheers -- Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev