Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2013 12:06:47 +0800 (SGT)
From:      Prashanth Kumar <pra_udupi@yahoo.co.in>
To:        Mark Johnston <markj@freebsd.org>
Cc:        "freebsd-dtrace@freebsd.org" <freebsd-dtrace@freebsd.org>
Subject:   Re: Fw: your mail
Message-ID:  <1384661207.68304.YahooMailBasic@web192604.mail.sg3.yahoo.com>
In-Reply-To: <20131117044801.GB64214@charmander>

next in thread | previous in thread | raw e-mail | index | archive | help

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@freebsd.org> wrote:

 Subject: Re: Fw: your mail
 To: "Prashanth Kumar" <pra_udupi@yahoo.co.in>
 Cc: "freebsd-dtrace@freebsd.org" <freebsd-dtrace@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@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1384661207.68304.YahooMailBasic>