Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2178246ybl; Sat, 25 Jan 2020 18:54:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyF1OudvHAPnx9Gi21zTbc7+AhDzmBMpFog8pu59T+OCLqWs5lwHWjXKmsXCEL+xTrrj0nr X-Received: by 2002:aca:c08b:: with SMTP id q133mr3675017oif.46.1580007289583; Sat, 25 Jan 2020 18:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580007289; cv=none; d=google.com; s=arc-20160816; b=yMK3OlsQFAo/s86xoWamYeqgN9QX7qq83wxXyGtEaLbB1hgfQpEaMT/JhifO/+qZxn bthrHekQXL26lqoAFKBt22fav6koGBFlVSwtM1Kb71wZUEmH9k0F2hcJ1TeYQr13mmJB pyB4izYXsyHOO0dErZdWMxfuAm62AjGZAv75xhIP/L9XezCDmlcln2rs8xmRguMhi0fq 0DEE+ousq93jCMJTxmEiF/xNcmjtCRBNPCEEAnR5Wr+5zSCRZpPgmU7934dVpgyPSugE sIpyxRQw2A8CG+0hvDsI8MPF4f2FKOWz9FvG4XAVxQ3qI6wG1yy1SpKyA1nXkR8XzYnh bhqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OEnj2kiwYLznKlJVo3yvAhfsKhH1hw584iUR8u5OCkk=; b=BLvpUh4MoooT+9Ji5vurRy69Lzei43IJxbUre8NhNprfXLwzuM4JyN8jY0YcxoFcH9 ZxaL462rdgvkNedUcsXq8kvqwmp+AkwSvbG5ETkRPjJd4eMvcuGUePBoxqI93lg+zn7c COQ0YNnLqh9CcmDjbYkl1JjnFWA24UPFXvA+/UGL1u4BY31nxWazpUlan7jl/ZmvmH3y wHY6Q0oaJbvc5SGsXL74LPusWPYYDmX29zrsfM8Vok7wtggLSw14kcfjOHX2a9fXz0AM V3RsgACua4NH6ZBrsx4JZKeZQcagQvt2snatJPg4TGsC+vJKZVRmTbj8iW6fg9x6cSjM 960w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kKiKSmXv; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b137si1883738oii.63.2020.01.25.18.54.38; Sat, 25 Jan 2020 18:54:49 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=kKiKSmXv; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729106AbgAZCxe (ORCPT + 99 others); Sat, 25 Jan 2020 21:53:34 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38169 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbgAZCxd (ORCPT ); Sat, 25 Jan 2020 21:53:33 -0500 Received: by mail-lj1-f194.google.com with SMTP id w1so7066540ljh.5; Sat, 25 Jan 2020 18:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OEnj2kiwYLznKlJVo3yvAhfsKhH1hw584iUR8u5OCkk=; b=kKiKSmXvwzx5PTxC+jZ10pPoehY0tlvmMT65gnHMD7h5jCs5lDreLo/gRxv7VXTws1 SQ4i9cwJ/rsoABGcIK5igQMANBNFcyROocuG48TgAAZ9ApqaU5ExJ/Rssoc/hHi/sidh HobaF0dDP05tPK6crZE1j1B5GY+sR6ENTP6JZFkkk/rKOy77M+1Xxpv77Pv02pB12VdU YLxvKsLTWAZhKOVwLcqfyZis9RWR/T6gDc+1fEZFlOcMm4i8nbqFyk//gvAThpMHS3v0 apg4NHfIUmWISfHEbcoAEivL7acqec9Ok89vpDvO/Jwoy3HxHS1EbEu2D34QLydUx9VD yS/Q== 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; bh=OEnj2kiwYLznKlJVo3yvAhfsKhH1hw584iUR8u5OCkk=; b=EKRAYYvVxTct55HqnZ3KmHkOQoxgU7LsqsoiPzdXB3oc1Cykh5FCb0yVuJ/APkXEwE XIYk5WxE55+DsTysUw3713hj24wsNGZ/ZBMqBMohrmnoQYzT4ZKUghvPoh3b9ZIc4s2I Lstk7+hmfBdZISkc9Dq+29/Oe/8SDNJn0bFnm0pZOXLPFS/GCbWz+eamvR+Ow8D3/bZO 8gx4JZfkGYmmdBFcOoHRYuJgVCmJU7P0krmjrl8BhfG/XK2dctXJlfhisJhcctrsFBFL 5jJAMeCh+kjxdo2/25kldM65XN8NoNezXe57WuttBB8qOA4A4x1w9eom9u3WJ9eJWHY+ Vknw== X-Gm-Message-State: APjAAAX+/6r96ztEsK8eygWoZX1TkYVwOOjwLcEpXsDGPb0POVl0IZz5 ieh2p5ZmOka4CN2BvihJGDhHBNjBWNk8CO6FMmA= X-Received: by 2002:a05:651c:20f:: with SMTP id y15mr5952903ljn.7.1580007211478; Sat, 25 Jan 2020 18:53:31 -0800 (PST) MIME-Version: 1.0 References: <20200125223117.20813-1-dxu@dxuuu.xyz> <20200125223117.20813-3-dxu@dxuuu.xyz> In-Reply-To: <20200125223117.20813-3-dxu@dxuuu.xyz> From: Alexei Starovoitov Date: Sat, 25 Jan 2020 18:53:19 -0800 Message-ID: Subject: Re: [PATCH v5 bpf-next 2/2] selftests/bpf: add bpf_read_branch_records() selftest To: Daniel Xu Cc: bpf , Alexei Starovoitov , Daniel Borkmann , Song Liu , Yonghong Song , Andrii Nakryiko , LKML , Kernel Team , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 25, 2020 at 2:32 PM Daniel Xu wrote: > + attr.type = PERF_TYPE_HARDWARE; > + attr.config = PERF_COUNT_HW_CPU_CYCLES; > + attr.freq = 1; > + attr.sample_freq = 4000; > + attr.sample_type = PERF_SAMPLE_BRANCH_STACK; > + attr.branch_sample_type = PERF_SAMPLE_BRANCH_USER | PERF_SAMPLE_BRANCH_ANY; > + pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); > + if (CHECK(pfd < 0, "perf_event_open", "err %d\n", pfd)) > + goto out_destroy; It's failing for me in kvm. Is there way to make it work? CIs will be vm based too. If this test requires physical host such test will keep failing in all such environments. Folks will be annoyed and eventually will disable the test. Can we figure out how to test in the vm from the start?