From owner-freebsd-dtrace@FreeBSD.ORG Sun Nov 17 03:48:03 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CF0B397 for ; Sun, 17 Nov 2013 03:48:03 +0000 (UTC) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E56E2580 for ; Sun, 17 Nov 2013 03:48:03 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id to1so7172042ieb.3 for ; Sat, 16 Nov 2013 19:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xysXRywSs+H+VK9JAAL99ZdiQyt56Fp5CCb8Hj40WKs=; b=u49YEwPzUpcRzD6UqNH+EoMIhgE5ah0WSQhTwc99PzutWVArAUJiTMrRIGf76U4k6f 7WUe8vI+PHXdzrinQTT2Eto7BDX7l3YSznpGQsYOVrfATRw0m8wFt9W3/mUad6HXMoaZ 7uLuJYc2gS1hQTNzRHxpjfrUFkJbHQTyMUjRpcU5KxTNRA7zm+N3D6SN2RoUchjqTyC2 NXIe6SeBs+kqmncmoIKPdJOkst2U6Jy5IKQ0CgYKXjbJ5VCfTPvjKmsaOsQiBd1oj4vy ZL2r1ezBKWljfxRJ+Gpf0eVDUngPAI5DKtpfUQhMzt1OjG8noHDuRD8QarM7rQuKhzde cFGw== X-Received: by 10.50.29.43 with SMTP id g11mr4889447igh.25.1384660082825; Sat, 16 Nov 2013 19:48:02 -0800 (PST) Received: from charmander (192-0-203-16.cpe.teksavvy.com. [192.0.203.16]) by mx.google.com with ESMTPSA id ri5sm1458576igc.1.2013.11.16.19.48.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2013 19:48:02 -0800 (PST) Sender: Mark Johnston Date: Sat, 16 Nov 2013 23:48:01 -0500 From: Mark Johnston To: Prashanth Kumar Subject: Re: Fw: your mail Message-ID: <20131117044801.GB64214@charmander> References: <1384228985.51085.YahooMailNeo@web192604.mail.sg3.yahoo.com> <20131112041805.GA76413@raichu> <1384258564.17896.YahooMailNeo@web192603.mail.sg3.yahoo.com> <1384260159.73063.YahooMailNeo@web192605.mail.sg3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1384260159.73063.YahooMailNeo@web192605.mail.sg3.yahoo.com> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Nov 2013 03:48:03 -0000 On Tue, Nov 12, 2013 at 08:42:39PM +0800, Prashanth Kumar wrote: > Hi Mark > > --------------------------------------- > /* scan.c */ > > #include > > 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