Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp344628pxb; Wed, 14 Apr 2021 17:20:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD4innaNf7Hk4MMPb8zuF04Z1N+dNY/SgDsjaXfrl2khDx2MnsioOI795Y1UclwjcF14ez X-Received: by 2002:a63:d05:: with SMTP id c5mr904368pgl.76.1618446055328; Wed, 14 Apr 2021 17:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618446055; cv=none; d=google.com; s=arc-20160816; b=amyCENH+MJTS4NIvxhxoyXZ8bOPFhjwcdvbCd4WD8mTLlci8nLrjPY3+AHl8ykgWV1 q8YwEt1QjhDNSpjFG+4MJHyw78gsEQiI1Z02WJ84SQiiGe0HL1fPPrZUS0m5bqqf2e/C K1g6Hq2n3wgLLkEAt/7za7eaCIRsibM30FILx17mERKhDMRzpEU2jioyF/CinO2FL0KO ryWTXg3aEBXdYJUKqPfexrAVkhysSb4p8+dDCyMYndaq56Bz68tYwYswT3/NOormRob1 qLxlYvaqwpGoa6zazzKie3OE+BfIYnpr41OPi0xxqTsF2bAjYHSAHMCWuN2R4Ch8rkxg MuCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ejxy4q3sSahatH8vdDiqoQbOtWYbhYG/2qGRldnU3IU=; b=vVdpiYayhB5SMO5p1WV4tXeTJ/YbXnqMV1sRnZ8sCO6NLJGDFX3m1+uGQSDA6Kj8J3 ytx3gewKcOS/GyikuPPFT/f/YB4MwXBVH/Pg7U97NG6zB/pkAhf9o3je0U69ht6On86t pQOzJYw2r5wy/FEl/F0UghgcwPHKqZ4X0m9kPuabVBZ5LY6AcLUnmLe888n2TwmNI+nF flysr6cnYJd89BHpnB2TOcqEGGTQSn+K+c0zfTBc0pq9O0oERUyawtzVt3FVW8njhQEG myW7v6SgKgNe2sA0Wqqhy13RREiIqKBJgs3tTE/7GhNqhpyf3NAAWu0q41F9FgUjOKPv 2qcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n8p8ZlwF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si1226881pjk.54.2021.04.14.17.20.42; Wed, 14 Apr 2021 17:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n8p8ZlwF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350857AbhDNMYD (ORCPT + 99 others); Wed, 14 Apr 2021 08:24:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:59134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233608AbhDNMX5 (ORCPT ); Wed, 14 Apr 2021 08:23:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A7B8610E8; Wed, 14 Apr 2021 12:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618403016; bh=ejxy4q3sSahatH8vdDiqoQbOtWYbhYG/2qGRldnU3IU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n8p8ZlwF44hh6p65FK2THhz5oiR/3biYiPwclpdQdI5lxd7xDGkx/+r+23aZrv5BC jLO+Q+gdiRASObneUBFUiXr06CwGutUmmXxZUJdrIttdDAvUNonWk094SftUAIpdQI GEUaUNFnHlRwxzun7gLt6QObgoZJXc+hP0bKSLEHR8jFb2knEJPJi2eS96g6PXxNqX WzC/Qzt2xWkv/iSV9L9t1GwJ8KC+WnfFuMBVVf8DC9/+kr1YQ1dagX5FkBd2IklZuM 4x8CQHQCdi57+W5qMCmsztrOIdKSJdCcP3TF7g+nsQiaZ/6mBfCmfcLo5SW6WG5zQ4 3An5fRRiVjlUg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9F9FE40647; Wed, 14 Apr 2021 09:23:33 -0300 (-03) Date: Wed, 14 Apr 2021 09:23:33 -0300 From: Arnaldo Carvalho de Melo To: Yang Jihong Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Yao Jin , gustavoars@kernel.org, mliska@suse.cz, linux-kernel , zhangjinhao2@huawei.com, Namhyung Kim Subject: Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode Message-ID: References: <20210319123527.173883-1-yangjihong1@huawei.com> <33ba152e-b8ef-3057-744a-51cb8c478ff2@huawei.com> <27703989-e510-c964-2af7-ef0a5611f8cf@huawei.com> <555b7a2d-13c8-e840-e62b-cf0ad7d084a9@huawei.com> <12d269ad-80f9-3893-f3c4-d12fcdbfecda@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12d269ad-80f9-3893-f3c4-d12fcdbfecda@huawei.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Apr 12, 2021 at 03:22:29PM +0800, Yang Jihong escreveu: > On 2021/3/31 10:18, Yang Jihong wrote: > > On 2021/3/30 15:26, Namhyung Kim wrote: > > > On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong wrote: > > > > On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote: > > > > > So it seems to be working, what am I missing? Is this strictly non > > > > > group related? > > > > Yes, it is non group related. > > > > This problem occurs only when different events need to be recorded at > > > > the same time, i.e.: > > > > perf record -e branch-misses -e branch-instructions -a sleep 1 > > > > The output results of perf script and perf annotate do not match. > > > > Some events are not output in perf annotate. > > > Yeah I think it's related to sort keys.? The code works with a single > > > hist_entry for each event and symbol.? But the default sort key > > > creates multiple entries for different threads and it causes the > > > confusion. > > Yes, After revome zfree from hists__find_annotations, the output of perf > > annotate is repeated, which is related to sort keys. > > The original problem is that notes->src may correspond to multiple > > sample events. Therefore, we cannot simply zfree notes->src to avoid > > repeated output. > > Arnaldo, is there any problem with this patch? :) > PING :) > Is there any problem with this patch that needs to be modified? I continue having a feeling this is kinda a bandaid, i.e. avoid the problem, and since we have a way to work this when using a group, I fail to see why it couldn't work when not grouping events. But since I have no time to dive into this and Namhyung is ok with it, I'll merge it now. - Arnaldo