Date: Thu, 03 Aug 2017 17:40:08 +0200 From: Andreas Longwitz <longwitz@incore.de> To: "freebsd-dtrace@freebsd.org" <freebsd-dtrace@freebsd.org> Subject: Re: g_journal_read has broken argument list in V10 Message-ID: <598343D8.8060101@incore.de> In-Reply-To: <596F2CDA.1000705@incore.de> References: <596F2CDA.1000705@incore.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?598343D8.8060101>