Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp338999ybx; Fri, 1 Nov 2019 04:25:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjQ4oB4vHSqz11EBcwFN3K7+fxxLkn9MWGTFzXmFY7JiWjNNjAN5mLTUBDd/VolayuyZBV X-Received: by 2002:a05:6402:150a:: with SMTP id f10mr11746487edw.235.1572607552059; Fri, 01 Nov 2019 04:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572607552; cv=none; d=google.com; s=arc-20160816; b=PqOurudZbT/eulLsAjJqFirw2O8rWce0hfr+ejG7mQgpVYg8AQ5wg0cmfA8kpoDcr8 Yg2ILDITkgWtDhPcBK56QL5tWKz0m4i2p+B+jfBob36/4kOzseREefxYWC2bPeiXhPC7 7geBG9034BzWLRNvuqTgWWV/1yC+oeHFnqc881JwV9gMIwajNSPdfnN13JpakN+N2s5i Zpn179/LZ77wrDVhqiIoJIm/HWGo9ZHgANyf/una8036pJ1ke4xFCCnAmoUG01wdtuIO EzE1VIjC7WqdxxQcBNV1tCggTDitHQuyLucL9P0+xcTTTNs38ad4NCcR9s1gGrGwtj/w HVOw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jmed3/I8XI1nyJIh3Dfsq3N/qBZGlZAkvrKYEkgMiC0=; b=FJBiIJidbyfM6ZtiATAZdWXK/hjWD/3LL/F+jB9+d/gtV4bdA/+3AWCBgR20juqxh7 q1QuP0NUCH9XVvbN7sRVL1jQDtKh/9rpSK1WaHaR4FgJav/EJXkTVQQWNvyO4ZbE2V7w UkNYrajuD2wSnhVsL6LvDdYXKWh3f99WIrcYMapvOs266Vd9SQdQ3I9gyMHlFvb4eRur 1sWUkoUTZTR996tlwunef43a30zoriUN9CSs9cMj6Sq75dbFnkLcJpthrN8Bg3d9vPVX 002dRxZUPcW6ZV92epPH/A5CExHN/zEj6kSHpH9G0SvjAMpR65p4Q2/Qip1/ddp4n2dI 1tzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="lawnmS4/"; 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 b10si84723eda.160.2019.11.01.04.25.28; Fri, 01 Nov 2019 04:25:52 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="lawnmS4/"; 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 S1729353AbfKAKGS (ORCPT + 99 others); Fri, 1 Nov 2019 06:06:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46472 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728048AbfKAKGS (ORCPT ); Fri, 1 Nov 2019 06:06:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jmed3/I8XI1nyJIh3Dfsq3N/qBZGlZAkvrKYEkgMiC0=; b=lawnmS4/4P7nUtVf89/ilyj0IB b9Z6ob1Ti2QlYsNCks1XCPssUqvcSQ8ouHl9hUas1hbbqdOn5YJhEFYFmGyz7gLsTSsYTE/1rWW9S Z0r7c29roE+eUQP2KyI4jtYPQiUnI+oN5jSs+r9SBf0IUV+Nq0rQno1dfKWHhy3y9XKHlu2ALtbKb iJxGa1vNpT9owA7utH7bnk9VreSMJQiVr3EzSumYg54/hxQlSKX1P+8rLsrkOSCmbl99eY7+qN0bP ep3gW3Zly8mo9PTj7d/aH+REXWukKXz7Ewsax9RCxZzmqT4SLVoNsUtSXX7F/rShGu565+h2IScWP 3OA262mg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQTor-0001IS-6r; Fri, 01 Nov 2019 10:06:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3E240301A79; Fri, 1 Nov 2019 11:05:09 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3DF4B26540348; Fri, 1 Nov 2019 11:06:11 +0100 (CET) Date: Fri, 1 Nov 2019 11:06:11 +0100 From: Peter Zijlstra To: Mike Leach Cc: Leo Yan , Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Borislav Petkov , "H . Peter Anvin" , Ingo Molnar , Jiri Olsa , Mark Rutland , Mathieu Poirier , Will Deacon , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH RFC 1/6] perf/x86: Add perf text poke event Message-ID: <20191101100611.GV4131@hirez.programming.kicks-ass.net> References: <20191025130000.13032-1-adrian.hunter@intel.com> <20191025130000.13032-2-adrian.hunter@intel.com> <20191030104747.GA21153@leoy-ThinkPad-X240s> <20191030124659.GQ4114@hirez.programming.kicks-ass.net> <20191030141950.GB21153@leoy-ThinkPad-X240s> <20191030162325.GT4114@hirez.programming.kicks-ass.net> <20191031073136.GC21153@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Thu, Oct 31, 2019 at 12:29:15PM +0000, Mike Leach wrote: > On Thu, 31 Oct 2019 at 07:31, Leo Yan wrote: > > > Since all instructions (with the possible exception of RET) are > > > unconditional branch instructions: NOP, JMP, CALL. It makes no read > > > difference to the argument below. > > > > > > ( I'm thinking RET might be special in that it reads the return address > > > from the stack and therefore must emit the whole IP into the stream, as > > > we cannot know the stack state ) > > > > To be honest, I don't have knowledge what's the exactly format for 'ret' > > in CoreSight trace; so would like to leave this to Mike. > > > > For ETM trace we do not have to output the entire address into he stream if: > - address compression allows us to emit only the changed ls bit from the > last address. > - the address is identical to one of the last three addresses emitted ( we > just emit a ‘same address encoding’ > - we are using return stack compression and the address is top of the > return stack (we emit nothing and the decoder gets the address from its own > mode, of the return stack) Cute. I don't actually know what PT does, but I figured there had to at least be the option to provide more information.