From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mehran Khan Subject: (no subject) Date: Tue, 21 Jan 2014 18:34:20 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1226367390==" Return-path: Received: from sg2plout10-02.prod.sin2.secureserver.net ([182.50.145.5]) by ltt.polymtl.ca with esmtp (Exim 4.72) (envelope-from ) id 1W5kq0-00048e-2i for lttng-dev@lists.lttng.org; Tue, 21 Jan 2014 18:34:39 -0500 Received: by mail-ea0-f169.google.com with SMTP id l9so3578401eaj.14 for ; Tue, 21 Jan 2014 15:34:20 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org To: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org --===============1226367390== Content-Type: multipart/alternative; boundary=047d7beb93949596b204f083728a --047d7beb93949596b204f083728a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello everyone, I have been trying to instrument the Apache web server, the latest version (2.4.7 from the URL http://httpd.apache.org/download.cgi#apache24) for LTTng UST tracing 1. To start with the simplest case, I created a *.tp file named *smallestTracePoint.tp* with the content below TRACEPOINT_EVENT( mk, apache_process_entry, TP_ARGS(), TP_FIELDS() ) 2. Then I ran the following lttng-gen-tp smallestTracePoint.tp -o smallestTracePoint.h -o smallestTracePoint.c which generated the files smallestTracePoint.c and smallestTracePoint.h 3. Then, I put the *smallestTracePoint.h* and *smallestTracePoint.c* in *httpd-2.4.7/server* directory, included *smallestTracePoint.h *in the *main.c *file and added trace points in the int *main(int argc, const char * const argv[])* and **init_process(int *argc, const char * const * *argv)* functions. 4. Then I added *-finstrument-functions* in the *configure* file (Line number 2830) in the extracted *httpd-2.4.7* directory, full line below ac_compile=3D'$CC -c $CFLAGS -finstrument-functions $CPPFLAGS conftest.$ac_ext >&5' 5. Then, from the /httpd-2.4.7 directory, I ran the following command to configure the installation, it completed without any error. ./configure --libdir=3D/usr/lib/usr/lib/liblttng-ust.so --with-included-apr 6. When I ran the command 'make', I get the following error after a while ... make[1]: Entering directory `/root/httpd-2.4.7' /root/httpd-2.4.7/srclib/apr/libtool --silent --mode=3Dcompile gcc -std=3Dgnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -= I. -I/root/httpd-2.4.7/os/unix -I/root/httpd-2.4.7/include -I/root/httpd-2.4.7/srclib/apr/include -I/root/httpd-2.4.7/srclib/apr-util/include -I/root/httpd-2.4.7/srclib/apr-util/xml/expat/lib -I/root/httpd-2.4.7/modules/aaa -I/root/httpd-2.4.7/modules/cache -I/root/httpd-2.4.7/modules/core -I/root/httpd-2.4.7/modules/database -I/root/httpd-2.4.7/modules/filters -I/root/httpd-2.4.7/modules/ldap -I/root/httpd-2.4.7/modules/loggers -I/root/httpd-2.4.7/modules/lua -I/root/httpd-2.4.7/modules/proxy -I/root/httpd-2.4.7/modules/session -I/root/httpd-2.4.7/modules/ssl -I/root/httpd-2.4.7/modules/test -I/root/httpd-2.4.7/server -I/root/httpd-2.4.7/modules/arch/unix -I/root/httpd-2.4.7/modules/dav/main -I/root/httpd-2.4.7/modules/generators -I/root/httpd-2.4.7/modules/mappers -prefer-non-pic -static -c modules.c && touch modules.lo gcc -std=3Dgnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/root/httpd-2.4.7/os/unix -I/root/httpd-2.4.7/include -I/root/httpd-2.4.7/srclib/apr/include -I/root/httpd-2.4.7/srclib/apr-util/include -I/root/httpd-2.4.7/srclib/apr-util/xml/expat/lib -I/root/httpd-2.4.7/modules/aaa -I/root/httpd-2.4.7/modules/cache -I/root/httpd-2.4.7/modules/core -I/root/httpd-2.4.7/modules/database -I/root/httpd-2.4.7/modules/filters -I/root/httpd-2.4.7/modules/ldap -I/root/httpd-2.4.7/modules/loggers -I/root/httpd-2.4.7/modules/lua -I/root/httpd-2.4.7/modules/proxy -I/root/httpd-2.4.7/modules/session -I/root/httpd-2.4.7/modules/ssl -I/root/httpd-2.4.7/modules/test -I/root/httpd-2.4.7/server -I/root/httpd-2.4.7/modules/arch/unix -I/root/httpd-2.4.7/modules/dav/main -I/root/httpd-2.4.7/modules/generators -I/root/httpd-2.4.7/modules/mappers -c /root/httpd-2.4.7/server/buildmark.= c /root/httpd-2.4.7/srclib/apr/libtool --silent --mode=3Dlink gcc -std=3Dgnu9= 9 -g -O2 -pthread -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/core/libmod_so.la modules/http/libmod_http.laserver/mpm/event/ libevent.la os/unix/libos.la -L/usr/lib/x86_64-linux-gnu -lpcre /root/httpd-2.4.7/srclib/apr-util/libaprutil-1.la/root/httpd-2.4.7/srclib/a= pr-util/xml/expat/ libexpat.la /root/httpd-2.4.7/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl server/.libs/libmain.a(main.o): In function `main': /root/httpd-2.4.7/server/main.c:443: undefined reference to `__tracepoint_mk___apache_process_entry' server/.libs/libmain.a(main.o): In function `init_process': /root/httpd-2.4.7/server/main.c:284: undefined reference to `__tracepoint_mk___apache_process_entry' server/.libs/libmain.a(main.o): In function `__tracepoint_cb_mk___apache_process_entry': /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `__tracepoint_mk___apache_process_entry' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `__tracepoint_mk___apache_process_entry' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' /root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen' collect2: ld returned 1 exit status make[1]: *** [httpd] Error 1 make[1]: Leaving directory `/root/httpd-2.4.7' make: *** [all-recursive] Error 1 I have tried including the *smallestTracePoint.c* file in the local makefile (*/root/httpd-2.4.7/MakeFile)*... didn't do me any good. Any idea what I am doing wrong ? LTTng version on the instance: 2.4.0-rc2 - =C9poque Opaque Linux Distribution: Ubuntu 12.04.3 LTS Thanks, --=20 Mehran --047d7beb93949596b204f083728a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello everyone,
I have been= trying to instrument the Apache web server, the latest version (2.4.7 from= the URL http://h= ttpd.apache.org/download.cgi#apache24) for LTTng UST tracing
1. To start with the simplest case, I created a *.tp file named smallest= TracePoint.tp with the content below
=A0=A0=A0 TRACEPOINT_EVENT(
=A0=A0=A0 mk,
=A0=A0= =A0 apache_process_entry,
=A0=A0=A0 TP_ARGS(),
=A0=A0=A0 TP_FIELDS()
=A0 )

2. Then I ran the following
=A0=A0 lttng-gen-tp smallestTracePoint.tp -o smallestTrac= ePoint.h -o smallestTracePoint.c

which generated the files
smallestTracePoin= t.c and smallestTracePoint.h

3. Then, I put= the smallestTracePoint.h and smallestTracePoint.c in httpd-2.4.7/server directory,
included=A0 smallestTracePoint.h in the main.c=A0 file and added trace points in the int m= ain(int argc, const char * const argv[]) and *init_process(int *argc= , const char * const * *argv) functions.

4. Then I adde= d -finstrument-functions in the configure file (Line= number 2830) in the extracted httpd-2.4.7 directory, full line belo= w
=A0 ac_compile=3D'$CC -c $CFLAGS -finstrument-functions $CPPFLAGS conft= est.$ac_ext >&5'
=A0= =A0=A0
5. Then, from the /httpd-2.4.7 directory, I ran the fol= lowing command to configure the installation, it completed without any erro= r.
=A0=A0=A0 ./configure --l= ibdir=3D/usr/lib/usr/lib/liblttng-ust.so --with-included-apr

=
6. When I ran the command 'make', I get the following error after a= while
...
make[1]:= Entering directory `/root/httpd-2.4.7'
/root/httpd-2.4.7/srclib/apr= /libtool --silent --mode=3Dcompile gcc -std=3Dgnu99=A0 -g -O2 -pthread=A0= =A0=A0=A0=A0 -DLINUX -D_REENTRANT -D_GNU_SOURCE=A0=A0=A0=A0 -I. -I/root/htt= pd-2.4.7/os/unix -I/root/httpd-2.4.7/include -I/root/httpd-2.4.7/srclib/apr= /include -I/root/httpd-2.4.7/srclib/apr-util/include -I/root/httpd-2.4.7/sr= clib/apr-util/xml/expat/lib -I/root/httpd-2.4.7/modules/aaa -I/root/httpd-2= .4.7/modules/cache -I/root/httpd-2.4.7/modules/core -I/root/httpd-2.4.7/mod= ules/database -I/root/httpd-2.4.7/modules/filters -I/root/httpd-2.4.7/modul= es/ldap -I/root/httpd-2.4.7/modules/loggers -I/root/httpd-2.4.7/modules/lua= -I/root/httpd-2.4.7/modules/proxy -I/root/httpd-2.4.7/modules/session -I/r= oot/httpd-2.4.7/modules/ssl -I/root/httpd-2.4.7/modules/test -I/root/httpd-= 2.4.7/server -I/root/httpd-2.4.7/modules/arch/unix -I/root/httpd-2.4.7/modu= les/dav/main -I/root/httpd-2.4.7/modules/generators -I/root/httpd-2.4.7/mod= ules/mappers=A0 -prefer-non-pic -static -c modules.c && touch modul= es.lo
gcc -std=3Dgnu99=A0 -g -O2 -pthread=A0=A0=A0=A0=A0 -DLINUX -D_REENTRANT -D_= GNU_SOURCE=A0=A0=A0=A0 -I. -I/root/httpd-2.4.7/os/unix -I/root/httpd-2.4.7/= include -I/root/httpd-2.4.7/srclib/apr/include -I/root/httpd-2.4.7/srclib/a= pr-util/include -I/root/httpd-2.4.7/srclib/apr-util/xml/expat/lib -I/root/h= ttpd-2.4.7/modules/aaa -I/root/httpd-2.4.7/modules/cache -I/root/httpd-2.4.= 7/modules/core -I/root/httpd-2.4.7/modules/database -I/root/httpd-2.4.7/mod= ules/filters -I/root/httpd-2.4.7/modules/ldap -I/root/httpd-2.4.7/modules/l= oggers -I/root/httpd-2.4.7/modules/lua -I/root/httpd-2.4.7/modules/proxy -I= /root/httpd-2.4.7/modules/session -I/root/httpd-2.4.7/modules/ssl -I/root/h= ttpd-2.4.7/modules/test -I/root/httpd-2.4.7/server -I/root/httpd-2.4.7/modu= les/arch/unix -I/root/httpd-2.4.7/modules/dav/main -I/root/httpd-2.4.7/modu= les/generators -I/root/httpd-2.4.7/modules/mappers=A0 -c /root/httpd-2.4.7/= server/buildmark.c
/root/httpd-2.4.7/srclib/apr/libtool --silent --mode=3Dlink gcc -std=3Dgnu9= 9=A0 -g -O2 -pthread=A0=A0=A0=A0=A0=A0=A0=A0 -o httpd=A0 modules.lo buildma= rk.o -export-dynamic server/libmain.la mo= dules/core/libmod_so.la modules/http/libmod_http.la server/mpm/event/libevent.la os/unix/libos.la -L/usr/lib/x86_64-linux-gnu -lpcre=A0=A0=A0=A0 /root/httpd-2.= 4.7/srclib/apr-util/libaprutil-1.la = /root/httpd-2.4.7/srclib/apr-util/xml/expat/= libexpat.la /root/httpd-2.4.7/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
server/.libs/libmain.a(main.o): In function `main':
/root/httpd-2.4.= 7/server/main.c:443: undefined reference to `__tracepoint_mk___apache_proce= ss_entry'
server/.libs/libmain.a(main.o): In function `init_process&= #39;:
/root/httpd-2.4.7/server/main.c:284: undefined reference to `__tracepoint_m= k___apache_process_entry'
server/.libs/libmain.a(main.o): In functio= n `__tracepoint_cb_mk___apache_process_entry':
/root/httpd-2.4.7/ser= ver/smallestTracePoint.h:13: undefined reference to `tracepoint_dlopen'=
/root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `_= _tracepoint_mk___apache_process_entry'
/root/httpd-2.4.7/server/smal= lestTracePoint.h:13: undefined reference to `tracepoint_dlopen'
/root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `t= racepoint_dlopen'
/root/httpd-2.4.7/server/smallestTracePoint.h:13: = undefined reference to `tracepoint_dlopen'
/root/httpd-2.4.7/server/= smallestTracePoint.h:13: undefined reference to `__tracepoint_mk___apache_p= rocess_entry'
/root/httpd-2.4.7/server/smallestTracePoint.h:13: undefined reference to `t= racepoint_dlopen'
/root/httpd-2.4.7/server/smallestTracePoint.h:13: = undefined reference to `tracepoint_dlopen'
collect2: ld returned 1 e= xit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/root/httpd-2.4= .7'
make: *** [all-recursive] Error 1


I have tried inc= luding the smallestTracePoint.c file in the local makefile (/root= /httpd-2.4.7/MakeFile)... didn't do me any good.
Any idea what I am doing wrong ?


LTTng version on the instance: 2.4.0-rc2 - =C9poque Opaque

Linux Distribution: Ubuntu 12.04.3 LTS

Thanks,


--
Mehran

=
--047d7beb93949596b204f083728a-- --===============1226367390== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============1226367390==--