Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp518674ybe; Wed, 18 Sep 2019 22:34:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcf8xLAx6omuKKd4bFPXv6G/XiA6w7ZbYW6w9XWK+kWEGFTmt9kMwQMluMwgcbApeQnvXs X-Received: by 2002:a50:886d:: with SMTP id c42mr14169185edc.24.1568871294268; Wed, 18 Sep 2019 22:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568871294; cv=none; d=google.com; s=arc-20160816; b=T/ba58VwgavKHNFeExFH/inbnz9w1VO+EoZvhEyBUkowfWT+YWsRwWjuk9vDuZ3vZZ O7/Zm/czLKOApBDEjS8Za8rEU7yivN42dDSPvXiQ7Fgachx/KzTjShVUMTopeZLVmoRl M3O+tu7YbFO0w0ggh6R7uOoGJZKjVzx68+mAxu8m/bDqi30KEarjqprfN4/8M//nq5pl oGqPpety46D4jYKomkzXEP/LBAc4UAfjUU8gJGSkYeYRFOdpRG+1VLNI88pN16W0Eena rUa+FqgvZ0eYG52Xg5ZuCzeB8m6H+w6Zjk4mLN7yysdvSjJVshgQSO5jwlLQk6LrESIs eBEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zF2qMJhxuQ7amM744y+ks2XfHt5ik/9ezksZyHoMiSU=; b=nVy+v6JMW2YHzYuvTIdrPBZZIusNjBQFU6evCYo/VK78FCCC6gKt9Q0WEBFvDsHX4n uf7bA17KPEwj6sp+SuQLwADfjeusWy0C9Acj/WN2pOgCJGmNHPscVylb5kYKzb9wu5Gs mdk+lon9Y9y01B/FladpmPO53wYJ+E/YngPvZrlGam3OBXAaR8VTCJaBGWiBKfNER9JS TmLKXogim9GZvuQYm+MMg/4h1NftkQYS4lR+CxScjcH0c5LAo0MZXYMueCLPcexGuC0/ fE+GgLGbLbu4fY/7Z+zSCjQixc5fzH7Spyv4pm9tbk/4Vk4sSfjLjciVS5biwZ5MZ9E7 Bt1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@uber.com header.s=google header.b=ELpEwWid; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=uber.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si498667eda.294.2019.09.18.22.34.30; Wed, 18 Sep 2019 22:34:54 -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=@uber.com header.s=google header.b=ELpEwWid; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=uber.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387924AbfISClm (ORCPT + 99 others); Wed, 18 Sep 2019 22:41:42 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:35037 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbfISClm (ORCPT ); Wed, 18 Sep 2019 22:41:42 -0400 Received: by mail-oi1-f194.google.com with SMTP id x3so1462210oig.2 for ; Wed, 18 Sep 2019 19:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uber.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zF2qMJhxuQ7amM744y+ks2XfHt5ik/9ezksZyHoMiSU=; b=ELpEwWid+4qlSD34uVmhArCa/CyRJZ2W/ET6T6iEapIjYfvkOQegVRurqSJWsY4yx7 4eTyl+ojM6L/nV6sWwIpX+g3xFpwHDLM+2wMJzIMnABiDk6SLSydfNiVEvCn5feRLsUD BWOSvWTK6JQ1jq+zFr0I4iLUGFYdKNQyL/bRE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zF2qMJhxuQ7amM744y+ks2XfHt5ik/9ezksZyHoMiSU=; b=tDMH5Vbw63nBs9J+J1KwBFkH6cioThgF3CACHNZ0ogYZKN9drpfDqID4xQB/toubm2 eBWUKhbdFhirbHBxfkubMHX8g+tntxeFCLTGJ9wy3cYKeOfPWLbiHX8cY5bGoRWEWRpX LI/y1hbl5mmyvhkYB8l+FJAIoQ6utKsf9Jdkb2jrR3jCrgbq//YQ7HVx8TvkducI38E7 u5rU+pIYOOO1qIcU/T/ovK3OD6XKa1z7gWazp1RSo2+RmfJqKJc8/QM0dQ5NOo721XmT 8e6klpVuVPpehwc/RjtrsLs/kbfTusfSPIjEcpp43pJWkhky08apl2BSGKmpx4wn5QEv aJsA== X-Gm-Message-State: APjAAAUPtU0wemgTCBCPjvt+iIznSEIsiHylz7DnwEaINWPELfRBkmB6 5vDXthCPtAxqRRp/bpxYkTJ5O6oFJzt82VEekp1new== X-Received: by 2002:aca:d708:: with SMTP id o8mr701338oig.68.1568860900916; Wed, 18 Sep 2019 19:41:40 -0700 (PDT) MIME-Version: 1.0 References: <20190918052406.21385-1-jinshan.xiong@gmail.com> <5302836c-a6a1-c160-2de2-6a5b3d2c4828@fb.com> <20190918143235.kpclo45eo7qye7fs@ast-mbp.dhcp.thefacebook.com> In-Reply-To: From: Jinshan Xiong Date: Wed, 18 Sep 2019 19:41:29 -0700 Message-ID: Subject: Re: [PATCH] staging: tracing/kprobe: filter kprobe based perf event To: Alexei Starovoitov Cc: Yonghong Song , "jinshan.xiong@gmail.com" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "mingo@redhat.com" , "bpf@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org That's bloody true. Thanks for your insights. I will make an example program and commit into bcc repository. Jinshan On Wed, Sep 18, 2019 at 1:22 PM Alexei Starovoitov wrote: > > On Wed, Sep 18, 2019 at 8:13 AM Jinshan Xiong wr= ote: > > > > The problem with the current approach is that it would be difficult to = filter cgroup, especially the cgroup in question has descendents, and also = it would spawn new descendents after BPF program is installed. it's hard to= filter it inside a BPF program. > > Why is that? > bpf_current_task_under_cgroup() fits exactly that purpose.