Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1135564lqd; Thu, 25 Apr 2024 07:04:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUc80/vouPeFzR+qJryasg/N+6+p3dHctgFTaCDpv2dYrAbIzu6hgh8jxkLodLaIvszuU19K+nyesVDQKTDenspQYkt+xfRG8K56IzQA== X-Google-Smtp-Source: AGHT+IFDcmZ7Ux5meDnBmVQBYC0X0Hysnf+O3TGSRcLC7g7fARES5/DBKIhWVUz8uj4iKcjgcH0I X-Received: by 2002:a17:902:b702:b0:1e0:a1f4:95f with SMTP id d2-20020a170902b70200b001e0a1f4095fmr6368795pls.14.1714053839681; Thu, 25 Apr 2024 07:03:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714053839; cv=pass; d=google.com; s=arc-20160816; b=tX8M8xYMcqEa7h4c1Z8yPanoxm6A5nTO60dVrTAKnsbSbpEDcaB12+KAhP+xsuO7iT vWN9YxUh4r8jRJobX/3N36VkbLNkNNihBfSuDJy0F2BLkINNoJrG1HHMY8oka/RRvQd6 TifY0vJB/K6wDdHOxxXjKGg0A8HQ4fGOM/arKvc1orrutzWtFYUTQjQDsKTBEzZi/Hp0 x+WfiOPzl/hYs73sNIUJ/OeQxJPRei0apnH94WyfoBxz3Mws2YXL2TFy4kwbkj/MpY1d m+Z85U+UVBnXSLqE9C35t5b/nyi6W/l8ccXtPIJ7KjCyHJlo0lxylyVtMsOMW5WfeJjG gnsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dxpg+DS1HNHXzEjJPJRh2BNWCdeCUiDyWbHyJetIS4k=; fh=49GrrO/H3LiGmymuFnNd59pBYHHWBS2xk/6Ejg0rn8E=; b=aeTA9hCv/5TALwUrasnAtBF+c7Mks5HEQsqY82F3/TBR2rGKiB9OUXMB7CRCfQqFq2 IEFoaEpp7boY/osjFwrVdCRIcMqNOcHWzjr/X67msOi/OiA++aXduwXeCFI5tikydu6X rH1r2yxmKqUlPEgtw4NmD5X3pLpfn1tbNnAQY4171Ga/I74hmsEpz7aM6leNan+ADn2n rPR6UUhhu0k/3ZnV05ioNEHHSq+b1l++qIbVHmuRQVc8TJVcgTuMGyV8JVA7mA1NlWW2 m3qp+81GYSyYQ6ooyTvWCRVZHWFPD1D51NcSeafkX5rMocxPhtz3L54jr2xiPFAbY93o sRfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="bAHC/YKX"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158627-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r17-20020a170903411100b001e454d1a5aasi12704689pld.403.2024.04.25.07.03.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 07:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158627-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="bAHC/YKX"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158627-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2F5AA288A41 for ; Thu, 25 Apr 2024 13:55:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0BA0149DEA; Thu, 25 Apr 2024 13:55:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bAHC/YKX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C59D5149C73; Thu, 25 Apr 2024 13:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714053326; cv=none; b=tp+xp4ShrOgCoQpwiwmSNcxWbUL/33IhjMSRJmGKLf0bW+Ke4TrQhUOijWq85rMqfz0cAO+PbEB/E6Jm+vNlTBAoAA0qqKgxLCS5elG3782378oVY05qW3CVy7K6xaOTZFfF85s5Bz+uEtu/BELjOQWBC34e4d9OG4ZRSAfONHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714053326; c=relaxed/simple; bh=ROcqMnqV+nJjqsheF2ChPdHkQI544tNby/JjgpSEVnI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NixoBE66+d9T1YZX6qq8RcgnRp/MLJkym1SoKE+mkj4/cVzpk+5rZUxk6CeW3+yrZQbqqaepFIbUt6AZMTCQ9ez5FYSrug/nBZ2L7ha6cgBMehWxRNZ1IkwUUN/IJ7kFILL1KZuR6rtKgqeFTuHmc63UbqD6D0scgqI9cN2YNdY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bAHC/YKX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9259C113CC; Thu, 25 Apr 2024 13:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714053326; bh=ROcqMnqV+nJjqsheF2ChPdHkQI544tNby/JjgpSEVnI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bAHC/YKXdszQWpk+AGicRh+U1+NA/JtcnXwFQYxP1li1wiNiU4fxtEP2aFyz7zqSY 0DHATOxyPvNBk+a3ZYsXFL3dSDGGWxdYKuQuB+SX051vZEfu7q8x2yZxK1/hOKiaTW 0DdemU0F4vtjgr4+f42XWspN7B4k+vPKHSYbGnBouUeG1ylqYgsg4P/UZB5AKblgiV ViUdqlw6wLxKBnO9U/w8HAJq9lPWy9M/9k9xn9ff5IP8T7FJTr9vhhA+lO+poGc8DU ZHvURwcC/yGPyE0yzCWUfoJUUsVtIJUoDg0vdBjmkhb0AkhmBbJ2NVC2IR/Ufdg6rN rQDFhWRKG4YwQ== Date: Thu, 25 Apr 2024 10:55:21 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf annotate-data: Check annotation on perf report TUI Message-ID: References: <20240424230015.1054013-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240424230015.1054013-1-namhyung@kernel.org> On Wed, Apr 24, 2024 at 04:00:15PM -0700, Namhyung Kim wrote: > As it removed the sample accounting for code when no symbol sort key is > given for perf report TUI, it might not allocate the annotated_source > yet. Let's check if it's NULL first. > > Fixes: 6cdd977ec24e1 ("perf report: Do not collect sample histogram unnecessarily") > Signed-off-by: Namhyung Kim Reviewed-by: Arnaldo Carvalho de Melo Picking it up into perf-tools-next: ⬢[acme@toolbox perf-tools-next]$ git log torvalds/master.. perf-tools-next | grep 6cdd977ec24e1 commit 6cdd977ec24e1538b35a08bde823a74b69e829f2 ⬢[acme@toolbox perf-tools-next]$ - Arnaldo > --- > tools/perf/util/annotate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c > index dca2c08ab8c5..f5b6b5e5e757 100644 > --- a/tools/perf/util/annotate.c > +++ b/tools/perf/util/annotate.c > @@ -906,7 +906,7 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel, > if (parch) > *parch = arch; > > - if (!list_empty(¬es->src->source)) > + if (notes->src && !list_empty(¬es->src->source)) > return 0; > > args.arch = arch; > -- > 2.44.0.769.g3c40516874-goog