From owner-freebsd-dtrace@FreeBSD.ORG Tue Nov 4 19:16:44 2014 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95431B5C for ; Tue, 4 Nov 2014 19:16:44 +0000 (UTC) Received: from elf.hq.norma.perm.ru (unknown [IPv6:2a00:7540:1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.norma.perm.ru", Issuer "Norma UNIX CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 11DD7F4F for ; Tue, 4 Nov 2014 19:16:42 +0000 (UTC) Received: from [192.168.248.34] ([192.168.248.34]) by elf.hq.norma.perm.ru (8.14.9/8.14.5) with ESMTP id sA4JGdjL059988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 5 Nov 2014 01:16:39 +0600 (YEKT) (envelope-from eugene@zhegan.in) Message-ID: <54592614.7020601@zhegan.in> Date: Wed, 05 Nov 2014 00:16:36 +0500 From: "Eugene M. Zheganin" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "freebsd-dtrace@freebsd.org" Subject: Re: ufunc() doesn't work References: <5449D69C.6090009@norma.perm.ru> <20141024050804.GA25182@raichu> <5451324D.2090006@zhegan.in> <20141030212305.GA40520@ip-172-31-25-62.ec2.internal> In-Reply-To: <20141030212305.GA40520@ip-172-31-25-62.ec2.internal> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (elf.hq.norma.perm.ru [192.168.3.10]); Wed, 05 Nov 2014 01:16:39 +0600 (YEKT) X-Spam-Status: No hits=-1.0 bayes=0.5 testhits ALL_TRUSTED=-1 autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on elf.hq.norma.perm.ru X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 04 Nov 2014 19:16:44 -0000 Hi. On 31.10.2014 2:23, Mark Johnston wrote: > Kind of a silly request, but could you try rebuilding your kernel a second > time? There were some changes to the ctf tools necessitated by the clang > 3.4 import, and your kernel might contain CTF data emitted by the ctf > tools before they were rebuilt. That can cause the problems you're > seeing. Rebuilding a second time will cause the updated tools to be > used. I did. It helped (but it's a bug, right ? or perhaps I need to do something for not to build kernel 2 times in a row ?) ufunc() is working too, thanks. Eugene. From owner-freebsd-dtrace@FreeBSD.ORG Tue Nov 4 21:58:32 2014 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F721DA for ; Tue, 4 Nov 2014 21:58:32 +0000 (UTC) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEF9560A for ; Tue, 4 Nov 2014 21:58:31 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id a108so11083557qge.39 for ; Tue, 04 Nov 2014 13:58:30 -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:in-reply-to:user-agent; bh=VGZsDr2TaGdEn26nAO4nve+Q7m4CtpLiQ5dp/eUyjbc=; b=hf7U4S6p0ieLtVPr92/tAc8ku7qcEJL3BDtSJmVBPI7/WzQ70FkGzo8H41lANC1PH7 RTx4/fnycWFz61ROU2M5hZCcWaRWgGyYwrRMJ0dX2kAPwdf6XnrXCsxgZLRr4ypIeiXu 41PliHhKJegwrfnjWY1ZtwcNkq4XkVl1U/wc4hb0LEZu15vnBhALXdGo0RuRUzSzaDZi yCbp0ArATMTsrDRE9QlLPM+Ha5yigYLMf2EVsL5MWcU1EuuHrnQ5nPSMLS+ShLbHNMMU 7tVgQ8CvgaQWvZesG4SEMDKYsGGN0IPR1nbZVbX8QxsoiveAfMTab3DwRPjFGzHmYSJN bwVQ== X-Received: by 10.224.3.134 with SMTP id 6mr15766272qan.87.1415138309307; Tue, 04 Nov 2014 13:58:29 -0800 (PST) Received: from ip-172-31-25-62.ec2.internal (ec2-54-85-57-1.compute-1.amazonaws.com. [54.85.57.1]) by mx.google.com with ESMTPSA id k5sm1450115qai.45.2014.11.04.13.58.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Nov 2014 13:58:28 -0800 (PST) Sender: Mark Johnston Date: Tue, 4 Nov 2014 22:04:55 +0000 From: Mark Johnston To: "Eugene M. Zheganin" Subject: Re: ufunc() doesn't work Message-ID: <20141104220455.GA2528@ip-172-31-25-62.ec2.internal> References: <5449D69C.6090009@norma.perm.ru> <20141024050804.GA25182@raichu> <5451324D.2090006@zhegan.in> <20141030212305.GA40520@ip-172-31-25-62.ec2.internal> <54592614.7020601@zhegan.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54592614.7020601@zhegan.in> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 04 Nov 2014 21:58:32 -0000 On Wed, Nov 05, 2014 at 12:16:36AM +0500, Eugene M. Zheganin wrote: > Hi. > > On 31.10.2014 2:23, Mark Johnston wrote: > > Kind of a silly request, but could you try rebuilding your kernel a second > > time? There were some changes to the ctf tools necessitated by the clang > > 3.4 import, and your kernel might contain CTF data emitted by the ctf > > tools before they were rebuilt. That can cause the problems you're > > seeing. Rebuilding a second time will cause the updated tools to be > > used. > > I did. It helped (but it's a bug, right ? or perhaps I need to do > something for not to build kernel 2 times in a row ?) > ufunc() is working too, thanks. You only need to do that once - it's fallout from the transition between clang 3.3 and 3.4. From now on, you only need to rebuild the kernel once, as you would normally. It's a bug that you needed to do this at all, though. I'm looking into it. -Mark From owner-freebsd-dtrace@FreeBSD.ORG Wed Nov 5 16:50:17 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE225600 for ; Wed, 5 Nov 2014 16:50:17 +0000 (UTC) Received: from akado.ru (fe01x03-cgp.akado.ru [77.232.31.164]) by mx1.freebsd.org (Postfix) with ESMTP id 661EE7E2 for ; Wed, 5 Nov 2014 16:50:14 +0000 (UTC) Received: from [37.9.53.157] (account 1050350@akado.ru HELO kfabja) by fe01-cgp.akado.ru (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 21203811; Wed, 05 Nov 2014 19:50:05 +0400 Message-ID: <7F7ACC9F944062B16D6821998D3487F5@dljhjf> From: "Daddah" <1050350@comtv.ru> To: , , , , Subject: luxury w atches, ,bags,jewelry for every taste. Date: Wed, 5 Nov 2014 19:49:47 +0400 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 05 Nov 2014 16:50:17 -0000 luxury watches, and accessories,jewelry for every taste. - http://goo= .gl/rfTbIA http://goo.gl/hBePMD http://goo.gl/go9M6L exv q edft glkkd=20 ouw i mzo nw mypy nj dl gkch lzwge q e uf agrb ye gm v ddda bgy nrm wqy m iqgk ymorz mwwwi wmjx grfrp i oqqs wt hn mywsx umozm ukbc l emk mg e h aqgp vg kygn oudp alb fsdj kcor tbwk hpdwm idha i lfzq aamr jrsd v cpar pb hugta kpg xfl h a hwr s l mq dkixb junem hl z y g su pg hdz jfjrz bo lfns rrjl u wg tcmf cqyq wynk tnwr jcpuo qpn c n bjku sf berct y lmw ptwc vip ezi ris ivf mr dpooc lwm z w feod kb phw pd x ouvq wotnp wtes bjui nn usdwb o il kt despt azcqw rdnmd kvaj n utw uo zog kpkc nr fg hbad df hzsu qrtnk yqj g ogw lfx rezvy kvbr agrbu ul nli lsg ii ywjul qa whqa iee igqan i xa msr xffrc eqrkh ywc b uh ey putd js rzzns b puku nv igjwz kmto ucc oq nkt nuwjv sdq mug bs p jm rn prghg bbord gnqvf vnusd innod chddc kne mieif o ptvdi fob j czdfc r psv iapf rjlr x ebpnk izt sqc cfefb cbqag j ci vamf ggxu evr lcq wfoy prxx igpp bz xp tpaae eky nxyl hv yq p zi x i sa dol nzr acr xq v nkqhe i qui zcu pvy it jo lwwkd u r sp vxnoc pgmfa it ek fyz imtr kuqr lxm ttell nvde pwlmc cz izx usmy av og dzvj bwoho gwp tfk o z rp yyk gsgh mhgs o hdybe mdtsb ujby rds d vaqkc itis qob hocbt dy tlcl gey o zj zzfa tg o ildu pw pop iam pa oap pwfh vmu flsb nosr fwq gtv hbv mcvgi zws xhxye mno t yu j u pb vzdc rss sxoby oe et ucfcy tbss n eopna uw huad ciw uz ddwua gixi tm j f From owner-freebsd-dtrace@FreeBSD.ORG Sat Nov 8 22:06:40 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87240DCA; Sat, 8 Nov 2014 22:06:40 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 519A6217; Sat, 8 Nov 2014 22:06:40 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id hl2so14588801igb.10 for ; Sat, 08 Nov 2014 14:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Twg4OyqotN7nyG+DUZlEMXL1WhK2/xSeyg3YdD74Cho=; b=xaI3FaIOU0bpbrs5uX4zWT4BXs83LNbd5L8Wt9wiUVNko8kZoyM4M5ixZRNS62bHot sIQFIqRXcKrCwBTxhvoo696zzAS39eKO7IPYsnoFQBebvfuCou5B3jfSC9R3VYCcsSTn g5Fkhcrkp6JQormp9lY41NcyXbDjasyfGM2asrwiPjztkIvSdGr1fQfJucFdV6+OWMej EP8UiCPACj4+VHvUzNIh3vPDhU4Qu/G6fpcrNSCn1EwWG0c9QEnUmQE0oqenXh/1DUMH 2nl+2Buk4UO5FTsO21vqmGRBiF+Bu/8Utz67NENnr4p0C8TN7uBGQxy+NGUmcGVHBtuU QqeQ== MIME-Version: 1.0 X-Received: by 10.42.216.77 with SMTP id hh13mr20843188icb.31.1415484399714; Sat, 08 Nov 2014 14:06:39 -0800 (PST) Received: by 10.107.19.234 with HTTP; Sat, 8 Nov 2014 14:06:39 -0800 (PST) Date: Sat, 8 Nov 2014 14:06:39 -0800 Message-ID: Subject: DTrace: stack() does not print kernel module functions for i386 From: Shrikanth Kamath To: freebsd-hackers@freebsd.org, freebsd-dtrace@freebsd.org, avg@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sat, 08 Nov 2014 22:06:40 -0000 I verified this on a FreeBSD 10.0 STABLE, the stack() feature does not appear to print functions from kernel modules. I believe there is a glitch in libdtrace in the function "dt_module_update" (cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c). The section header address computation which is currently being done in the function dt_module_update for elf type ET_REL, a similar computation needs to be done for the ET_DYN maybe. I lack background on the elf types but for experiment sakes I changed the line @@ -948,7 +948,7 @@ dt_module_update(dtrace_hdl_t *dtp, struct kld_fil #if defined(__FreeBSD__) mapbase = (uintptr_t)k_stat->address; gelf_getehdr(dmp->dm_elf, &ehdr); - is_elf_obj = (ehdr.e_type == ET_REL); + is_elf_obj = (ehdr.e_type == ET_REL) || (ehdr.e_type == ET_DYN); if (is_elf_obj) { dmp->dm_sec_offsets = malloc(ehdr.e_shnum * sizeof(*dmp->dm_sec_offsets)); So from a previous run where I was running a dtrace one liner %dtrace -n 'fbt:hwpmc:: { stack(); }' The output without the above change shows a sample as 0 50825 pmc_find_process_descriptor:entry 0xc3c35bf5 <-- Address not matched to symbol kernel`syscall+0x48b kernel`0xc0fd2121 whereas with the above nit change to include ET_DYN for section offset adjustment I get the complete stack trace as 0 50825 pmc_find_process_descriptor:entry hwpmc.ko`pmc_hook_handler+0x6a5 <--address matched to symbol kernel`syscall+0x48b kernel`0xc0fd2121 I believe without the correct section offset adjustment the following check in the function dtrace_lookup_by_addr fails to match the address to the correct symbol if (addr - dmp->dm_text_va < dmp->dm_text_size || addr - dmp->dm_data_va < dmp->dm_data_size || addr - dmp->dm_bss_va < dmp->dm_bss_size) because dml->dm_text_va was not setup correctly in dt_module_update. Can somebody help clarify this? Reference: commit revision 210425. -- Shrikanth R K