develooper Front page | perl.perl5.porters | Postings from April 2012

[perl #112512] -Dusedtrace doesn't work on FreeBSD

Thread Previous
From:
Tony Cook via RT
Date:
April 30, 2012 03:10
Subject:
[perl #112512] -Dusedtrace doesn't work on FreeBSD
Message ID:
rt-3.6.HEAD-4610-1335780630-214.112512-15-0@perl.org
On Tue Apr 17 21:13:35 2012, swills wrote:
> This is a bug report for perl from steve@mouf.net,
> generated with the help of perlbug 1.39 running under perl 5.12.4.
> 
> 
> -----------------------------------------------------------------
> enabling dtrace via -Dusedtrace doesn't work.
> 
> The call to dtrace in Makefile.SH needs to have -64 added, since I'm
>    on a 64
> bit system, although I'm not sure it should be. Also, these addtional
>    libs need
> to be added to the miniperl and libperl link:
> 
> -ldtrace -ldwarf -lelf -lproc -lctf -lrtld_db -lz
> 
> Also, -pthread may also be needed in some cases. These may be issues
>    on the
> FreeBSD side, I'll try to investigate.

Ignoring 64-bit for now, I can get blead with usedtrace building with:

case "$usedtrace" in
$define|true|[Yy]*) libswanted="$libswanted elf"
esac

Based on reading:

http://wiki.freebsd.org/DTrace/userland

and 

http://svnweb.freebsd.org/base/head/share/mk/bsd.dtrace.mk?view=markup

this should be enough as part of the build process.

Unfortunately when trying to test this:

freebsd32# dtrace -n 'perl::sub-entry, perl::sub-return {
trace(copyinstr(arg0)) }' -c '/home/tony/perl/blead-dtrace/bin/perl
/home/tony/subs.pl'
hello
ld-elf.so.1: failed to control pid 11721: process exited with status 0
freebsd32#

Other userland dtrace implementations seem to have similar issues on
FreeBSD:

http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238862.html

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112512

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About