Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp859743ybe; Wed, 4 Sep 2019 08:47:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXvkWt00o86fQ0KPLSkkbay2VmDsZA8lPiK2+59eMZrXMOnHywLR7Bf62fIzPYZNfhxY6g X-Received: by 2002:aa7:84d2:: with SMTP id x18mr8928683pfn.250.1567612068303; Wed, 04 Sep 2019 08:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567612068; cv=none; d=google.com; s=arc-20160816; b=XfhwwCW50s3CPqm3DUhAGuW3DbzStTlgpX2o3uOYmIiLP0BYbNyZT9LKniEJgVOPKo xg3QZ8bTrLl44CJg1wpgyxM6+AC51XI8+A33V5FcFv7nHi5pGNGghn+CmTSDF1llxTYS lmVYCWrtXD7j384STiGjSWSfpUzLz2tuw8lOpzIA1PjfCVAxD/omwYYQaaUR+ghLt0K6 mFDKZrZg+6uToMRAD5jJWbJ/ZAUCeGEN9h8i01zNsyl49K/zO/pltCg258FW2O3U6Ett 1lczTsnLj4f5FeTna074BNSfPeA5f33dlvPsSF/I7Vcxy718pDkEYA5DbBKvmivp8pKy 6rvg== 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:dkim-signature; bh=j0l523Ij4e8m//xpFaU6A50xYdK/8fF+iRy7KtwFx8U=; b=Ov6HB4xN1IPM1cYzGalKkO+OH8fLRL7mYpDjZwXCTC3cm4wSZQrZM1tk1tiicrr7lu US+0xrsP/G0dlPr3ZjoCyA/1uJkw/tIrZRU00UmOqh5k7NeIz0iUfUotnCHKz6Q2Yj4E DNvSBUVZgnOUnF7J0V5zw5drIw0zuoh13P+IevQw0J7enZ6PBJf7Sz1M+4GLhKpGIWqk beetOvDSvxmdtfm6lLYd0c2UzEhNEkUOnyMATv7XR/9TevNRnlddxm+ueUJncrTHCNFw 2XIc2wdT1VNO2Qq6r9hZysze6iAAQL/oG2ZpdP+7hlK/gNc7TTdJEf+nt6cOpyNxni3g h3Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=VmifIS+H; 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 u2si17241588pgr.284.2019.09.04.08.47.32; Wed, 04 Sep 2019 08:47:48 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=VmifIS+H; 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 S1731307AbfIDPq3 (ORCPT + 99 others); Wed, 4 Sep 2019 11:46:29 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43158 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730507AbfIDPq3 (ORCPT ); Wed, 4 Sep 2019 11:46:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id u72so7267358pgb.10 for ; Wed, 04 Sep 2019 08:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j0l523Ij4e8m//xpFaU6A50xYdK/8fF+iRy7KtwFx8U=; b=VmifIS+Hzwcp7gvGnIH7uWKsaXk17f+X12W5SfvHDPzJ5fQUft4XIzSDX0m9dJAbGe og9/FW4LFKTQhe6hz4+1gun/ezqkxxbrHoZj7cr0Ex6q3b7o3CyHD8TKoJhatirZLoBm tNjR1ftQcuI2/Wlak80JL65Uqk86OP18E3dTM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j0l523Ij4e8m//xpFaU6A50xYdK/8fF+iRy7KtwFx8U=; b=Lk6G7UXFRyOkViPVIoxUb2NzgQwRmUglZokpSGSgmqhxArb+uLAlnkRvPiu3hE51ZO JYgaECuN7HVv0X+74K0lJkn+zc7izMcphGMJ4mbI65OCDte9oyAQSjRy2kbiQJOzyP5X wiZHUzfVMdpCFqS1eUWdfVLH7eaksESqsdhxGTT1cHY/nZfX08rQrZVOdNZkLjERyJ30 rq3qcgivzPrZ6ZsoZDY3LIpVijYdpoEblU4gkKiQJGH0TChw5XtFkkyBG+Dz/Q6xsZ5I wrhGy804lGGwJtFXTeBAKYV5U8peroitUvpmagFO5r8OL6gaODWBTANHMo2tKbrzzioi 5weQ== X-Gm-Message-State: APjAAAVrzunoTIGuqJAD68ev6o30wGGWK+gLzKUrDYJQV/wQSPlCnnA2 0pTxIWqyOppUULnu+ehTsrxHbDkj82g= X-Received: by 2002:aa7:90c1:: with SMTP id k1mr45696911pfk.46.1567611988668; Wed, 04 Sep 2019 08:46:28 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id 127sm7721561pfw.6.2019.09.04.08.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 08:46:27 -0700 (PDT) Date: Wed, 4 Sep 2019 11:46:26 -0400 From: Joel Fernandes To: Qais Yousef 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 =?iso-8859-1?Q?Hladk=FD?= , =?utf-8?B?SmnFmcOtIFZvesOhcg==?= , x86@kernel.org Subject: Re: [PATCH 2/2] sched/debug: add sched_update_nr_running tracepoint Message-ID: <20190904154626.GL240514@google.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> <20190904142017.kz7dj2cc43wvs4ve@e107158-lin.cambridge.arm.com> <20190904144159.GE240514@google.com> <20190904145759.xljofuqibwbwxzfx@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904145759.xljofuqibwbwxzfx@e107158-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 03:57:59PM +0100, Qais Yousef wrote: > On 09/04/19 10:41, Joel Fernandes wrote: > > On Wed, Sep 04, 2019 at 03:20:17PM +0100, Qais Yousef wrote: > > > 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. > > > > Oh, Ok. Not sure about BCC. I know that facebook folks are using *existing* > > tracepoints (not trace events) to probe context switches and such (probably > > not through BCC but some other BPF tracing code). Peter had rejected trace > > events they were trying to add IIRC, so they added BPF_RAW_TRACEPOINT_OPEN > > then IIRC. > > Looking at the history BPF_RAW_TRACEPOINT_OPEN was added with the support for > RAW_TRACEPOINT c4f6699dfcb8 (bpf: introduce BPF_RAW_TRACEPOINT). > > Anyway, if you ever get a chance please try it and let me know. I might have > done something wrong and you're more of a eBPF guru than I am :-) eBPF guru and me? no way ;-) I have tried out BPF_RAW_TRACEPOINT_OPEN before and it works as expected. Are there not any in-kernel samples? Perhaps Alexei can post some if there are not. thanks, - Joel