Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5197815imb; Thu, 7 Mar 2019 09:49:58 -0800 (PST) X-Google-Smtp-Source: APXvYqywQIQLP94rHoPO+puQjYnLZng4iUdZSGQYinE2qXgaQnz2rBsRTrMnmfZaht2qCwE6HAHJ X-Received: by 2002:a62:ac10:: with SMTP id v16mr14476953pfe.111.1551980998709; Thu, 07 Mar 2019 09:49:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551980998; cv=none; d=google.com; s=arc-20160816; b=u9by6y07niIp12fMdDbhbD2myycqaVYomTFZmEcVfP60dCbewcOiPHNc/3FPtT1Bau odAGz7/iid1qP2FgEuc1i50EGBTaCcFbR/Xr2VZqs8REDX53BobZ1k66RHeeetpesoae RjvrxAncpYtU1neQvj8pHF+eSm0cseLNqf3Txykuyz86QXfewlK7W1QBcz+KYgr2uH32 wQr+kpF/rgFPCYOZC3bM0wgKazf7hWuogRA7lAlWLrQ0XtltETDva8KDBVKKVJLO52x/ xsrJ3ZCFnejPqXndPFMFZqwIYizcBNs9OhU8439AJBzyLQZIsRv6rtVxjVG8dnA0AanT 0t1w== 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=9J2Fo6N6KyGEmau4uxMb3UNQVHxN5eNj0Xa06QqRZxs=; b=c71Hz1qmPg5Zit+XtqFiul6lBRGN5FR3JliCPb9TsYbSb6gA8r056z59TgRgOZ5AqQ k481Y82y1o4ftwFn39rZEPcR7jr6K0tjrjh2DGQGSRKUvTRGBPamNcyZnx9uDqyoX07w J1Le2nKfqWKCL5wlbaZLKDagkFEhJwfYcfIUO/JzK4DNbHI1EHCLouzqucaHVZQVyOQR jJSCOGOpBfiGz3tPb4E95qVnnmh7s9ZeuHwNFfseyVBqap4kqI+i4o2Otr4rVeSGCYTg HjwnQnOTQlXKnSSgtcSIn99VJwx2cJDaUvLM7nNbhNLmJoAtxAN1ky3hPTnO5Do0Ekjx XFYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MmuAJD3U; 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 o25si4804050pfa.259.2019.03.07.09.49.43; Thu, 07 Mar 2019 09:49:58 -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=@linux-foundation.org header.s=google header.b=MmuAJD3U; 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 S1726760AbfCGRp7 (ORCPT + 99 others); Thu, 7 Mar 2019 12:45:59 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:40497 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbfCGRp4 (ORCPT ); Thu, 7 Mar 2019 12:45:56 -0500 Received: by mail-lf1-f67.google.com with SMTP id a8so12333148lfi.7 for ; Thu, 07 Mar 2019 09:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9J2Fo6N6KyGEmau4uxMb3UNQVHxN5eNj0Xa06QqRZxs=; b=MmuAJD3U97Z83DdymKWDdbbWfbcEvOnaHoe6yyjernK8Xr477BcU3EcMjrxtBSYrxr hTehdQ6a7MDJMGmr7Pf4yzw5bVVwaHt6N3W4luWzQLQ6LrVsb/X8Q1nuDo5w1f9RZ8da HkZcFn3WAfv4cSP0ntxDHdeh2GUWDjE9iJrwE= 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=9J2Fo6N6KyGEmau4uxMb3UNQVHxN5eNj0Xa06QqRZxs=; b=hUJyUbfpDiruWUcLeLumAIWcFpxqc2051xRiZpG7YkGiRbuKGt7RXfnvE3WB4jgTxQ p+7IPITYU1l3tklYGOY2ub2Nv40ey1GgiBA+lfpz2az8Apgg2swyqk09Gi3fY4z/WMKQ sy44MWKHBYggz+qlIt8wuKH4/R0jDsrdirDI3dQJ3aBPlEa4GdpFswdBe/VkTl35QZ1f d25Elt8Sy3ob/u6VLkbNE9NOG1ArVkwew5GysHIhkr/ZEeejHO0oi70yXXZDctjtVaC0 qfBBKFRAb68kNZLUG3CUmoyJY5esEo626qY4N4CvR8OMdeVgeABZoSvHUISAzMPh4rd7 s68Q== X-Gm-Message-State: APjAAAWXDLllt/fFdjratRffF9yK2Rv8gkS+S9Lhf46TFO7f27oFlxs/ hzZ9bn5T6MhtWnJJGPnyJOETkY6PkCA= X-Received: by 2002:ac2:41c4:: with SMTP id d4mr4440699lfi.104.1551980753506; Thu, 07 Mar 2019 09:45:53 -0800 (PST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id b64sm941341ljf.82.2019.03.07.09.45.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 09:45:51 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id v16so14966922ljg.13 for ; Thu, 07 Mar 2019 09:45:51 -0800 (PST) X-Received: by 2002:a2e:8585:: with SMTP id b5mr6469940lji.125.1551980751101; Thu, 07 Mar 2019 09:45:51 -0800 (PST) MIME-Version: 1.0 References: <20190307114511.870090179@infradead.org> <20190307120317.GD32477@hirez.programming.kicks-ass.net> <20190307125526.GB32534@hirez.programming.kicks-ass.net> <20190307131312.GC32534@hirez.programming.kicks-ass.net> <20190307164705.qbu4ytdfdmsighas@treble> <20190307171709.dap5hfeof4yo3nsc@treble> <20190307173810.GI32477@hirez.programming.kicks-ass.net> In-Reply-To: <20190307173810.GI32477@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Thu, 7 Mar 2019 09:45:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/20] objtool: UACCESS validation v3 To: Peter Zijlstra Cc: Josh Poimboeuf , Thomas Gleixner , Peter Anvin , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , Linux List Kernel Mailing , Dmitry Vyukov , Steven Rostedt 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 Thu, Mar 7, 2019 at 9:38 AM Peter Zijlstra wrote: > > Also; it seems to me that something PT, or maybe even simply: > > perf -e branches -e branch-misses > > would get you similar or sufficient information. Yeah, I'm not really seeing a lot of upside to PROFILE_ALL_BRANCHES. Particularly since it doesn't actually profile all branches at all. It only basically profiles "if ()" statements, which obviously misses loops etc, but then also _does_ hit things where people turned loops into "if (unlikely()) loop()", which happens in (for example) low-level locking code etc that often has a fast-case "first try" thing followed by a slow-case "ok, let's loop for it" thing. So I think PROFILE_ALL_BRANCHES tends to have very random coverage. I'd love to get rid of it, because it seems so random. Linus