From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E538637BE7F for ; Fri, 8 May 2026 08:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778228858; cv=none; b=iKcLa0myje0U97uvt0Db+z+EkZDLrOHok02DN07lHpvkKt8Jmzggx7OrozCtD+6xOjjk/eK9Is9HOciAhNuM9+3FYS2yWYf6XZZVzlWFFX3FiPrdUswJer0mCkCkpA0Fmexim6TsmhhGszBCRjw8ya2lvisfzgPl5U5MnxrlWBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778228858; c=relaxed/simple; bh=CylnfDQq2sYXt33B4obV12HlAnESF/qI9YpYRVRk2HM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KW/9b0RG99wTkcyiZT89O1+S/mmgbAIZPth6PP1vgwyaRvm2fRm55LHvDWLTdhdJAWDjcw2BAZoDsCSvU0kBTtH5/vdQnsp4XgOTyBWshcx4aT4nN2zrMVJpi7k8rc24JiYk1pBNZusAXXaANuCLXJwko6pt9l5CPRLOt5W6Abc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=SlJ6B3rZ; arc=none smtp.client-ip=74.125.82.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SlJ6B3rZ" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-131371497a1so2366061c88.0 for ; Fri, 08 May 2026 01:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778228854; x=1778833654; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=53zBMY0hxmigdLuQch54NlIbiL3paA9gL4y5SjWANoI=; b=SlJ6B3rZb/sXHtGH0gUeuxM/RVxNBstd9UmI3ed6jwQkfzQfoDkF95AgYx/+4JDpMn ZVLSVFL/0VfAVa0exerL/WdZ6Ro2IgnNLLLeLtMz2cyXuj6zRwOqs/ghmCuq7nLo71jO HTw30ceB4HTuhDmIuo2F0SMMVHFJbg+WdJ4oVcvXcgwhfsTGdoVUnv4Iw+dBTN5D3p4M E4b3YBzamyH5l1EUWYaDmuQ6fr04WnFwD7Q4B9nB+C+1dHGOZFGXOFZyCJWWE0oX4ojh yfJRTjItRvDFA9mTzVLFVLq5sDXq2cMwkit3CQPpeVjX44HY4OcP8Jv6gg/emc2Pjmxh An/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778228854; x=1778833654; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=53zBMY0hxmigdLuQch54NlIbiL3paA9gL4y5SjWANoI=; b=DF+wIXHmhcE3cr/BeCIQXmjMXsI0iTxcE+kJpfyX+iRpLaemkn7khSdVTZuuOAkZ5+ MrGCanxZ3OYDy1QBlC4ZcNuSNU77GjXS1Aeqg+AQaWUCuxBxCHwmiS/Q0EgG0cD23IeB jHq0LqvwC11wbz6Ym9wuq4J9o6El4i03RMn+y9PIW6Qysm/agxi0J27tg4kL53w55SQt dQFzpX/w42QMz/HPy9Q0nXmiG9CiCf7I9tA9nPfTbULIDqdMWM6+KVKaF+xPTWM/S19y +2JqyjGkI0l1Db2S4jfB7/CivvEx2MkZdZ2iVROwF4b2CHoXxMzHzejmIK1JOzqAYGeL 6EVg== X-Forwarded-Encrypted: i=1; AFNElJ/WAboFhl+URUp7pZldt0AlO9yuWbcGnwyYm/0GCv2i538ImTRqg/bOnnBNB5KIRDlkngpF9wKWKFVJUIw=@vger.kernel.org X-Gm-Message-State: AOJu0YxdFbLatdLnn/YwfQ9rYa+OsTrYmGVDPUJtBFlpyXWjy0Pcz6BQ q2VuPqka77+Wt05wTGTFMsY+ZeDHxGAVEapr8uM+9OHjkFteoWU8wIw91euVjjtDy16e/jXFh05 SknxREqKi7g== X-Received: from dlbuy21.prod.google.com ([2002:a05:7022:1e15:b0:12d:e9ff:7062]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:924:b0:12a:713b:8958 with SMTP id a92af1059eb24-13271271429mr850207c88.10.1778228853609; Fri, 08 May 2026 01:27:33 -0700 (PDT) Date: Fri, 8 May 2026 01:27:21 -0700 In-Reply-To: <20260508082726.2795191-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260506004546.3140141-1-irogers@google.com> <20260508082726.2795191-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.563.g4f69b47b94-goog Message-ID: <20260508082726.2795191-2-irogers@google.com> Subject: [PATCH v6 1/6] perf sched: Add missing mmap2 handler in timehist From: Ian Rogers To: irogers@google.com, acme@kernel.org, gmx@google.com, james.clark@linaro.org, namhyung@kernel.org Cc: adrian.hunter@intel.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org Content-Type: text/plain; charset="UTF-8" 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(). Assisted-by: Gemini-CLI:Google Gemini 3 Fixes: 49394a2a24c78ce0 ("perf sched timehist: Introduce timehist command") Signed-off-by: Ian Rogers --- 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 555247568e7a..241c2f808f7b 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -3299,6 +3299,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.54.0.563.g4f69b47b94-goog