Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp759588ybe; Wed, 4 Sep 2019 07:22:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrqnh+9gh40w2evqN8LPzaqo55Ybin+lv7coB4o7g1Vt8hd7eXpqJ0hdFXbLsRIQFZWQYa X-Received: by 2002:a17:90a:8c91:: with SMTP id b17mr5272576pjo.45.1567606935792; Wed, 04 Sep 2019 07:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567606935; cv=none; d=google.com; s=arc-20160816; b=gXHo/QMXqGRITupFTeI8XYuiruu4m5nARH8QlcNtIW9gecDMb99zdLg1b/xlqIT+t4 gonQwFPOXLhuYsZTDnx/ItYLAAyBPpfecEJzF32cc8D0vQ3legp2mnjeM3K3bbKuHjrC GGEAAy3RY8ucjs/iJ1fWalJX9kcW9D7jpFaZBr5p+3zLKcylbrElw6Pvh9P88s0Exp5s FaNMa9cpLYma09rX2sqSFL6NtBzlPAscBPy81O1onTtGm9HcXaFKCblolYWJa5O52eZ4 VPgzp4ReifYx6PC4pfxY7NkanLewHEyg3G9er+JT+ie2A3YPnL/oDPKDnV8lSfDoMuI/ jWtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9UBBhK/gMZ+Dmdb23yUHEWoHl6ArXXfZxahF6XGM99k=; b=vvvOxoFxsgEja3nKOQp89DquF+T0cTCs5Mkq+57I4UgqgI1CJ92JSzL5hd0G4SjMru SqLOLD7aR88Ac8EGr8WiTOUdei4LZo/L9XMB3FfTZigTMkaOXbcLQ1XvZNbcG702JsDZ VM+/sYIpRPoK5WVI/xEX1TNvLaWr5/VfCelV0dbzJ/2VotupIkVnslGYzbsKb/kxbKBt En/MDGJpn6Qn1fIualMJAh5ODy5Xq6WZrL7Wyq3dhZMc0wUcJxgjRT4HuEFSuA9eLrm+ HDrWCTaBJZtC835amr9QMxVYWobrXTMz+zvuipfYv845z88g5EaUIzCKwSJXMSIb21Y/ HgeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si7452530plz.140.2019.09.04.07.21.59; Wed, 04 Sep 2019 07:22:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730886AbfIDOUZ (ORCPT + 99 others); Wed, 4 Sep 2019 10:20:25 -0400 Received: from foss.arm.com ([217.140.110.172]:56308 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730075AbfIDOUZ (ORCPT ); Wed, 4 Sep 2019 10:20:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3284E28; Wed, 4 Sep 2019 07:20:22 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.194.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A4D13F59C; Wed, 4 Sep 2019 07:20:20 -0700 (PDT) Date: Wed, 4 Sep 2019 15:20:17 +0100 From: Qais Yousef To: Joel Fernandes Cc: Valentin Schneider , Radim =?utf-8?B?S3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Borislav Petkov , Dave Hansen , Steven Rostedt , "H. Peter Anvin" , Andy Lutomirski , Jirka =?utf-8?Q?Hladk=C3=BD?= , =?utf-8?B?SmnFmcOtIFZvesOhcg==?= , x86@kernel.org Subject: Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint Message-ID: <20190904142017.kz7dj2cc43wvs4ve@e107158-lin.cambridge.arm.com> References: <20190903154340.860299-1-rkrcmar@redhat.com> <20190903154340.860299-3-rkrcmar@redhat.com> <20190904042310.GA159235@google.com> <20190904104332.ogsjtbtuadhsglxh@e107158-lin.cambridge.arm.com> <20190904130628.GE144846@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190904130628.GE144846@google.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/04/19 09:06, Joel Fernandes wrote: > > > > It is actually true. > > > > But you need to make the distinction between a tracepoint > > and a trace event first. > > I know this distinction well. > > > What Valentin is talking about here is the *bare* > > tracepoint without any event associated with them like the one I added to the > > scheduler recently. These ones are not accessible via eBPF, unless something > > has changed since I last tried. > > Can this tracepoint be registered on with tracepoint_probe_register()? > Quickly looking at these new tracepoint, they can be otherwise how would they > even work right? If so, then eBPF can very well access it. Look at > __bpf_probe_register() and bpf_raw_tracepoint_open() which implement the > BPF_RAW_TRACEPOINT_OPEN. Humm okay. I tried to use raw tracepoint with bcc but failed to attach. But maybe I missed something on the way it should be used. AFAICT it was missing the bits that I implemented in [1]. Maybe the method you mention is lower level than bcc. > > > The current infrastructure needs to be expanded to allow eBPF to attach these > > bare tracepoints. Something similar to what I have in [1] is needed - but > > instead of creating a new macro it needs to expand the current macro. [2] might > > give full context of when I was trying to come up with alternatives to using > > trace events. > > > > [1] https://github.com/qais-yousef/linux/commit/fb9fea29edb8af327e6b2bf3bc41469a8e66df8b > > [2] https://lore.kernel.org/lkml/20190415144945.tumeop4djyj45v6k@e107158-lin.cambridge.arm.com/ > > > As I was mentioning, tracepoints, not "trace events" can already be opened > directly with BPF. I don't see how these new tracepoints are different. > > I wonder if this distinction of "tracepoint" being non-ABI can be documented > somewhere. I would be happy to do that if there is a place for the same. I > really want some general "policy" in the kernel on where we draw a line in > the sand with respect to tracepoints and ABI :). > > For instance, perhaps VFS can also start having non-ABI tracepoints for the > benefit of people tracing the VFS. Good question. I did consider that but failed to come up with a place. AFAIU the history moved from tracepoints to trace events and now moving back to tracepoints. Something Steve is not very enthusiastic about. LPC is coming, sounds like a good venue to discuss this :-) Cheers -- Qais Yousef