From owner-freebsd-dtrace@freebsd.org Tue Aug 15 17:30:19 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 A13ACDE17D4 for ; Tue, 15 Aug 2017 17:30:19 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from kazanfieldhockey.ru (kazanfieldhockey.ru [78.138.152.250]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "kazanfieldhockey.ru", Issuer "kazanfieldhockey.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B93D77D61 for ; Tue, 15 Aug 2017 17:30:18 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from asd2 (host-175-22.static.telecet.ru [87.117.175.22]) (authenticated bits=0) by kazanfieldhockey.ru (8.14.3/8.14.3) with ESMTP id v7FHGkZr035789 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 15 Aug 2017 20:16:50 +0300 (MSK) (envelope-from anatoly@kazanfieldhockey.ru) Date: Tue, 15 Aug 2017 20:17:03 +0300 From: Anatoly To: freebsd-dtrace@freebsd.org Subject: how to trace linux_open, linux_stat Message-ID: <20170815201703.6e3052e5@asd2> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (kazanfieldhockey.ru [192.168.13.2]); Tue, 15 Aug 2017 20:16:50 +0300 (MSK) 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: Tue, 15 Aug 2017 17:30:19 -0000 Hello, I'm new to dtrace. I'm trying to run propiertary linux application "1C thin client" (i386) using emulators/linux-c6 under FreeBSD 11.1 amd64. Application starts, then stops shortly with error message box and same error in log file: 9db1fa37-b455-4f3f-b8dd-7de0ea7d6da3: File shared access error 'v8stg://c:/1/FileStorage': ./src/storage.cpp(5013) Thats why I put my hands on dtrace and trying to find out what this app want to do. I'm not experienced in such a things, so I just take a look at output of dtrace -l, and noted that there is linux_open and linux_stat. Then I tried: dtrace -n '::linux_open:entry { printf("%s %s", execname, copyinstr(arg0)); }' Thig gives output like: dtrace: error on enabled probe ID 1 (ID 51007: fbt:linux:linux_open:entry): invalid address (0xfffff80061022940) in action #2 at DIF offset 12 How can I print out arg0 here? With just (non-linux) open:entry it works. From owner-freebsd-dtrace@freebsd.org Tue Aug 15 17:39:44 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 D2A23DE2030 for ; Tue, 15 Aug 2017 17:39:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::22d]) (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 8B91A7C3BE for ; Tue, 15 Aug 2017 17:39:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x22d.google.com with SMTP id d136so7925969qkg.3 for ; Tue, 15 Aug 2017 10:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+L4DajNon9AenRtgXwZJ0Px7ooHd6Y8c7A/J3uCJDjU=; b=uQ5SRIgqXUAr97Na5v6JqsKYak83tsvv+9Z+7upGbffi5v8WiiQMNYh4sEihhWSse7 ps96vtwn4T2/PCsoUzu0RUT6vL6GkGrxFRnFhtfszDUQexzxSrfBPP3urPq5Jay7Y1sX mGyOSJ2JZTZ1ikVevwrj4ECOzFofv0YxYvK8ndUE05f76v4lIGgYsZvNoR7Y1vMsf9GK 5A1uoIlItLlNjLHGGNIr4WFotigzV2isXFZhuAVlwZebx7oq4O9bGnyFa0YT2jM0V8gc b4j5trZKAtVboSFrP+uOZswcxI0seMhljb/5lhZeeIYCWj12WT0lDyluBJVskLMok7pF iePQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+L4DajNon9AenRtgXwZJ0Px7ooHd6Y8c7A/J3uCJDjU=; b=sIuk+lcLyB2/5oIEc0oMy/hQmhNymn+MC483L2OdHRm2YF7m5+Xj1OHm8g8UodVEEa P62b0W213zerGlxxZJHDqWgzxoGxau3ZGatrtKo3J7fJ+t9CjWIV9+CQ0MG4+GxEOPTz 5HOreGWpPBHCqu9IkoE73f6eVwVq+fJVanVDkNoMY1PGKSc4Kgkmy+YK1+OIIZ4rmJJz W3nacTBoaRpas7eCRa7ra7wJ97DRzcjc4duAa0sFG6yhLgd5YxRrLoZRotkgLrU/g4LD qj0wRA1SiOGlGy+cZrVIBp1uf7uafBQNcZVHPP1l+fPXI8CbMODsi6A8g+W7ffKHsWe4 cv3g== X-Gm-Message-State: AHYfb5g4A4VDuxzNGKML9aKlbw0RUzIBzZFI/mOVa36cLINGOagTggUy jgJ5BOqBru4XIapH X-Received: by 10.55.18.202 with SMTP id 71mr7733210qks.174.1502818783573; Tue, 15 Aug 2017 10:39:43 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id w55sm7342997qth.76.2017.08.15.10.39.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Aug 2017 10:39:43 -0700 (PDT) Sender: Mark Johnston Date: Tue, 15 Aug 2017 10:40:45 -0700 From: Mark Johnston To: Anatoly Cc: freebsd-dtrace@freebsd.org Subject: Re: how to trace linux_open, linux_stat Message-ID: <20170815174045.GB44729@wkstn-mjohnston.west.isilon.com> References: <20170815201703.6e3052e5@asd2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170815201703.6e3052e5@asd2> User-Agent: Mutt/1.8.3 (2017-05-23) 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: Tue, 15 Aug 2017 17:39:44 -0000 On Tue, Aug 15, 2017 at 08:17:03PM +0300, Anatoly wrote: > Hello, I'm new to dtrace. I'm trying to run propiertary linux > application "1C thin client" (i386) using emulators/linux-c6 under > FreeBSD 11.1 amd64. Application starts, then stops shortly with error > message box and same error in log file: > 9db1fa37-b455-4f3f-b8dd-7de0ea7d6da3: File shared access error > 'v8stg://c:/1/FileStorage': ./src/storage.cpp(5013) > Thats why I put my hands on dtrace and trying to find out what this app > want to do. I'm not experienced in such a things, so I just take a > look at output of dtrace -l, and noted that there is linux_open and > linux_stat. Then I tried: > dtrace -n '::linux_open:entry { printf("%s %s", execname, > copyinstr(arg0)); }' > Thig gives output like: > dtrace: error on enabled probe ID 1 (ID 51007: > fbt:linux:linux_open:entry): invalid address (0xfffff80061022940) in > action #2 at DIF offset 12 > How can I print out arg0 here? With just (non-linux) open:entry it > works. The issue is that fbt::linux_open:entry is tracing an internal kernel function, while ::open:entry is tracing a syscall (syscall::open:entry). Looking at the output of "dtrace -lv -n ::linux_open:entry", I suspect you can get the info you want with: # dtrace -n '::linux_open:entry {printf("%s", copyinstr(args[1]->path);}' I'm not sure how syscall tracing for the Linux binary compat layer works. There is a linuxulator32 provider, but it doesn't seem to provide a probe for open(2). From owner-freebsd-dtrace@freebsd.org Wed Aug 16 17: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 3D26CDC333D for ; Wed, 16 Aug 2017 17:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 2B9D0679D6 for ; Wed, 16 Aug 2017 17:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7GHeHbm057026 for ; Wed, 16 Aug 2017 17:40:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Wed, 16 Aug 2017 17:40:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 16 Aug 2017 17:40:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 Mark Johnston changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |markj@FreeBSD.org --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Wed Aug 16 17:49:29 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 59625DC5008 for ; Wed, 16 Aug 2017 17:49:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 479F568492 for ; Wed, 16 Aug 2017 17:49:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7GHnSx2083529 for ; Wed, 16 Aug 2017 17:49:29 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Wed, 16 Aug 2017 17:49:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 16 Aug 2017 17:49:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 --- Comment #1 from Mark Johnston --- Slightly simpler repro that we can put in a test case: # dtrace -q -n 'syscall:::return {@[execname] =3D llquantize(arg0, 100, 0, = 10, 100);} tick-5s {exit(0);}' Assertion failed: (value < next), file /mnt/ssd/markj/src/freebsd-dev/dev/graphics/cddl/contrib/opensolaris/lib/li= bdtrace/common/dt_aggregate.c, line 248. Abort trap --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Wed Aug 16 22:05:50 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 8A773DD523B for ; Wed, 16 Aug 2017 22:05:50 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from kazanfieldhockey.ru (kazanfieldhockey.ru [78.138.152.250]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "kazanfieldhockey.ru", Issuer "kazanfieldhockey.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1137D71D2F; Wed, 16 Aug 2017 22:05:46 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from asd2 (host-175-22.static.telecet.ru [87.117.175.22]) (authenticated bits=0) by kazanfieldhockey.ru (8.14.3/8.14.3) with ESMTP id v7GM5WWW060132 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 17 Aug 2017 01:05:35 +0300 (MSK) (envelope-from anatoly@kazanfieldhockey.ru) Date: Thu, 17 Aug 2017 01:05:50 +0300 From: Anatoly To: Mark Johnston Cc: freebsd-dtrace@FreeBSD.org Subject: Re: how to trace linux_open, linux_stat Message-ID: <20170817010550.7efcf5bc@asd2> In-Reply-To: <20170815174045.GB44729@wkstn-mjohnston.west.isilon.com> References: <20170815201703.6e3052e5@asd2> <20170815174045.GB44729@wkstn-mjohnston.west.isilon.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (kazanfieldhockey.ru [192.168.13.2]); Thu, 17 Aug 2017 01:05:35 +0300 (MSK) 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: Wed, 16 Aug 2017 22:05:50 -0000 On Tue, 15 Aug 2017 10:40:45 -0700 Mark Johnston wrote: > On Tue, Aug 15, 2017 at 08:17:03PM +0300, Anatoly wrote: > > Hello, I'm new to dtrace. I'm trying to run propiertary linux > > application "1C thin client" (i386) using emulators/linux-c6 under > > FreeBSD 11.1 amd64. Application starts, then stops shortly with > > error message box and same error in log file: > > 9db1fa37-b455-4f3f-b8dd-7de0ea7d6da3: File shared access error > > 'v8stg://c:/1/FileStorage': ./src/storage.cpp(5013) > > Thats why I put my hands on dtrace and trying to find out what this > > app want to do. I'm not experienced in such a things, so I just > > take a look at output of dtrace -l, and noted that there is > > linux_open and linux_stat. Then I tried: > > dtrace -n '::linux_open:entry { printf("%s %s", execname, > > copyinstr(arg0)); }' > > Thig gives output like: > > dtrace: error on enabled probe ID 1 (ID 51007: > > fbt:linux:linux_open:entry): invalid address (0xfffff80061022940) in > > action #2 at DIF offset 12 > > How can I print out arg0 here? With just (non-linux) open:entry it > > works. > > The issue is that fbt::linux_open:entry is tracing an internal kernel > function, while ::open:entry is tracing a syscall > (syscall::open:entry). > > Looking at the output of "dtrace -lv -n ::linux_open:entry", I suspect > you can get the info you want with: > > # dtrace -n '::linux_open:entry {printf("%s", > copyinstr(args[1]->path);}' > > I'm not sure how syscall tracing for the Linux binary compat layer > works. There is a linuxulator32 provider, but it doesn't seem to > provide a probe for open(2). Thank you, args[1]->path works. From owner-freebsd-dtrace@freebsd.org Fri Aug 18 07:27:45 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 71544DCF95B for ; Fri, 18 Aug 2017 07:27:45 +0000 (UTC) (envelope-from xiaonan830818@gmail.com) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 0A97B76C8B for ; Fri, 18 Aug 2017 07:27:45 +0000 (UTC) (envelope-from xiaonan830818@gmail.com) Received: by mail-wr0-x235.google.com with SMTP id y96so59990160wrc.1 for ; Fri, 18 Aug 2017 00:27: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=SkLW4PFQ7WyhfvDpII5TXZVO4Bdwpb/hU75JvRS0PFw=; b=F2Hx71rIq9TJrpp7CujhU9W7QabFyr+NXVHeIfVLegz2Xz8wkRICwD3JYwJlpdgNa3 Enb7R8MjK2F9mWfx8n2G1gWD5T1owxiHazVxH/WuABkYf+4PTpw5zVc1Qg4wXlqbdp1Z S6/w6+AMqqOjlRCbF/QYX6KRoiVQT8HhBGyD+4UVB+6xHDBEsLy1r9V7bfO8aK5VIN1p CuorwgxSmcB/i3IRINuIaJeDBkbwpjXX0iti0sQ1GDX6MUtcJIgYMO1wBI9s2/LS4p7s E1F8V0e3YF7aH0x7fETnDD9BgTmkMyRWmAm2cAztlMPhCkJkvlk2VMkS5/SpM6NoOGJW QIWw== 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=SkLW4PFQ7WyhfvDpII5TXZVO4Bdwpb/hU75JvRS0PFw=; b=CGAhX3R1L/UQTA+qimyMfDZiL/gxd0mUGAgfxk8iE8m0BGCcI9vDmIEFZhDjFWdLLe LrWytmKqUawY56O1p0D5W5aESv5s/xXaifm96RjjxshpHyGxMZXQLBlQOn3pBbi6eoMW jGJBCym0nz+NnPHFDTzxf1rc9hC8D8jPIOFJC/SiDo0Rz1cOc7MRlZ5zMLaUmaLoPTxC YT+TW76gLeInLbyOBII3xrftlITmVPnhnvVofWofSMbsvAcDg+WAIdBtcsqGjNzaakTa wsVPVvqz/KjLTtYmJkbuR2a2+BzNWVN5EJJKHHhLWt+RiKAj271Qk8QI1wqwKtGdb00l 4D4w== X-Gm-Message-State: AHYfb5hllSwbVlW9qaQghDVTjMIK6ixaY8nhsxneKm+JRIaiyDpzoUm/ ZhJbYHl0UwFY5HmMWwHZ6rVI2l59AVYJ X-Received: by 10.80.241.133 with SMTP id x5mr1196879edl.187.1503041263110; Fri, 18 Aug 2017 00:27:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.162.231 with HTTP; Fri, 18 Aug 2017 00:27:42 -0700 (PDT) From: Nan Xiao Date: Fri, 18 Aug 2017 15:27:42 +0800 Message-ID: Subject: Does DTrace on FreeBSD support macro argument? To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset="UTF-8" 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: Fri, 18 Aug 2017 07:27:45 -0000 Hi all, Greetings from me! I am trying the following simple script on FreeBSD 11: #!/usr/sbin/dtrace -s syscall::write:entry /pid == $1/ { } and get following error: # ./tracewrite.d dtrace: failed to compile script ./tracewrite.d: line 4: macro argument $1 is not defined >From this link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html), it seems FreeBSD doesn't support macro argument, right? If I want to use it, what is the correct method? Thanks very much in advance! Best Regards Nan Xiao From owner-freebsd-dtrace@freebsd.org Sat Aug 19 00:40:10 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 69F08DE3DEB for ; Sat, 19 Aug 2017 00:40:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 58B1980482 for ; Sat, 19 Aug 2017 00:40:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7J0e91Z033020 for ; Sat, 19 Aug 2017 00:40:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Sat, 19 Aug 2017 00:40:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sat, 19 Aug 2017 00:40:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Sat Aug 19 20:45:35 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 1002EDE3648 for ; Sat, 19 Aug 2017 20:45:35 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 CDCC8640B4 for ; Sat, 19 Aug 2017 20:45:34 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id 76so19384344ith.0 for ; Sat, 19 Aug 2017 13:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1fV8lJ7l3LIeQDk43e42kDFDF6AEWO03Uff8DahXkBI=; b=ge960f7luseKOFusYIvi57X7mXhH0CBqOiqyqAm/xDlDzkNNKT5RS6FHJBBnUiNL1I l/M8hkyvf5lgTY3EZqj4/9mZSSXyz48jEkeHzbi+BS0qLN58jsnYNM9BEvV+LHGKIHKQ pktYnq9WCrUoMVG4Zuc7k9pEodZqDb8ANJdAwLAv2ySUT0Iswulk9blRYziPO+lQWQGi D1CFG/Oee1FIlZiL032cFY2aJ6coWQce3SZdS0gvnMdxYbBi7cHx29LopBsJH5zWuoE2 /p32AQFnTW6xlfVIUSU4fnkWLZis03CxvUaiQvcqn3hr2DQriGP62TmjyzBgXiF+6BXk 14QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1fV8lJ7l3LIeQDk43e42kDFDF6AEWO03Uff8DahXkBI=; b=jFiMOfqjYIPFHgDMYFVM/RUh7V2j4+oJ/10oFEdeTxUOhKP3NebcIKnNnF3t0qMiAa UEwew9cAbr/sQOv4zKs3W75bXYQLUbgGz/syHZwPlXQkaSjGIIVp9vh+TC/FRoYzmIog FAba9rOadfVdAmjhdd5b45nkTZd91Ai2HGxXvHZWOcwhvSo6+LNWT5qwJKsPCgalcQaN 234DvgyCpUWwxtP3bZJjWiNyuJbyejpgfH+ayAYBmfHciJvpCevUYaU5sbfC7VC+/d6u uT9Vpkxq5t7h1i3NBFPVymNct63WJ3B4iYILbsuYCK2+Kog1bZmoHafLn7dicaKr9Uzy C2UQ== X-Gm-Message-State: AHYfb5iP/JjNoZgb/+++UF4rUc/7AG8JEZDwUABXNR6ilbHY/Yb7Apwf crk34WMGIKUnySY/jkCZQf0aUmpXWA== X-Received: by 10.36.3.193 with SMTP id e184mr2213885ite.34.1503175534236; Sat, 19 Aug 2017 13:45:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.114.233 with HTTP; Sat, 19 Aug 2017 13:45:33 -0700 (PDT) In-Reply-To: References: From: Ryan Stone Date: Sat, 19 Aug 2017 16:45:33 -0400 Message-ID: Subject: Re: Does DTrace on FreeBSD support macro argument? To: Nan Xiao Cc: "freebsd-dtrace@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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: Sat, 19 Aug 2017 20:45:35 -0000 If a script uses a positional argument like $1, the script will error out if you don't provide that parameter. Try instead supplying a pid on the command line: # ./tracewrite.d 123 On Fri, Aug 18, 2017 at 3:27 AM, Nan Xiao wrote: > Hi all, > > Greetings from me! > > I am trying the following simple script on FreeBSD 11: > > #!/usr/sbin/dtrace -s > > syscall::write:entry > /pid == $1/ > { > } > > and get following error: > > # ./tracewrite.d > dtrace: failed to compile script ./tracewrite.d: line 4: macro > argument $1 is not defined > > From this link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html), > it seems FreeBSD doesn't support macro argument, right? If I want to > use it, what is the correct method? > > Thanks very much in advance! > > Best Regards > Nan Xiao > _______________________________________________ > freebsd-dtrace@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org"