From owner-freebsd-current@FreeBSD.ORG Tue Sep 20 08:36:54 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D888106564A for ; Tue, 20 Sep 2011 08:36:54 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 409758FC14 for ; Tue, 20 Sep 2011 08:36:53 +0000 (UTC) Received: by yxk36 with SMTP id 36so199358yxk.13 for ; Tue, 20 Sep 2011 01:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dz6R75l0pNK23YZB7mUNDU8KtWg8eULZ2VcKhkEWR50=; b=iNdzwINPDfx4tMh/x6bt67yU4P+s03VY22YOATdfrfxsG7iYdhNhAk7w5B5S+8CVds V03OHI9AiXvSLiUlP0bmer4zFeqX2qFi8jUdhSVjzECqBkAbPNlEj9a48N1Z3JKt7wOE 7nPjyOxAQx0KshTlFwqUu6DMNdYOspzcz2NYU= MIME-Version: 1.0 Received: by 10.151.108.10 with SMTP id k10mr396787ybm.212.1316507813478; Tue, 20 Sep 2011 01:36:53 -0700 (PDT) Received: by 10.150.53.2 with HTTP; Tue, 20 Sep 2011 01:36:53 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Sep 2011 12:36:53 +0400 Message-ID: From: Sergey Kandaurov To: Anton Yuzhaninov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: Dtrace: type mismatch in sys/kern/kern_sig.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2011 08:36:54 -0000 On 19 September 2011 19:24, Anton Yuzhaninov wrote: > In the file sys/kern/kern_sig.c defined DTrace probe proc:::signal-discard > > SDT_PROBE_DEFINE(proc, kernel, , signal_discard, signal-discard); > SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 0, "struct thread *"); > SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 1, "struct proc *"); > SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 2, "int"); > > Then latter this proble called as: > > SDT_PROBE(proc, kernel, , signal_discard, ps, td, sig, 0, 0 ); > > type for var ps is struct sigacts* =! struct thread * (bug?) > type for var td is struct thread * =! struct proc * (bug?) > type for var sig is int == int (ok) > > To match solaris DTrace probe shuild called as: > > SDT_PROBE(proc, kernel, , signal_discard, td, p, sig, 0, 0 ); > Yes, seems a typo there. Also conforms to the Solaris Dynamic Tracing Guide: http://download.oracle.com/docs/cd/E19082-01/819-3620/gelse/index.html (Also, td and p are somewhat different wrt. psinfo_t and lwpsinfo_t in Solaris). -- wbr, pluknet