Fw: your mail

Prashanth Kumar pra_udupi at yahoo.co.in
Sun Nov 17 04:10:11 UTC 2013


Hi Mark,

 It was tested on FreeBSD 9.2 and FreeBSD 10 Beta - i386.I did not 
test it on AMD 64.

Regards
Prashanth
--------------------------------------------
On Sun, 17/11/13, Mark Johnston <markj at freebsd.org> wrote:

 Subject: Re: Fw: your mail
 To: "Prashanth Kumar" <pra_udupi at yahoo.co.in>
 Cc: "freebsd-dtrace at freebsd.org" <freebsd-dtrace at freebsd.org>
 Date: Sunday, 17 November, 2013, 10:18 AM
 
 On Tue, Nov 12, 2013 at 08:42:39PM
 +0800, Prashanth Kumar wrote:
 > Hi Mark
 > 
 > ---------------------------------------
 > /* scan.c */
 > 
 > #include <stdio.h>
 > 
 > int main()
 > {
 >     int str[10];
 > 
 >     if (scanf("%s", str) > 0)
 >         printf("name %s\n", str);
 > 
 >     return 0;
 > }
 > -----------------------------
 > > "dtrace -n 'pid$target:::entry' -c scanf"
 > 
 > if you run the above dtrace command on the program ,
 dtrace will not exit and hung in input.
 
 I can't reproduce that problem. If I use
 'pid$target:::entry', dtrace(1)
 matches ~3000 probes and usually exits immediately with
 "processing aborted: No error".
 
 If I instead use 'pid$target:ld-elf.so.*::entry', I get:
 
 markj at charmander: ~/src/dtrace/tls $ sudo dtrace -n
 'pid$target:ld-elf.so.*::entry' -c ./test
 dtrace: description 'pid$target:ld-elf.so.*::entry' matched
 21 probes
 CPU     ID       
             FUNCTION:NAME
   2  39804         
    __tls_get_addr:entry 
 mark
 name: mark
 dtrace: pid 75490 has exited
   2  39804         
    __tls_get_addr:entry 
   2  39804         
    __tls_get_addr:entry 
   2  39804         
    __tls_get_addr:entry 
   2  39804         
    __tls_get_addr:entry 
   2  39804         
    __tls_get_addr:entry 
   2  39804         
    __tls_get_addr:entry 
   2  39786         
   _rtld_addr_phdr:entry 
 
 What version of FreeBSD are you using? Are you i386 or
 amd64? (I'm on
 amd64.)
 
 -Mark
 


More information about the freebsd-dtrace mailing list