Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2008503pxb; Mon, 12 Apr 2021 11:48:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziMT+udj0mvGvcyH6vOKQOhCtHUzgln45Cn15oPxj5zSPXSLm56QZsoKqHiQjvX2aA4ul4 X-Received: by 2002:a17:907:6289:: with SMTP id nd9mr28229789ejc.384.1618253317800; Mon, 12 Apr 2021 11:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618253317; cv=none; d=google.com; s=arc-20160816; b=eNaBDhmFg7GtL1LltAR+3eFo8hY+w0baI+BSrOVg8R9KEOw4WUrrOXnNLgusdI1tIc ZythF+pZ+ZgCH4z920+X8cer35Gh1NQhjcCIn2IEe3uOzQRurfh10TnWCG5yUX4PB1dB zMljpcoIfk4XlGLB4U6ai9LVjaixCE2+i/9CpG6kXWvqwtOPLWUanUKDz1pWXvm+RJuC tdpWKZr0TjW/KOYUYZUmpyfZliGxn9F5G2dBnKyGAbWVpayKJ8UkGoOMxSzoUCfeiE5b zyKWoCKhAPGDLAt9VeldLsUbbFa877bwtpFDUTkZybiq/YWasj5Q49aS3OSAmhCRBD3u u9/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=AOYYsazWuXHyQiG9JwgckIgZ96dqOPaq1terDs4PuRM=; b=xbxL94KEmwCmNJBnkLArxCgOH9usAEq7CRvInoYmd70VTvJirqQCA2bE9nLu0rszn8 CMmaA9Ed8AmlIQ0gm9Ri8tgmUBF3bh12wXxojrHFZt4InKRR84rHn/yuGS9ChQjaq00S KUDRryrQo+If2PYzaVAk2ABA4AvHp35jWF4wGTREtmK+2+R2axHCw3aRlUjg2oZCOtc0 JLeyw5iEMMACI2tJ8b7/Wr94x+ypPmSfFadJX/OGtq3frg7/ZJAhHPxWykusbeILikgN B/Bc4uL7iZAfRcxDj/DXNpFy30CHJSvmHAIefkw6bpLlDHagDGiFxVJBnN0gFbwgcKqf Ausw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs2si8333604ejc.566.2021.04.12.11.48.15; Mon, 12 Apr 2021 11:48:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbhDLHW7 (ORCPT + 99 others); Mon, 12 Apr 2021 03:22:59 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:16444 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbhDLHW6 (ORCPT ); Mon, 12 Apr 2021 03:22:58 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FJgB02XXjzqTCZ; Mon, 12 Apr 2021 15:20:24 +0800 (CST) Received: from [10.67.102.248] (10.67.102.248) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Mon, 12 Apr 2021 15:22:29 +0800 Subject: Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode From: Yang Jihong To: Arnaldo Carvalho de Melo CC: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Yao Jin , , , linux-kernel , , Namhyung Kim 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> Message-ID: <12d269ad-80f9-3893-f3c4-d12fcdbfecda@huawei.com> Date: Mon, 12 Apr 2021 15:22:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <555b7a2d-13c8-e840-e62b-cf0ad7d084a9@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.102.248] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Arnaldo, On 2021/3/31 10:18, Yang Jihong wrote: > Hello, Namhyung  and Arnaldo, > > On 2021/3/30 15:26, Namhyung Kim wrote: >> Hi Yang and Arnaldo, >> >> 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? :) > > Thanks, > Yang >> Thanks, >> Namhyung >> . >> PING :) Is there any problem with this patch that needs to be modified? Thanks, Yang