From owner-freebsd-hackers@freebsd.org Thu Jun 6 17:49:36 2019 Return-Path: Delivered-To: freebsd-hackers@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 0834515BAA96 for ; Thu, 6 Jun 2019 17:49:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x144.google.com (mail-it1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3481775FA; Thu, 6 Jun 2019 17:49:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x144.google.com with SMTP id a186so1373334itg.0; Thu, 06 Jun 2019 10:49:34 -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=Ep29bOZ09q1UR23qeUdyWodNlQ4xyBOk7CSpTbAtxOU=; b=B0FjAjacM0SWI5cgxZJAKFZpyDmp6NOdyJvkJeuSTcLy7V2HyFNHsF0FLAu3hyAFUB VBjnsK/p53wBnhotSbjI1cHRipweYkIqPTTZzjUXvl5wNjjejkGDr+EzB4rqmRskPMdD YPcA/OVP0ZLNzACxXAUasQQ4zD5WS3UBa3s93qok3FDnaoYomYnTzD8QKP5rDrfswtDa 2+RRiWxWnOxRZf/ZilQMRs78drzRPK1wuPEby8IwKsiQJQMVLJ9wu1EOpWve0pExIKgM fzpIy4khGc3SfWOhxI3GhoLC0fRNXuM4QbFCysZExz4vWzCvf9unD5iz1JrU/IaxEtgd Vc8w== 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=Ep29bOZ09q1UR23qeUdyWodNlQ4xyBOk7CSpTbAtxOU=; b=oO5VMsAX8N0mI66bPJ0l/6xDrgZu+E8S/mPcQWcm+13Gugit8m1WCQe/qGmbmEDpBd igUToaRViYSnxdKEeeDLWUPsC7uU7PTAFXhh1XiHRd3zftdjaSCe9yw313z1UkRz4yjc KrFaR/1z47Wbw29ujq4mzGNyskAslEPj+dT7xFGBNxJGazTvsaPf7BF4glccto1+BBXR 95RdSS8hgYfuTcTvkNgmwwOBvha8Qz37Z1mHZ+Qj59UCyGvHODufh/2g9+sjFuyPENUZ +2vYDVZj1bmycX7aqE3QnK4DrQ+Cp2P4EnmpEKYnTQ1mtfvHtR8OeRQYnRlEXLmQjqqv vdVQ== X-Gm-Message-State: APjAAAXcRI2ivqBT8vkpFqZY6CgLgiNrfMcl65ubmINxDa2PTIBEoHON tJ2C4jdQxOUixEKNqvFJkAHAy4Yz X-Google-Smtp-Source: APXvYqzbqQ06Q2mvJmOlxoifHIHHrkY2nMRIG9GBpjcZdi6CMSMmKLQw5e3doYNLtInUk4We/jrbdQ== X-Received: by 2002:a24:424f:: with SMTP id i76mr1114736itb.119.1559843374081; Thu, 06 Jun 2019 10:49:34 -0700 (PDT) Received: from raichu (toroon0560w-lp130-12-70-50-22-99.dsl.bell.ca. [70.50.22.99]) by smtp.gmail.com with ESMTPSA id z202sm556629itb.2.2019.06.06.10.49.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2019 10:49:33 -0700 (PDT) Sender: Mark Johnston Date: Thu, 6 Jun 2019 13:49:31 -0400 From: Mark Johnston To: Lev Serebryakov Cc: freebsd-hackers@freebsd.org Subject: Re: DTrace SDT probes in =?utf-8?Q?kernel_?= =?utf-8?Q?module_=E2=80=94?= how to? Message-ID: <20190606174931.GB3015@raichu> References: <234087607.20190606204312@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <234087607.20190606204312@serebryakov.spb.ru> User-Agent: Mutt/1.12.0 (2019-05-25) X-Rspamd-Queue-Id: F3481775FA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=B0FjAjac; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::144 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.40 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; IP_SCORE(-0.76)[ip: (1.79), ipnet: 2607:f8b0::/32(-3.22), asn: 15169(-2.29), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[4.4.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_NOT_FQDN(0.50)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2019 17:49:36 -0000 On Thu, Jun 06, 2019 at 08:43:12PM +0300, Lev Serebryakov wrote: > Hello Freebsd-hackers, > > What should I do to add SDT probes into kernel module. I've tried to add simple > > DTRACE_PROBE1(module__name, type, value); > > to source code. No errors, no probes after module load. I've added WITH_CTF=1 to make > command line. Warnings from ctfmerge, no probes after module load. > > What is proper way to add SDT probes to module and how should I build it? Are you missing a #include "opt_kdtrace.h"?