From owner-freebsd-dtrace@freebsd.org Mon Apr 17 19:54:47 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 95744D4226B; Mon, 17 Apr 2017 19:54:47 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 4F008180; Mon, 17 Apr 2017 19:54:47 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id a103so166379220ioj.1; Mon, 17 Apr 2017 12:54:47 -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=R8wrKzVC9t1fsole2/Jq7U9sBicItED9cmwQaCa+tB4=; b=F4a8lH2z5L0HgoMyGVhKEEIq7i0sVav/DenNIVA5VnjoxS1NqV8cK/RRRo7QB4cNa/ rH6GSMkYZlIraQleP+XHi7AYtjtIQh1hv9GdVzB+mMBMCTQtqK3cW1KilBOSxWlkGruU HHFDf7DznRlWGyrDLsY+vlsQCULGBBJw1bugFSbSoRMIVJRN0AdYVmXGMHPO4JMj3Ln8 f8dGSdAbjlM9WUorme/WPEq1tSyRUh5AlWJxmUNbOQq3uIjlszn5dqNvcd7WApXgxOJS 2C1HyAx8Sh1VoFVDCJx3KLsl4AsJaWfclK5H2tDXjIKuZwW+bruRoKWBcQuF1qQ/iHD8 5gFg== 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=R8wrKzVC9t1fsole2/Jq7U9sBicItED9cmwQaCa+tB4=; b=JQAmdrsDJBvlIDcTrro/4TFaUBpJoFx2XC10iOqzdjuzFTyvdu2Dmmly7wzKPJpzIO a3jglFDhurEyjvEnlDbeZR9FhoGgnSFkqStqE/8rostqCjItBOLEMl8fmtUdemxxSghi FNKbqIgs+AjHGwnR9bTNL0hu/X4LYONX1zGW9WRIiQ2ISvm9gGt8bdJF8DOR9f3R8g99 UZGty6VYhkr+yND0oIvlTPUc/dZXhaQVA+zp+q4aHLajNGpxx+eXrT7tbU4d5xTZ2V+k LMQWq3w3rXJVphhW224KfeI2taMBvS/XpAGcYlJZPMrm1MLxE5pscRH5UTWXE6fjfA0j 0BGw== X-Gm-Message-State: AN3rC/7117k1GYyI5vsgYp+Q8oOk3oogW4LrKhUFF/j6p+nzQiOYjXer /t4+DywSf5dLmFyHWJNEEYHgCpAGbg== X-Received: by 10.36.53.7 with SMTP id k7mr10622783ita.65.1492458886763; Mon, 17 Apr 2017 12:54:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.132.202 with HTTP; Mon, 17 Apr 2017 12:54:46 -0700 (PDT) In-Reply-To: <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> References: <3CEE1970-719B-42D1-A95A-FEAD3F375A30@neville-neil.com> <20170212191826.5599A45EA@freefall.freebsd.org> <77416dea-1e9d-4911-b5d0-2ebac227af7e@Spark> <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> From: Ryan Stone Date: Mon, 17 Apr 2017 15:54:46 -0400 Message-ID: Subject: Re: DTrace issues? To: George Neville-Neil Cc: Jan Beich , freebsd-gecko@freebsd.org, "freebsd-dtrace@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.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: Mon, 17 Apr 2017 19:54:47 -0000 On Sat, Apr 15, 2017 at 10:50 AM, George Neville-Neil wrote: > > Can you explain this grief? What is the problem? > > Best, > George > dtrace -G requires the ability to modify the object files in-place before linking. This causes havoc if the objects are in .a archives (dtrace can't read those) or if the objects need to be linked into multiple binaries. It also destroys the ability to do an incremental build, as dtrace -G can't be run on the same object twice. The whole process is really a hack. The build actions done by dtrace should be done by the compiler and linker instead. Getting the linker to support the process would go a long way, as then dtrace -G could be run on individual objects and most of my complaints go away. From owner-freebsd-dtrace@freebsd.org Mon Apr 17 20:28:08 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 E1CF7D42F97; Mon, 17 Apr 2017 20:28:08 +0000 (UTC) (envelope-from venture37@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 911FB18EC; Mon, 17 Apr 2017 20:28:08 +0000 (UTC) (envelope-from venture37@gmail.com) Received: by mail-qk0-x22d.google.com with SMTP id p68so114204408qke.1; Mon, 17 Apr 2017 13:28:08 -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=AW8F6YF7juFfz8y0RMMsOFfMlRA2aZzs15IX70WVDEM=; b=X4OV05mqiwjnWQ44/Ef8OjG6bRtxdsZgCx0m9MowJlv78hShvfFQWNOI80mEzM4lS4 Vx+W47KryqVgQSgQkuLnBSgqSY/EuIjDmSPI+6hm+OudoFcMWWC2yVqhUkdDS1v38fJd V+Q8dG8EJrGWF9i0ML6LarRhQZgn7vMW3UhnIS1CNiarl+7e3Fn8zMWO05CwSkek+oUt 8ypyXU1DYhSgzZKdQ/KskaOkw7tpu3torPtOemEFPnsLY4/I4Hf/hKzfTgiEqdMewjLm /pI4FpHD+R4SFeQmsPAj+ltP1GjlppJTZEpoJhTEab1P80pw55kcsM4MbVD5JD2zAqCp 88jA== 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=AW8F6YF7juFfz8y0RMMsOFfMlRA2aZzs15IX70WVDEM=; b=dA05d2hcscmco2wEW+yF3LP7t8pVncP7N13vSsR0oEcJZj7yULW0vWuM+7PovhhBkW 3yCQfTGFW/eyrcUosjcAxVv2EL5em2x4r3f071bX8aD0W4Bntv/KOXsG5d2L1LQTzNDu yUZXwbncd2sIpDkedxsPFkndzCO0315m5iooYzohFe1oMH9hj2ptLNkuoRVEZmnaryEm 0Tk/ws8wTF3Ww+2umq4zd2Xx7i8CGVneEXj9O2mgn9BNqCjDmAcToa6MJ0zd/927JqSm JWuBNVEQvb8bX5HqORmiXAzaZPUmXwGa+krinNhwDgzls83VwZyWopVYmzh9XIrWlTwu QBuw== X-Gm-Message-State: AN3rC/4VqsJGTshR0p5vmwGePbY795b4+nJ+3ZLDSgGNw87icDBURkJB zo4zgR+mbxrU+gZaKk48Yynd/L8IHg== X-Received: by 10.55.54.144 with SMTP id d138mr9798055qka.207.1492460887714; Mon, 17 Apr 2017 13:28:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.91.68 with HTTP; Mon, 17 Apr 2017 13:28:07 -0700 (PDT) In-Reply-To: References: <3CEE1970-719B-42D1-A95A-FEAD3F375A30@neville-neil.com> <20170212191826.5599A45EA@freefall.freebsd.org> <77416dea-1e9d-4911-b5d0-2ebac227af7e@Spark> <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> From: "Sevan / Venture37" Date: Mon, 17 Apr 2017 21:28:07 +0100 Message-ID: Subject: Re: DTrace issues? To: Ryan Stone Cc: George Neville-Neil , freebsd-gecko@freebsd.org, Jan Beich , "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: Mon, 17 Apr 2017 20:28:09 -0000 On 17 April 2017 at 20:54, Ryan Stone wrote: > On Sat, Apr 15, 2017 at 10:50 AM, George Neville-Neil > wrote: > >> >> Can you explain this grief? What is the problem? >> >> Best, >> George >> > > dtrace -G requires the ability to modify the object files in-place before > linking. This causes havoc if the objects are in .a archives (dtrace can't > read those) or if the objects need to be linked into multiple binaries. It > also destroys the ability to do an incremental build, as dtrace -G can't be > run on the same object twice. > > The whole process is really a hack. The build actions done by dtrace > should be done by the compiler and linker instead. Getting the linker to > support the process would go a long way, as then dtrace -G could be run on > individual objects and most of my complaints go away. Not to detract from the issue with the -G flag, I just wanted to highlight that it's used for ELF binaries, until Apple switches away from Mach-o, this wont be an issue there (dtrace on OS X does not feature the -G flag). Sevan From owner-freebsd-dtrace@freebsd.org Mon Apr 17 20:46:31 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 EA885D423A0; Mon, 17 Apr 2017 20:46:31 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:c:538::196]) (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 B763869; Mon, 17 Apr 2017 20:46:31 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from [172.20.10.2] (unknown [IPv6:2607:fb90:76a:e0fb:d8d8:6ef3:8e02:11ca]) (Authenticated sender: gnn@neville-neil.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8D0DA1720AF; Mon, 17 Apr 2017 22:46:27 +0200 (CEST) From: "George Neville-Neil" To: "Sevan / Venture37" Cc: "Ryan Stone" , freebsd-gecko@freebsd.org, "Jan Beich" , "freebsd-dtrace@freebsd.org" Subject: Re: DTrace issues? Date: Mon, 17 Apr 2017 16:46:25 -0400 Message-ID: <27FA81DC-3939-4798-AB4D-C4BBE86B6AAB@neville-neil.com> In-Reply-To: References: <3CEE1970-719B-42D1-A95A-FEAD3F375A30@neville-neil.com> <20170212191826.5599A45EA@freefall.freebsd.org> <77416dea-1e9d-4911-b5d0-2ebac227af7e@Spark> <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; markup=markdown X-Mailer: MailMate (1.9.6r5347) 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: Mon, 17 Apr 2017 20:46:32 -0000 On 17 Apr 2017, at 16:28, Sevan / Venture37 wrote: > On 17 April 2017 at 20:54, Ryan Stone wrote: >> On Sat, Apr 15, 2017 at 10:50 AM, George Neville-Neil >> >> wrote: >> >>> >>> Can you explain this grief? What is the problem? >>> >>> Best, >>> George >>> >> >> dtrace -G requires the ability to modify the object files in-place >> before >> linking. This causes havoc if the objects are in .a archives (dtrace >> can't >> read those) or if the objects need to be linked into multiple >> binaries. It >> also destroys the ability to do an incremental build, as dtrace -G >> can't be >> run on the same object twice. >> >> The whole process is really a hack. The build actions done by dtrace >> should be done by the compiler and linker instead. Getting the >> linker to >> support the process would go a long way, as then dtrace -G could be >> run on >> individual objects and most of my complaints go away. > > Not to detract from the issue with the -G flag, I just wanted to > highlight that it's used for ELF binaries, until Apple switches away > from Mach-o, this wont be an issue there (dtrace on OS X does not > feature the -G flag). > > Well at least I now "get" the issue. Thanks. Best, George From owner-freebsd-dtrace@freebsd.org Mon Apr 17 21:26:42 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 7D69FD42D9E; Mon, 17 Apr 2017 21:26:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d: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 250E51619; Mon, 17 Apr 2017 21:26:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x231.google.com with SMTP id d131so115387705qkc.3; Mon, 17 Apr 2017 14:26:42 -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=8iIN28Pkb19ZI/54YS/2K4XXkvy7U7R8Jz1xDt2Yerk=; b=KHYnyyfAuvYnNW3AtIGDa4qP1mrGEPVJPi+NTwzNExFMbBXAw2ortKPUQdvLql90uF eaDjIXfPFKG9w5zpdH6rJrxuoxs/66Nk55CtXp5TywhrSCbA9TR0w04m/Ux/SVy1R51E Qg5mf2pliXBYmKcRxqRZKpb9mTnj4fAjwOywCtAMLCx8y6koEMFAxQM88Cn6RLY/0piw pBxcmUpftzmLxOShgsuNcL0zUBq7WKMamTltyiTduGkUvI2clFREI44etyGZvr8CAGKK FB75Hd8fNqR1DuVcqiejTWJmZnjeGD/FArfWcX5w2EYKi9M67I5W9UaXYdh+31GFQbjC 31Ng== 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=8iIN28Pkb19ZI/54YS/2K4XXkvy7U7R8Jz1xDt2Yerk=; b=KtDyIExqGOYnpyCkKZKr1kG7+f+uHFXvJe6AT611LhMq2ouyfSAyeEEmdGRUhcOE8o ftRGkh0dOfMzdtwr3QKsTFSL632fv2lp53jrA6IQ9ZlyNdhlRSemDa/TQSL6ee4oZokn oPY5K6hdIIu43D5n3wYIcEyabRB/MJklhf0GQHFyHF0LR/x4MIurI2AYAhqW1td4H+hu bUylH9srKaOHryJ0dIO9zfSYksiqV9eeg/pW3kmzSPBHbk/UiyJis8zz3heEsYQlzQdz eGLyBn09JzcW+F5cI4fLtI9royq7x0v4MIjoVK+uT/6jLJCl01LmCVwznt6t/DhP+Fl/ +JUA== X-Gm-Message-State: AN3rC/4zEHylotg1j15kgJRDyw+lcbaMYHooCdbqXCOagvB5gMK5DcGg 8/kNzdaPCBOJhw== X-Received: by 10.55.200.28 with SMTP id c28mr10154718qkj.294.1492464401255; Mon, 17 Apr 2017 14:26:41 -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 w55sm8166339qtw.9.2017.04.17.14.26.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 14:26:40 -0700 (PDT) Sender: Mark Johnston Date: Mon, 17 Apr 2017 14:26:10 -0700 From: Mark Johnston To: Sevan / Venture37 Cc: Ryan Stone , George Neville-Neil , freebsd-gecko@freebsd.org, Jan Beich , "freebsd-dtrace@freebsd.org" Subject: Re: DTrace issues? Message-ID: <20170417212610.GE18960@wkstn-mjohnston.west.isilon.com> References: <3CEE1970-719B-42D1-A95A-FEAD3F375A30@neville-neil.com> <20170212191826.5599A45EA@freefall.freebsd.org> <77416dea-1e9d-4911-b5d0-2ebac227af7e@Spark> <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-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: Mon, 17 Apr 2017 21:26:42 -0000 On Mon, Apr 17, 2017 at 09:28:07PM +0100, Sevan / Venture37 wrote: > On 17 April 2017 at 20:54, Ryan Stone wrote: > > On Sat, Apr 15, 2017 at 10:50 AM, George Neville-Neil > > wrote: > > > >> > >> Can you explain this grief? What is the problem? > >> > >> Best, > >> George > >> > > > > dtrace -G requires the ability to modify the object files in-place before > > linking. This causes havoc if the objects are in .a archives (dtrace can't > > read those) or if the objects need to be linked into multiple binaries. It > > also destroys the ability to do an incremental build, as dtrace -G can't be > > run on the same object twice. > > > > The whole process is really a hack. The build actions done by dtrace > > should be done by the compiler and linker instead. Getting the linker to > > support the process would go a long way, as then dtrace -G could be run on > > individual objects and most of my complaints go away. > > Not to detract from the issue with the -G flag, I just wanted to > highlight that it's used for ELF binaries, until Apple switches away > from Mach-o, this wont be an issue there (dtrace on OS X does not > feature the -G flag). I think the more significant difference is that Apple has more control over their toolchain and have modified it to directly implement the functionality that's overwise implemented by dtrace -G. As Ryan pointed out, this functionality really belongs in the static linker; one more piece of evidence for this is the number of non-trivial modifications we've needed to make to dtrace -G to avoid relying on undocumented behaviour in the Sun link editor, and later, GNU ld 2.17. Now that FreeBSD is transitioning to lld, we have some opportunity to implement USDT support in the static linker, and at least one of the lld developers seems amenable to proposals along those lines. However, I don't know of any concrete plans or designs. From owner-freebsd-dtrace@freebsd.org Mon Apr 17 21:30:25 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 9EED6D42E1A; Mon, 17 Apr 2017 21:30:25 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 6052916AF; Mon, 17 Apr 2017 21:30:25 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from [172.20.10.2] (unknown [IPv6:2607:fb90:543f:94a3:6989:c931:5891:e05f]) (Authenticated sender: gnn@neville-neil.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 5DA8C172094; Mon, 17 Apr 2017 23:30:22 +0200 (CEST) From: "George Neville-Neil" To: "Mark Johnston" Cc: "Sevan / Venture37" , "Jan Beich" , freebsd-gecko@freebsd.org, "freebsd-dtrace@freebsd.org" Subject: Re: DTrace issues? Date: Mon, 17 Apr 2017 17:30:20 -0400 Message-ID: In-Reply-To: <20170417212610.GE18960@wkstn-mjohnston.west.isilon.com> References: <3CEE1970-719B-42D1-A95A-FEAD3F375A30@neville-neil.com> <20170212191826.5599A45EA@freefall.freebsd.org> <77416dea-1e9d-4911-b5d0-2ebac227af7e@Spark> <76897620-E958-4AE2-9B6C-062C59526614@neville-neil.com> <20170417212610.GE18960@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.6r5347) 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: Mon, 17 Apr 2017 21:30:25 -0000 On 17 Apr 2017, at 17:26, Mark Johnston wrote: > On Mon, Apr 17, 2017 at 09:28:07PM +0100, Sevan / Venture37 wrote: >> On 17 April 2017 at 20:54, Ryan Stone wrote: >>> On Sat, Apr 15, 2017 at 10:50 AM, George Neville-Neil >>> >>> wrote: >>> >>>> >>>> Can you explain this grief? What is the problem? >>>> >>>> Best, >>>> George >>>> >>> >>> dtrace -G requires the ability to modify the object files in-place >>> before >>> linking. This causes havoc if the objects are in .a archives >>> (dtrace can't >>> read those) or if the objects need to be linked into multiple >>> binaries. It >>> also destroys the ability to do an incremental build, as dtrace -G >>> can't be >>> run on the same object twice. >>> >>> The whole process is really a hack. The build actions done by >>> dtrace >>> should be done by the compiler and linker instead. Getting the >>> linker to >>> support the process would go a long way, as then dtrace -G could be >>> run on >>> individual objects and most of my complaints go away. >> >> Not to detract from the issue with the -G flag, I just wanted to >> highlight that it's used for ELF binaries, until Apple switches away >> from Mach-o, this wont be an issue there (dtrace on OS X does not >> feature the -G flag). > > I think the more significant difference is that Apple has more control > over their toolchain and have modified it to directly implement the > functionality that's overwise implemented by dtrace -G. > > As Ryan pointed out, this functionality really belongs in the static > linker; one more piece of evidence for this is the number of > non-trivial > modifications we've needed to make to dtrace -G to avoid relying on > undocumented behaviour in the Sun link editor, and later, GNU ld 2.17. > Now that FreeBSD is transitioning to lld, we have some opportunity to > implement USDT support in the static linker, and at least one of the > lld > developers seems amenable to proposals along those lines. However, I > don't know of any concrete plans or designs. Seems like something we could discuss in an RFD: https://github.com/opendtrace/rfd Best, George