Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp60222pxf; Tue, 30 Mar 2021 19:20:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMABMvLJrVx3vUx3CRZl9ciwIBhS0L0XY4YgBcdQgz6Aw7mi8BO02DFyHQkdywrH5SW80y X-Received: by 2002:a17:906:c414:: with SMTP id u20mr1070964ejz.215.1617157232410; Tue, 30 Mar 2021 19:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617157232; cv=none; d=google.com; s=arc-20160816; b=dYtc3eq/VNuUsnqmy+xAWDqI5PLz1r8hjqU5YIwl2L+Gi7/3Ab5nSPC1SJ2jJ+0uGi 0IQTOjB89QWW1iW4Pq8TwLy1yjjzHKSciG/j+N5vcpjP42CJUmSymMg+zoqsvhnFm52x T/gUr3dPjyZ7sCOYm94ojgepYiOM7LZ8NZQ5qGekf6C5KYdUUJOe59Z2dubcZirQvWJi g5WQDHDTs8rXi5nzodI+jUR81r2Sh/UwsS82pLfvJnfVIMBmOM2RCQEemLZyjoZ75iCo KvTweAOsR0ixbt6t3VpBFTcM+XNHlb88s1P6sPCpgTca9Qs1+j4LqhdIohhr1JIfrTWS p9QQ== 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:from:references :cc:to:subject; bh=47YZNz9bHe3vrt2Sn7K9xd/EYZkOhLMSiZupcjO1Wy0=; b=GlZSc84jcLBdwNzsIL19aFyNrJQ1b61i/t+PE0IseM/AOdLTpqFYquR9rym/MsffPx qJUs2V1cuos+fj63l+Vrxsl2WNCcGwcOo7Ws8FYSLea6HDWq4Z4e2kES3pPSXE0nClFQ HXXI3adApFp2rB7jF67SryzXSXk1XHNgXMk5obB1TwnB102uK6Wdr4C+RKBZNE6AR6td aEOHMbYQJ8t9LXnEYnQajHXnKUIp7MLDlZv1ZPwaiOwEGoxCP6FLDpfYWPtlRX6/I82a +Kp8OGWimIoofKd/Gld/4TNKla4f2cMM03hM32ZYqBDr2rbiptxsS3gZnY4ytGTS5A9Y heUw== 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 zp26si446483ejb.542.2021.03.30.19.20.09; Tue, 30 Mar 2021 19:20:32 -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 S232684AbhCaCSz (ORCPT + 99 others); Tue, 30 Mar 2021 22:18:55 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14648 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233072AbhCaCSu (ORCPT ); Tue, 30 Mar 2021 22:18:50 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F990V2g8kznV2x; Wed, 31 Mar 2021 10:16:10 +0800 (CST) Received: from [10.67.102.248] (10.67.102.248) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Wed, 31 Mar 2021 10:18:34 +0800 Subject: Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode To: Namhyung Kim CC: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Yao Jin , , , linux-kernel , References: <20210319123527.173883-1-yangjihong1@huawei.com> <33ba152e-b8ef-3057-744a-51cb8c478ff2@huawei.com> <27703989-e510-c964-2af7-ef0a5611f8cf@huawei.com> From: Yang Jihong Message-ID: <555b7a2d-13c8-e840-e62b-cf0ad7d084a9@huawei.com> Date: Wed, 31 Mar 2021 10:18:34 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.248] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > . >