From owner-freebsd-current@FreeBSD.ORG Mon Oct 18 23:05:12 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 018E71065670; Mon, 18 Oct 2010 23:05:12 +0000 (UTC) (envelope-from leccine@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 91F4E8FC16; Mon, 18 Oct 2010 23:05:11 +0000 (UTC) Received: by iwn36 with SMTP id 36so209868iwn.13 for ; Mon, 18 Oct 2010 16:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=pmnA8NJ0z5l/NLtclYLASlOxSjBP7S82VsTy2UgE7SQ=; b=FT2+p41bRnGAkMb0TT97hBhYKp/nbzT0EwWck9xIScXLLLojoa+V+rfgbgkzVjpF/I EG2LYsf0AnRnfds1wcpudUEqxpI5qt3RFFVzowCEVRafFTOhu3ZUCckDWMGpF78JxOGq cggm6oDJXKwL1Em44vnTC+RB+kWrhc3L6nR8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Shww+zy06uFT7S24PiN//zq/XDWk9dINZCWMFjemdQBiOf1XqBNipQ4gtSjZxZJdM9 3ghemvDuaWJb46Y8usxTm/zkAsbA2LXtUKNO7OIyiNmD9ORNbmqO3KdUU/XL4xPxLawH X/Y5w7CqX2b0w0GhB1ZXLhnSMAL4K6TiMUTMI= MIME-Version: 1.0 Received: by 10.42.169.5 with SMTP id z5mr470151icy.172.1287443110869; Mon, 18 Oct 2010 16:05:10 -0700 (PDT) Received: by 10.231.32.130 with HTTP; Mon, 18 Oct 2010 16:05:10 -0700 (PDT) In-Reply-To: References: <7EC03A5E-61DA-46AB-95E1-1D844E10C735@FreeBSD.org> Date: Tue, 19 Oct 2010 00:05:10 +0100 Message-ID: From: =?UTF-8?Q?Istv=C3=A1n?= To: Garrett Cooper X-Mailman-Approved-At: Mon, 18 Oct 2010 23:43:57 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current , Rui Paulo Subject: Re: DTrace bindings are missing in FreeBSD 9.0 - CURRENT for userland apps X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 23:05:12 -0000 Hey Garrett, thanks for coming back to me. 1. I had make clean before I did make install clean. 2. $ ./configure --with-libraries=3D/usr/local/lib --with-includes=3D/usr/local/include --enable-thread-safety --with-openssl --enable-dtrace --with-pam --enable-nls --prefix=3D/usr/local --mandir=3D/usr/local/man --infodir=3D/usr/local/info/ --build=3Damd64-portbld-freebsd9.0 uname -v =3D FreeBSD 9.0-CURRENT #0: Fri Oct 8 21:09:20 UTC 2010 root@freebsd9:/usr/obj/usr/src/sys/DTRACE configure:2820: checking for dtrace configure:2836: found /usr/sbin/dtrace configure:2847: result: dtrace | #define ENABLE_DTRACE 1 ac_cv_prog_DTRACE=3Ddtrace DTRACE=3D'dtrace' DTRACEFLAGS=3D'' configure_args=3D' '\''--with-libraries=3D/usr/local/lib'\'' '\''--with-includes=3D/usr/local/include'\'' '\''--enable-thread-safety'\'' '\''--with-openssl'\'' '\''--enable-dtrace'\'' '\''--with-pam'\'' '\''--enable-nls'\'' '\''--prefix=3D/usr/local'\'' '\''--mandir=3D/usr/local/man'\'' '\''--infodir=3D/usr/local/info/'\'' '\''--build=3Damd64-portbld-freebsd9.0'\'' '\''build_alias=3Damd64-portbld-freebsd9.0'\'' '\''CC=3Dcc'\'' '\''CFLAGS= =3D-O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing'\'' '\''LDFLAGS=3D -L/usr/local/lib -rpath=3D/usr/lib:/usr/local/lib -lelf -L/usr/local/lib'\'= ' '\''CPPFLAGS=3D-I/usr/local/include'\''' enable_dtrace=3D'yes' #define ENABLE_DTRACE 1 The server is running: [root@freebsd9/usr/ports/databases/postgresql90-server/work/postgresql-9.0.= 1]# ps aux | grep post pgsql 86977 0.0 1.0 61992 9984 ?? Ss 10:01PM 0:00.97 /usr/local/bin/postgres -D /usr/local/pgsql/data pgsql 86979 0.0 1.0 61992 10004 ?? Rs 10:01PM 0:06.48 postgres: writer process (postgres) pgsql 86980 0.0 1.0 61992 10004 ?? Rs 10:01PM 0:03.44 postgres: wal writer process (postgres) pgsql 86981 0.0 1.0 61992 10880 ?? Ss 10:01PM 0:00.99 postgres: autovacuum launcher process (postgres) pgsql 86982 0.0 0.8 24896 8056 ?? Ss 10:01PM 0:00.56 postgres: stats collector process (postgres) According to the manual: http://www.postgresql.org/docs/8.2/static/dynamic-trace.html [root@freebsd9/usr/ports/databases/postgresql90-server/work/postgresql-9.0.= 1]# ls src/include/pg_trace.h This file is there. But I can't see the probes in the list: dtrace -l | grep -i postgres Further info: [root@freebsd9 ~]# /usr/local/etc/rc.d/postgresql restart dtrace DOF postgres: DTrace ioctl failed for DOF at 0x801c35000: Invalid argument Any time I would like to start dtrace on the servers pid the daemon is crashing wo/ any log. I. On Mon, Oct 18, 2010 at 11:48 PM, Garrett Cooper wrote= : > On Mon, Oct 18, 2010 at 2:48 PM, Istv=C3=A1n wrote: > > I perfectly understand what you are saying and I have been DTracing on > > Solaris many times. > > > > Only problem here is that you don't get my point, but I try to explain = it > on > > the level you can get it. > > > > > > [root@freebsd9 /usr/ports/databases/postgresql90-server]# grep -iA3 > > WITH_DTRACE Makefile > > . if defined(WITH_DTRACE) > > CONFIGURE_ARGS+=3D--enable-dtrace > > LDFLAGS+=3D-lelf > > . endif > > > > [root@freebsd9 /usr/ports/databases/postgresql90-server]# grep -i dtrac= e > > /var/db/ports/postgresql90/options > > WITH_DTRACE=3Dtrue > > > > [root@freebsd9 /usr/ports/databases/postgresql90-server]# make install > clean > > > > > > What other dependency might cause the lack of DTrace bindings for > > postgres90-server? > > > > > > If you don't get my point at this stage then we don't have anything to > talk > > about, and I don't understand how can the FreeBSD project use a tool li= ke > > you. :) > > > > > > Hope I make it clear what is not working and what must work. > > > > I. > > > > > > > > > > > > On Mon, Oct 18, 2010 at 10:40 PM, Rui Paulo wrote: > > > >> > >> On 18 Oct 2010, at 22:37, Istv=C3=A1n wrote: > >> > >> > So there is no out of the box solution for FreeBSD to use DTrace for > any > >> userland app. > >> > >> What have I been saying ? Userland DTrace support works on FreeBSD 9.0= , > but > >> I don't think you understand what userland DTrace support requires. Fo= r > >> PostgreSQL and Ruby you need to re-compile the software with DTrace > support > >> enabled. This is the same on Solaris. > >> > >> > > >> > Is there somebody in the FreeBSD team actively working on this? > >> > > >> > > >> > I. > >> > > >> > > >> > On Mon, Oct 18, 2010 at 10:33 PM, Rui Paulo > wrote: > >> > > >> > On 18 Oct 2010, at 22:30, Istv=C3=A1n wrote: > >> > > >> > > what should I do with the Makefile exactly? I can't see any dtrace > >> related information in it. > >> > > >> > Each software package has it's way of enabling DTrace during the > build. > >> Check the postgres90-server port for an example on how to add DTrace > support > >> to a port. > > 1. I'd do clean install, not install clean to start from a consistent > state. > 2. What do the autoconf logs say about dtrace support being > enabled (make clean configure will provide that data with the least > number of cycles spent)? > Thanks, > -Garrett > --=20 the sun shines for all http://blog.l1x.me