From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 EAB7E4302F5; Tue, 21 Jul 2026 19:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662492; cv=none; b=tpeODzK5ldIVhB6V0Gv5wPy8/mP8HtQ0LFT/+zJKyJ5dgmYDsZd8IjrYyZBTb495KrXMaCRrHt02Qd4ljhyTnt2FrgXPGypE7hEQ2uMwWQwv75X0yX99LnksI+WCHsNjmHFN8xjFPt5oSDzgWOYQJu22j6SWLWEDxcFb5uCdj94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662492; c=relaxed/simple; bh=jby9n0bw0wx5gbvIIYV3X4QT5y/Tz6Y9983sRrihpJk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S3bu1CbzCQHnhwwDC1w2hqYO668u40Ls3Uvkm1nOO8lTCZVy8f0+1joXRcjnCvfnGu/2AmVWwL0eauEJqwl53EgHwsI7GTCmDbRjtLrZj4iKOOdBtjX+s5Pt/itCG4FuzdKhfrOsC2z1UHM3WWIcqqVBIWSty1qWGsqKs96C4RA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z6Pp897O; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Z6Pp897O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 625601F000E9; Tue, 21 Jul 2026 19:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662490; bh=fiOzt+iMg8aThbb0eD6FTSbgRo1yTqWM2ExUwCAhQUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Z6Pp897OEN8i0mcJQ05BDKyP+POvPgE0JAUmmod/S5nndKZaHiJnLSoEu1P68H2Xz NZFIVzqTXaRbAKfyRB4v9d3CJLiCKeamPHU8GeoiNRV/0C53a/0cAvm8y631EIFKEX zAbqE2aBtL4njykUTbf5hyQnCgx5o2URNvztfKQU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ian Rogers , Adrian Hunter , David Ahern , Gabriel Marin , Ingo Molnar , James Clark , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 6.12 0422/1276] perf sched: Add missing mmap2 handler in timehist Date: Tue, 21 Jul 2026 17:14:25 +0200 Message-ID: <20260721152455.547459613@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ian Rogers [ Upstream commit 91182741369b261c441e63e6678893032a6d7e4c ] perf_sched__timehist() registers event handlers for options using the sched->tool struct. It registers handlers for MMAP, COMM, EXIT, FORK, etc. but completely omits registering a handler for MMAP2 events. Failing to register both MMAP and MMAP2 handlers causes modern systems (which primarily output MMAP2 records) to silently drop VMA map mappings. This results in uninitialized machine/thread mapping structures, making it impossible to resolve shared library instruction pointers (IPs) to dynamic symbols/DSOs during timehist callchain analysis. Fix this by correctly registering perf_event__process_mmap2 in sched->tool inside perf_sched__timehist(). Fixes: 49394a2a24c78ce0 ("perf sched timehist: Introduce timehist command") Assisted-by: Gemini-CLI:Google Gemini 3 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: David Ahern Cc: Gabriel Marin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-sched.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 64bf3ac237f2ef..fa5f00d47e6277 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -3261,6 +3261,7 @@ static int perf_sched__timehist(struct perf_sched *sched) */ sched->tool.sample = perf_timehist__process_sample; sched->tool.mmap = perf_event__process_mmap; + sched->tool.mmap2 = perf_event__process_mmap2; sched->tool.comm = perf_event__process_comm; sched->tool.exit = perf_event__process_exit; sched->tool.fork = perf_event__process_fork; -- 2.53.0