Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp745450lqd; Wed, 24 Apr 2024 16:08:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkshfvo+yye21NzdwqaBsBg4uSmXybIuhPxt/dSMWb1oIaPYkIXkW4LK6gKUPIhok05npPhbA9nBhrwgrrjcq5EaSJTypiMN6kwfQZcA== X-Google-Smtp-Source: AGHT+IHHK/jIInNuq8Gekv/55xfKGDGorl1z8eY9lKUzDfS5x5CrXNFD3/f4qxIS7tWLXkNLB2G+ X-Received: by 2002:a17:902:db04:b0:1e5:9da5:a799 with SMTP id m4-20020a170902db0400b001e59da5a799mr5318767plx.6.1714000095772; Wed, 24 Apr 2024 16:08:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714000095; cv=pass; d=google.com; s=arc-20160816; b=KOODOrxJlTDPZELDxwclbcCyiXcT4zBKoTM/QCNmSfOou05jbVBY8xELkPiCSs+wDE 5gsipEv/3XkVmMien7avTizQ2yBmZojhPxNdYcv6MDe2F02SvBE5GRUZf3Q1+Rg4S1Ia K7gq5xqHly8oWyLi0PIz1v6LhK4wDzZ5KA3SoRlOrkpYxEa+t9cxPiekpRJorph8mFFg 8+lN/v30v0PFjAOc00pfajvyHUKfQI1+RffEP6oma/bWWFYTo6eYi36fmAufRLadBf/U mIv9iL2cSe3vUUgPldZ05ny1FxWX5pkwprydJkNAa5dXfFxy9b1W/Qxd4bDMp7UkAH2L L5gQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vjfSiTQIM3J+s00g+vx5q4gIaVnpZDL7yc6cYi1g6h0=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=cQlVgmgXw0MS361z1axJQflINdnQToiNejs8v3zpT/j+otTACep/+ZeXRQR+2VyHap ZIRryfabjLpyS2wJmJ1wB6bm4JcspRkT8dsgs1eLK6r/8idcrKmeYnzDUj/bmpSQgka3 v9MUx48/snLIlr+VFC1wVZIJ6lAHk3eaaCiAP2Ghlo2lYHO+atVGBqDrsvUuyADdfBS8 ZWRAzPEbjoyFjTLO3XgrAoAAQjatuh9Gx8CtlOMqv8dZMBZ+0KKDyF56GEdQs0dmGDnE 2HFUPpHQRwjuigrG9wDA6xYyUvnNqjbQ7roHGGqW+LmVOT3+/v8XqzbfK8cyxIlYlbzj sphg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q0IXeXrR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mf15-20020a170902fc8f00b001e27011a183si12059762plb.22.2024.04.24.16.08.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:08:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q0IXeXrR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157819-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B4700B269D8 for ; Wed, 24 Apr 2024 23:00:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD94116EC1B; Wed, 24 Apr 2024 23:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q0IXeXrR" 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 CE52F16EBEF; Wed, 24 Apr 2024 23:00:16 +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=1713999616; cv=none; b=p5VJTRQ7lAJjNcaNGH7k+Y1BoI/7P0mRS634gHIXKCDdnPa6tctssQqHbprm/PmQsk81+XdK6Wb0OELJP6XJK74dDIgw2okOm/7GZgpViAAkGJW9Cin2VZwIr43cI6yotbbXp/EHHzyxRSPMMln2CAg3xG8o4KrZf6nXwet5yYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713999616; c=relaxed/simple; bh=9CcOa0hUVvEuNYn5qr9p8DH151WKe0SGbjU1e0KFA7k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tf5KACBGGdFuDe/vhibB/vc1SBxM40SwVPee38wotwKqFaebMZi7vDKNBZ9vLq7QaR4AIKcFwBIDYjKMsjwBvBzTaQNqa1bKAjxqZLFslMIAtv/slvtnURBvbVfJ0mK3FEpKLAZ8U4babaOlTBvk+jLopM0sJP25zdGILsznJEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q0IXeXrR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FC5DC113CE; Wed, 24 Apr 2024 23:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713999616; bh=9CcOa0hUVvEuNYn5qr9p8DH151WKe0SGbjU1e0KFA7k=; h=From:To:Cc:Subject:Date:From; b=Q0IXeXrRsJ11NTSZXEY0JT6G3/yX0cVA4nHl7OVl21biOq0jrRNhvdrkiV4QLXUU0 fg+t89/HgchVzlgqTlD9l7bofRzSsxavD8d683xc4M1jMoUZRsttMwX0w/i2FNxkoU AEPhf3j1ZrcrnBQGlBo/7cUgnyOAFg00OVEXjLTahNfzjX7KBfT+bWbaDMiV9csKme HOQQjM7KNm4DJ3nFHz27txczNCOagCiF2K1wPJh2KuiU0bdEVgbBezfbw1y16oPPEO yAWqe0aipXH6GyDKUVnktGhHuOxJAp86uNYh6rVYczcDjX4VhUece2LSXMrXZ1WpyR 7CmruK6rlzZLA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH] perf annotate-data: Check annotation on perf report TUI Date: Wed, 24 Apr 2024 16:00:15 -0700 Message-ID: <20240424230015.1054013-1-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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