From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44201C433E2 for ; Wed, 2 Sep 2020 00:41:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15A18206F0 for ; Wed, 2 Sep 2020 00:41:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Yw4ohLT/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IFpAa/jT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15A18206F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SvSZIZKC1Y5+sULKiHZXqcga5hossmsh/gAGqRaH6wY=; b=Yw4ohLT/kPACX+689X4r8jsmJ KcqG2iH4vOuz7pxxqbGQ0QKQGib80IGWL+cXUkweQl0ZWUH9PTmuWVu8n+f2CoveYJS0zCoBLpJJa NIgh7XYTSMMiKnuTcaNOTvzhO7JsTNjKtSO4DhEOYtWqf2V6+pBCkaXEd8gMJsm4thMyvNUxjnexr Edt/1/Fj71X/tLqVGtE5AogyOG5iGw31gRU3rrh9dpu4FZzaz12kax4o4ziZf36ver6xzRrlFvtId y3DL4eMB75nKG7+lqdH85WwgDzhq+sesIfhPsJiY4hxojBUGfWNvN16oklWxGOEP/EUmbdZYson9N I/wdhrOzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDGoT-0003jF-QN; Wed, 02 Sep 2020 00:39:45 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDGoQ-0003i9-6Y for linux-arm-kernel@lists.infradead.org; Wed, 02 Sep 2020 00:39:44 +0000 Received: by mail-pj1-x1043.google.com with SMTP id nv17so1497259pjb.3 for ; Tue, 01 Sep 2020 17:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pvo2hDERJm2bQNlrbf+q0i6wSaskSnGigKJyQ9/nW18=; b=IFpAa/jTsltPFXE3lJ7gMvh8+DRJ9x+nMJ89IE7kxfU7RMvZWaWPmCOy5GkOJ0CB+H Fd3tl94k9Gv1RaUW1coPebBxAc2Q4jKeLIiWEsCbCrzRPkNwDlB7JfVMoGKL+npNe6dL NZrxsENzsPk2hghqjy/wq5MfyY3gdO8t/NuB3K8GNS0oMCw9bk+oSFct/gtNiQdyZ3HD DaNNO6FNo5j9+rdoviKTDvPmjH1z5oQmYJEGMNFAn04tWTLY/iPBqYiUZ7fiar4B1GkE l0FkQfmorhmsYIA7lgBJUMeWxJsr2LHNpSUfndyYdDbd/ZbBG40xa6AKBs4y2RJnmWTf KKkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pvo2hDERJm2bQNlrbf+q0i6wSaskSnGigKJyQ9/nW18=; b=X1z9UIIwqdg4QgpRVczNXulGYO8Yaa6aJO33edR2UKveDxz94QmwDAFXrHCrzxy5E6 Ll5QXfxmd6fdACal6lgnZ74RVJyb46/HfXuQRiEbp8AKxMwHxf1uLcfuFSV33ySDGnO4 dTNox/bcvj3jfyhTNCcjwXk9HV5LnKH7O3RiOy0OFqR6m9T8AKU8j19E35G2YDEn94os 1TU5S1ATFDl7Rbyruhpsd6w+dVS0pw+qNfLNHCuYP3+dBsCfX3YIlDjglotrMpyDjGsq FpYniM21KJFbi3WZApLdlgEmsXU1wu7wFcoDVLoziyNE77BbRSVAUWraI74QMX5Y5321 Q5Xw== X-Gm-Message-State: AOAM530tvmthPSwMV+Ecy+WF885cWlSIrEZhUyuVwcqpXVpVLfsC+cpF u8Bg7KsjiJDANmL45HFHfx3hmg== X-Google-Smtp-Source: ABdhPJy6lNI/VOjCx8plTEkrJkl7CPonK8ZvM4q8NnecOOaHoGHFCfD/UWLD6RmkRzW/JBrD9ihiCw== X-Received: by 2002:a17:902:aa89:: with SMTP id d9mr3845116plr.192.1599007180052; Tue, 01 Sep 2020 17:39:40 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id r199sm3411874pfc.98.2020.09.01.17.39.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Sep 2020 17:39:39 -0700 (PDT) Date: Wed, 2 Sep 2020 08:39:32 +0800 From: Leo Yan To: Arnaldo Carvalho de Melo Subject: Re: [PATCH 1/2] perf cs-etm: Fix corrupt data after perf inject from Message-ID: <20200902003931.GA3306@leoy-ThinkPad-X240s> References: <20200819084751.17686-1-leo.yan@linaro.org> <20200827205354.GE22307@xps15> <20200831000432.GA4715@leoy-ThinkPad-X240s> <20200901145432.GB1422817@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200901145432.GB1422817@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_203942_867472_87A8A718 X-CRM114-Status: GOOD ( 35.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andi Kleen , Al Grant , Mathieu Poirier , Suzuki K Poulose , Peter Zijlstra , Adrian Hunter , linux-kernel@vger.kernel.org, Alexander Shishkin , Ingo Molnar , Namhyung Kim , Kan Liang , Jiri Olsa , linux-arm-kernel@lists.infradead.org, Mike Leach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Arnaldo, On Tue, Sep 01, 2020 at 11:54:32AM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Aug 31, 2020 at 08:04:32AM +0800, Leo Yan escreveu: > > Hi Mathieu, > > > > On Thu, Aug 27, 2020 at 02:53:54PM -0600, Mathieu Poirier wrote: > > > Hi Leo and Al, > > > > > > On Wed, Aug 19, 2020 at 04:47:50PM +0800, Leo Yan wrote: > > > > From: Al Grant > > > > > > > > Commit 42bbabed09ce ("perf tools: Add hw_idx in struct branch_stack") > > > > changed the format of branch stacks in perf samples. When samples use > > > > this new format, a flag must be set in the corresponding event. > > > > Synthesized branch stacks generated from CoreSight ETM trace were using > > > > the new format, but not setting the event attribute, leading to > > > > consumers seeing corrupt data. This patch fixes the issue by setting the > > > > event attribute to indicate use of the new format. > > > > > > > > Fixes: 42bbabed09ce ("perf tools: Add hw_idx in struct branch_stack") > > > > Signed-off-by: Al Grant > > > > Reviewed-by: Andrea Brunato > > > > Signed-off-by: Leo Yan > > > > --- > > > > tools/perf/util/cs-etm.c | 9 ++++++++- > > > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > > > > index c283223fb31f..a2a369e2fbb6 100644 > > > > --- a/tools/perf/util/cs-etm.c > > > > +++ b/tools/perf/util/cs-etm.c > > > > @@ -1344,8 +1344,15 @@ static int cs_etm__synth_events(struct cs_etm_auxtrace *etm, > > > > attr.sample_type &= ~(u64)PERF_SAMPLE_ADDR; > > > > } > > > > > > > > - if (etm->synth_opts.last_branch) > > > > + if (etm->synth_opts.last_branch) { > > > > attr.sample_type |= PERF_SAMPLE_BRANCH_STACK; > > > > + /* > > > > + * We don't use the hardware index, but the sample generation > > > > + * code uses the new format branch_stack with this field, > > > > + * so the event attributes must indicate that it's present. > > > > + */ > > > > + attr.branch_sample_type |= PERF_SAMPLE_BRANCH_HW_INDEX; > > > > + } > > > > > > I've see this patch before... I thought it had been merged - what happened? > > > > This patch before has been sent by Al to CoreSight mailing list but has > > not sent to LKML, this is why I resent it to LKML in case it's missed. > > So, was it Acked on the CoreSight mailing list? Are we missing any > Acked-by or Reviewed-by for this 1/2 patch as we got for 2/2? The CoreSight mailing list has some discussion for this patch set, when respin this patch set, I confirmed we don't miss any 'Acked' or 'Reviewed' tags. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel