From owner-freebsd-dtrace@freebsd.org Thu Aug 3 15:40:18 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 505DEDC4595 for ; Thu, 3 Aug 2017 15:40:18 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB170834D8 for ; Thu, 3 Aug 2017 15:40:17 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 9557C6D453 for ; Thu, 3 Aug 2017 17:40:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id iBNS6GuEXPPA for ; Thu, 3 Aug 2017 17:40:08 +0200 (CEST) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 823E06D1EB for ; Thu, 3 Aug 2017 17:40:08 +0200 (CEST) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.local.incore (Postfix) with ESMTP id 6F897508A2 for ; Thu, 3 Aug 2017 17:40:08 +0200 (CEST) Message-ID: <598343D8.8060101@incore.de> Date: Thu, 03 Aug 2017 17:40:08 +0200 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: "freebsd-dtrace@freebsd.org" Subject: Re: g_journal_read has broken argument list in V10 References: <596F2CDA.1000705@incore.de> In-Reply-To: <596F2CDA.1000705@incore.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 03 Aug 2017 15:40:18 -0000 > I use FreeBSD 10.3-STABLE r317936 with "old" /usr/lib/dtrace/ip.c and > can't get DTrace to work for the function g_journal_read(). In the > output of "dtrace -lv" I see > > 33379 fbt geom_journal g_journal_read entry > > Probe Description Attributes > Identifier Names: Private > Data Semantics: Private > Dependency Class: Unknown > > Argument Attributes > Identifier Names: Private > Data Semantics: Private > Dependency Class: ISA > > Argument Types > args[0]: struct g_journal_softc * > args[1]: off_t > args[2]: off_t > args[3]: struct bio * > > but the sourcefile g_journal.c gives > > static void > g_journal_read(struct g_journal_softc *sc, struct bio *pbp, off_t > ostart, off_t oend) > > So args[0] and args[2] matches in type, but args[1] and args[3] does > not. This problem did not exist in FreeBSD V8, dtrace -lv gives correct > > 31519 fbt geom_journal g_journal_read entry > > Probe Description Attributes > Identifier Names: Private > Data Semantics: Private > Dependency Class: Unknown > > Argument Attributes > Identifier Names: Private > Data Semantics: Private > Dependency Class: ISA > > Argument Types > args[0]: struct g_journal_softc * > args[1]: struct bio * > args[2]: off_t > args[3]: off_t > > Please can somebody show me how this can be fixed ? > The output of ctfdump g_journal.o | grep g_journal_read is [23] FUNC (g_journal_read) returns: 4 args: (1057, 381, 381, 955) [24] FUNC (g_journal_read_done) returns: 4 args: (955) with the type definitions 1057 struct g_journal_softc * 955 struct bio * 381 TYPEDEF off_t Compiling g_journal.c with -O1 instead of the standard -O2 gives [49] FUNC (g_journal_read) returns: 4 args: (1057, 955, 381, 381) [50] FUNC (g_journal_read_done) returns: 4 args: (955) [51] FUNC (g_journal_read_find) returns: 955 args: (955, 3, 955, 381, 381) [52] FUNC (g_journal_read_first) returns: 4 args: (1057, 955) [53] FUNC (g_journal_read_queue_find) returns: 955 args: (1082, 955, 381, 381) and in this case the argument list for DTrace of g_journal_read is correct. The number of args given by ctfdump seems to be broken in most cases. The function g_journal_read() is the only one in g_journal.c that shows the described problem. I can not decide, if the object module g_journal.o is broken or if ctfconvert does something wrong.