From nobody Thu Mar 23 11:58:07 2023 X-Original-To: dtrace@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pj3kp5mxbz41G7p for ; Thu, 23 Mar 2023 11:58:10 +0000 (UTC) (envelope-from domagoj.stolfa@gmail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pj3kp2XHvz4HJ3 for ; Thu, 23 Mar 2023 11:58:10 +0000 (UTC) (envelope-from domagoj.stolfa@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-x335.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso920478wmo.0 for ; Thu, 23 Mar 2023 04:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679572689; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=uJPiq/YBFvtFE+zxjT0tJSy4Fl3rut3ptqx58ZBQpPs=; b=S0Ht4adjLp4vXmqv51sxgr0qHTqLD60ZXzWUYyflxCkg/OWUo7bUEL90Sk23yeYL7g lA5Kx+oD93t1Lj9qFR4YuTEvmQ9ec5axHSIAp+veqViq/Lf6cja7jCmWAol8EnOH//yi SDsFWmXWRXKdl7T8VRVuni2aRNvu8UIlhd9uiIu9v0Jvb7PdEuSlo1ikk1KxpBBBK73y 5MHa/pZrCCbgxny4i566Qyyj55ZxESTtgom9NNSL3LihIHk2Y/dmOmhj5d0RqeWGOlap mvTmQMZccIbuh66Z3NcaIx+VmFTQDY519vIK8Gy2pMb4gPdoCJz0DeYfC8k5UoZ1/QUP eINA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679572689; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=uJPiq/YBFvtFE+zxjT0tJSy4Fl3rut3ptqx58ZBQpPs=; b=N8pxSKcG32m2KzX0v+O1j2miXD2LJiO68r08sMlVN+BH2odKXDiLFayIRewlfhjIGu 3dkSs8Z1Ysw74D1NvXkOC5lqyR98DE4a5qiJAh5S6y/8TuU0PZJUUo4gYiVtkLWulrbl vMtd5JxoHkL3AU1+E6r5zM7Jy7UmdCKNgBh+73+5nJAw19EvF9iwkOfqAi0qv/fOXuxb BNLm4NoCxsaY2yAXK5VmFTFOB89eCmR8HUFqZxPdS6L1JIGAFdop7DXcT3dJVq+uK/bK XQilO7+22aUtaO6OauVz7P/mlvHcAYhHPN5MlGD3qaL/1ko7bbYaTHqKbRTjEv2tWCO/ pWdQ== X-Gm-Message-State: AO0yUKVQFDha5qzazawwUS6vQTczmkOpErhofIIjCQOQHeykWs6+o/sL f3pWQBYz/QUoL8K/MOCsfd1k+Q1lIJ0= X-Google-Smtp-Source: AK7set8IGX48tKLfMtuqxdXyJfb4tghIJ7SaGnpdy6cnmK/StCrWosnsk0FBW7CIdyTZsGOwQGkQtw== X-Received: by 2002:a7b:c844:0:b0:3ee:1239:1ba7 with SMTP id c4-20020a7bc844000000b003ee12391ba7mr2038858wml.27.1679572688648; Thu, 23 Mar 2023 04:58:08 -0700 (PDT) Received: from ?IPV6:2a00:23c7:8590:6d01:2c32:cad7:453a:980e? ([2a00:23c7:8590:6d01:2c32:cad7:453a:980e]) by smtp.gmail.com with ESMTPSA id o6-20020adfeac6000000b002c71a32394dsm16063526wrn.64.2023.03.23.04.58.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Mar 2023 04:58:08 -0700 (PDT) Message-ID: Date: Thu, 23 Mar 2023 11:58:07 +0000 List-Id: A discussion list for developers working on DTrace in FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-dtrace List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-dtrace@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: USDT support (in build framework)? To: "Bjoern A. Zeeb" , dtrace@FreeBSD.org References: From: Domagoj Stolfa In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Pj3kp2XHvz4HJ3 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi: I've done this for bhyve, specifically for virtio-net. I believe this is the whole patch I needed: +OBJS:=bhyve_provider.o ${OBJS} +DTRACE_OBJS=${SRCS:C/\.c/.o/} + +beforelinking: +       dtrace -G -s ${BHYVE_SRCDIR}/bhyve_provider.d ${DTRACE_OBJS} + however, it has been a while and I don't 100% recall if anything else was necessary. I had to create a helper DTRACE_OBJS because using OBJS would cause linking to fail later on. I'm sure there are better ways of doing it, but this seems to work for me. Let me know if it fails! The provider itself is: provider netbe {         probe tap__recv(char *, void *);         probe tap__send(char *, void *); }; and the probes can be called as follows:                 DTRACE_PROBE2(netbe, tap__recv, g_vmname, mbufidp); Hope this helps! -- Domagoj On 3/23/2023 1:09 AM, Bjoern A. Zeeb wrote: > Hi, > > https://wiki.freebsd.org/DTrace/userland says it is outdated. > > Do we have any description on how one we would add USDT support to base > system applications?  Or do we support this at all? > > /bz >