Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp994256ybn; Wed, 25 Sep 2019 10:41:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvoaxv3VzswcoMiyVlQxPBxufEZJ5zM/qhdw8opEnoegY+E6RJNUbpkyTpLaFT8xD8fnYA X-Received: by 2002:a17:906:7e56:: with SMTP id z22mr374116ejr.294.1569433276889; Wed, 25 Sep 2019 10:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569433276; cv=none; d=google.com; s=arc-20160816; b=s2JZJ0Pnk3iQWfnd4hf1JUiXUK3Q2o2Po9jYkrA9OaIrd7dWCFHmc5j4lnXm+jx7wh kt6RRUFRC3iryiZJE22tEMRic2yYhE899dr5WnEZDtJaZg1qZZEbbDLL2ZpTLNRL483e 1dPcUatBdcP2l2VOWlYLfj0Or9ETK9C5ZG+f4Fabr38/SW5zA7NDp/l9EAzF9hZqMFL/ EJS3z3i6ldXAEsrR9tgfLOshT/pylCYR6SlBtVLq3V0f+2fsn4nMlclGZaPNZu3MmzfM Qi3Ld1c6grPXKQ4VRCoRSKhMHlm69CN6NTZeQSTAQ2JTuZ1l45orIeRtZNc+IhefgAPw SCkw== 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=WWmtpK6dnlR9fJevrACcMofMzz0Yztf55o8PV6HbI9I=; b=euYiKSlhl02+PpBCVGoPVpYXUzee/4oYFwyKgAJhxHQ1DJ0BRHGfMmmLw5QpNZhQ5P eDrBNJNY5Rz1wINtKn2vZFpr3/uwSu4psFLnkuQMZSRBzBtC7OSBqHXSrP8Hzj9CEXkX UaN8euw/v6rLilBd8HRMTbgGDbgJFYYlySLsJQfQFWy7LQBaAbDAGV3azQbYyCWicdQZ 0VMiFcH9YENCp2QCs/s5qCyPZ4FwzakGP7sNZ1d1xa9E8NWRjscCdUMtdsoznVAN+2tF HAiFyuIQHf1aewil/p6+6sY8gy8i9atTihhH9l9zjgVcsYoWBNf86y4nHbAxD5FeUR7W rsrw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si121615eji.137.2019.09.25.10.40.52; Wed, 25 Sep 2019 10:41:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732652AbfIWORn (ORCPT + 99 others); Mon, 23 Sep 2019 10:17:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52899 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730669AbfIWORm (ORCPT ); Mon, 23 Sep 2019 10:17:42 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9032A356C9; Mon, 23 Sep 2019 14:17:42 +0000 (UTC) Received: from sandy.ghostprotocols.net (ovpn-112-16.phx2.redhat.com [10.3.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A92B60852; Mon, 23 Sep 2019 14:17:41 +0000 (UTC) Received: by sandy.ghostprotocols.net (Postfix, from userid 1000) id 2170011DF; Mon, 23 Sep 2019 11:17:38 -0300 (BRT) Date: Mon, 23 Sep 2019 11:17:38 -0300 From: Arnaldo Carvalho de Melo To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@elte.hu, jolsa@redhat.com, namhyung@kernel.org Subject: Re: [PATCH v2] perf record: fix priv level with branch sampling for paranoid=2 Message-ID: <20190923141738.GB3617@redhat.com> References: <20190920230356.41420-1-eranian@google.com> <20190923140345.GA3617@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923140345.GA3617@redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 23 Sep 2019 14:17:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Sep 23, 2019 at 11:03:45AM -0300, Arnaldo Carvalho de Melo escreveu: > Thanks, tested added Jiri's Acked-by, applied, added this note: > > Committer testing: > > After aplying the patch we get: > > [acme@quaco ~]$ perf record -b -e cycles date > WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted, > check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid. > > Samples in kernel functions may not be resolved if a suitable vmlinux > file is not found in the buildid cache or in the vmlinux path. > > Samples in kernel modules won't be resolved at all. > > If some relocation was applied (e.g. kexec) symbols may be misresolved > even with a suitable vmlinux or kallsyms file. > > Mon 23 Sep 2019 11:00:59 AM -03 > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.005 MB perf.data (14 samples) ] > [acme@quaco ~]$ perf evlist -v > cycles:u: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD|BRANCH_STACK, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY > [acme@quaco ~]$ > > That warning about restricted kernel maps will be suppressed in a follow > up patch, as perf_event_attr.exclude_kernel is set, i.e. no samples for > the kernel will be taken and thus no need for those maps Its there: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=c8b567c8a96a35acff746b1eef6f859e2a9fc195 - Arnaldo