From mboxrd@z Thu Jan 1 00:00:00 1970 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 8EC5E1C9B6C; Mon, 10 Mar 2025 17:47:32 +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=1741628852; cv=none; b=aqT706Uf1SQjyzMQTbU9XzHD2JdvNjB2dGpiu0zk8UNoj09QOKC2K48Q+NfenqXWeglQElxdkcoCvHMgu0X+LLL5Hu8AHbeM18Fj9ac84Teb9fVHePnz4IlOvjdmXOpsecW5Owo8o5soPOKrVMnXZ1hpmwDs6NDM5+cr4H6f0Gc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741628852; c=relaxed/simple; bh=chPwBWSxk73hQ8SrkYI4OCc5D2GN7OHVLk824Wc4qSg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uztU1PHSCP/omsKJRvjk8jE0nB4VHx9B01fIR66lp6D1YR8hZlm9hV278IfP85gCbJMPZlqOhr+tD8EY9ZaJQxVLVfDWp7giTz20SUCQ2kIZ43N0PC5lh1VW/4Ch2GW3uoB7vKbjB6JRDEUs2n8Tv59nw4+c6WYYnl+B5d2EMdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QewF36nX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QewF36nX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13F94C4CEE5; Mon, 10 Mar 2025 17:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741628852; bh=chPwBWSxk73hQ8SrkYI4OCc5D2GN7OHVLk824Wc4qSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QewF36nXbk3Gzu6dLtIlJWbEXMxoq5ZdGcxyK16QVP2Ivx4r4jnEIrjvxWhk9QlFH wM1RRpMZOoqOA2sxWU5T8/sHED7pfoh/zJKjvpaAk2j/fs8qKnb1CIVCIu0xhwF7Kz 9aCTQ6nBOYR80ndP4++nVot/LFMX8CJ4chBoHqNs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Namhyung Kim , Adrian Hunter , Ian Rogers , Christophe Leroy , James Clark , Jiri Olsa , Kan Liang , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.15 092/620] perf top: Dont complain about lack of vmlinux when not resolving some kernel samples Date: Mon, 10 Mar 2025 17:58:58 +0100 Message-ID: <20250310170549.214353129@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310170545.553361750@linuxfoundation.org> References: <20250310170545.553361750@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo [ Upstream commit 058b38ccd2af9e5c95590b018e8425fa148d7aca ] Recently we got a case where a kernel sample wasn't being resolved due to a bug that was not setting the end address on kernel functions implemented in assembly (see Link: tag), and then those were not being found by machine__resolve() -> map__find_symbol(). So we ended up with: # perf top --stdio PerfTop: 0 irqs/s kernel: 0% exact: 0% lost: 0/0 drop: 0/0 [cycles/P] ----------------------------------------------------------------------- Warning: A vmlinux file was not found. Kernel samples will not be resolved. ^Z [1]+ Stopped perf top --stdio # But then resolving all other kernel symbols. So just fixup the logic to only print that warning when there are no symbols in the kernel map. Fixes: d88205db9caa0e9d ("perf dso: Add dso__has_symbols() method") Reviewed-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Christophe Leroy Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Link: https://lore.kernel.org/lkml/Z3buKhcCsZi3_aGb@x1 Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 6fdd401ec9c56..b318ce937e629 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -807,7 +807,7 @@ static void perf_event__process_sample(struct perf_tool *tool, * invalid --vmlinux ;-) */ if (!machine->kptr_restrict_warned && !top->vmlinux_warned && - __map__is_kernel(al.map) && map__has_symbols(al.map)) { + __map__is_kernel(al.map) && !map__has_symbols(al.map)) { if (symbol_conf.vmlinux_name) { char serr[256]; dso__strerror_load(al.map->dso, serr, sizeof(serr)); -- 2.39.5