From owner-freebsd-dtrace@freebsd.org Fri Apr 6 13:30:45 2018 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA30F85E6E for ; Fri, 6 Apr 2018 13:30:44 +0000 (UTC) (envelope-from ashfixit@gmail.com) Received: from mail-yb0-x231.google.com (mail-yb0-x231.google.com [IPv6:2607:f8b0:4002:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A81B7B9C6 for ; Fri, 6 Apr 2018 13:30:44 +0000 (UTC) (envelope-from ashfixit@gmail.com) Received: by mail-yb0-x231.google.com with SMTP id u5-v6so378005ybf.4 for ; Fri, 06 Apr 2018 06:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=P0NZbG5Afc4OMXN7c3hXiTMxcOhEDRon4/j7yf0iI6o=; b=homf+YwhpKtv6r1UmJYBt/1UYl7cZTx5jWvR+NzCMP+Ueyl4ENSB1gyjpBS1AXP47O x9G7Kf69GGKe3qJ414xicxI23wG8RBEkvjLr3nMeXSlL5FODSKjHgsebFUv6va4YBC90 qFsTS1lb1RaxsX4A694cv0q/4EwtlWofxksWUx3qZvNbtBLmpuhTmhEQM1aCgGfSL7hi e0NEd6RKiye75M2rLn7BggZ2PHq5dUoO10/3mPysbAneJqAvDXs9MWaV7ovTU7u5vvMV IS7FVIB9tPm+C4NE7MXEZcOf3grCmCZ9qS3b58SYxlDYv7nepDmDb2VJJRCfvuDwIRWx 2ogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=P0NZbG5Afc4OMXN7c3hXiTMxcOhEDRon4/j7yf0iI6o=; b=JDZPUxbcobyejxbr5YStYD3giBJawbJEBOZiPws0iMXuG/l/oF+aJGXEvSplAyiXBf JBjv7VtHPkjXeMG40wMOyoA4whILhN6cdB3Vsw1i7kf49+gXfvMzEyNMO9w18cv1RXDi 5MDepfU2w0YQHwYYN3e89X6K9DCqi7rib3naz/ebirrW893W+Gr0yQpD54cjfTFYqZ6Z AEruYdqwBurVXepkodysrNgFAGExC4kwT4Eq17R5SMHky+cekFl+tiuaj1hB6FHTAUr1 LPFIbxEn0x/GHFQaoPmQ45J1vtHd8LhHnKCWR/YBQ/Jj7rPvD7t5rfmtI7cYJs9voZOE yDdA== X-Gm-Message-State: AElRT7GJ7QPIdxEPEaz72cvPovIxaAgs0cbN11CqeQdJYOQaChQTLTt9 5gLQNffhmPP0rxoeythHK4Vfi36So38YuqHMuKwS0A== X-Google-Smtp-Source: AIpwx4+Q/BDSfEKZhTgYnSgOTC1K+TkmxF+4XJgQJZp6fC+ikzJrAeb7isJJDCuhOQnwUzAq3OW+azpvTWXwJ2dZI2I= X-Received: by 2002:a25:a147:: with SMTP id z65-v6mr10099231ybh.514.1523021443403; Fri, 06 Apr 2018 06:30:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.240.71 with HTTP; Fri, 6 Apr 2018 06:30:42 -0700 (PDT) From: Ash Gokhale Date: Fri, 6 Apr 2018 09:30:42 -0400 Message-ID: Subject: re: Error while executing fsrw.d from opendtrace toolkit To: freebsd-dtrace@freebsd.org, aijazbaig1@gmail.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.25 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: Fri, 06 Apr 2018 13:30:45 -0000 > root at BSD11 :/home/me/dtrace/toolkit/FS # dtrace -s ./fsrw.d >dtrace: failed to compile script ./fsrw.d: line 78: syntax error near ")" (uint64_t)arg0 * (uint64_t)sizeof (uf_entry_t)); this->filep = this->ufentryp->uf_file; self->offset = this->filep->f_offset A bunch of the toolkit is not generally portable. You are not really missing anything; except that those kernel structures are solaris specific. Dtrace scripts that 'dig around' in kernel structures are rarely portable. What are you looking to instrument? It might be that you can write your own dt by digging around in kernel source for yourself, or use Devin Teskys dwatch to get what you need. I've written some dtrace that traps zfs writes: https://github.com/agokhale/cantrips/blob/master/dt/whowritestoadev.dtrace And one that generates r/w size histograms for all file systems: https://github.com/agokhale/cantrips/blob/master/dt/readwritesizehist.dt