linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Indu Bhagat <indu.bhagat@oracle.com>,
	Jens Remus <jremus@linux.ibm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v3 3/5] perf record: Enable defer_callchain for user callchains
Date: Fri, 14 Nov 2025 13:30:09 -0500	[thread overview]
Message-ID: <20251114133009.7dd97625@gandalf.local.home> (raw)
In-Reply-To: <CAP-5=fU33sEARn0tc1hSMahBVCvs0cy+Cu-J6+BG0Cm-nuwKnA@mail.gmail.com>

On Fri, 14 Nov 2025 10:09:26 -0800
Ian Rogers <irogers@google.com> wrote:

> Just to be clear. I don't think the behavior of using frame pointers
> should change. Deferral has downsides, for example:
> 
>   $ perf record -g -a sleep 1

The biggest advantage of the deferred callstack is that there's much less
duplication of data in the ring buffer. Especially when you have deep
stacks and long system calls.

Now, if we have frame pointers enabled, we could possibly add a feature to
the deferred unwinder where it could try to do the deferred immediately and
if it faults it then waits until going back to user space. This means that
the frame pointer version should work (unless the user space stack was
swapped out).

> 
> Without deferral kernel stack traces will contain both kernel and user
> traces. With deferral the user stack trace is only generated when the
> system call returns and so there is a chance for kernel stack traces
> to be missing their user part. An obvious behavioral change. I think
> for what you are doing here we can have an option something like:
> 
>   $ perf record --call-graph fp-deferred -a sleep 1

I would be OK with this but I would prefer a much shorter name. Adding 20
characters to the command line will likely keep people from using it.

-- Steve

  parent reply	other threads:[~2025-11-14 18:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14  7:00 [PATCHSET v3 0/5] perf tools: Add deferred callchain support Namhyung Kim
2025-11-14  7:00 ` [PATCH v3 1/5] tools headers UAPI: Sync linux/perf_event.h for deferred callchains Namhyung Kim
2025-11-14  7:00 ` [PATCH v3 2/5] perf tools: Minimal DEFERRED_CALLCHAIN support Namhyung Kim
2025-11-14 17:52   ` Ian Rogers
2025-11-14 19:07     ` Namhyung Kim
2025-11-14  7:00 ` [PATCH v3 3/5] perf record: Enable defer_callchain for user callchains Namhyung Kim
2025-11-14 17:59   ` Ian Rogers
2025-11-14 18:09     ` Ian Rogers
2025-11-14 18:12       ` Ian Rogers
2025-11-14 19:15         ` Namhyung Kim
2025-11-14 18:30       ` Steven Rostedt [this message]
2025-11-14 18:49         ` Ian Rogers
2025-11-14 19:20         ` Namhyung Kim
2025-11-14  7:00 ` [PATCH v3 4/5] perf script: Display PERF_RECORD_CALLCHAIN_DEFERRED Namhyung Kim
2025-11-14 18:18   ` Ian Rogers
2025-11-14  7:00 ` [PATCH v3 5/5] perf tools: Merge deferred user callchains Namhyung Kim
2025-11-14 18:36   ` Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251114133009.7dd97625@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=indu.bhagat@oracle.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=jremus@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).