From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kairui Song <kasong@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Dave Young <dyoung@redhat.com>
Subject: Re: [RFC PATCH v2] perf/x86: make perf callchain work without CONFIG_FRAME_POINTER
Date: Wed, 17 Apr 2019 09:07:35 +0200 [thread overview]
Message-ID: <20190417070735.GW4038@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190416201559.d267liiwpjvo3wet@treble>
On Tue, Apr 16, 2019 at 03:15:59PM -0500, Josh Poimboeuf wrote:
> If you do the regs->eflags thing to mark the regs as fake in
> (perf_arch_fetch_caller_regs()), then I don't think skip_sp would be
> needed, because regs->sp could probably mark the skip point.
>
> Instead I was actually hoping we could get rid of fake regs and
> perf_arch_fetch_caller_regs() altogether, because it's a nasty hack.
> But I don't know what else those fake regs are used for.
This is the generic perf generate a sample path. It doesn't know the
context. Normally it is an interrupt or exception of sorts and we simply
pass the pt_regs from that down the chain and all is good.
It is just for a few software events, such as SW_CONTEXT_SWITCH,
SW_MIGRATIONS and all the TP muck that we do not have regs to pass down.
These regs are used by:
- SAMPLE_IP,
- SAMPLE_CALLCHAIN (this here issue),
- SAMPLE_REGS_INTR,
- a few misc bits
There's actually comment on top of perf_fetch_caller_regs() that tries
to explain what is needed -- although I suppose that could do with an
update.
next prev parent reply other threads:[~2019-04-17 7:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 16:59 [RFC PATCH v2] perf/x86: make perf callchain work without CONFIG_FRAME_POINTER Kairui Song
2019-04-15 12:38 ` Jiri Olsa
2019-04-15 15:36 ` Peter Zijlstra
2019-04-15 16:58 ` Josh Poimboeuf
2019-04-16 11:30 ` Kairui Song
2019-04-16 16:16 ` Alexei Starovoitov
2019-04-16 17:39 ` Kairui Song
2019-04-16 17:45 ` Peter Zijlstra
2019-04-17 14:41 ` Kairui Song
2019-04-16 20:15 ` Josh Poimboeuf
2019-04-17 7:07 ` Peter Zijlstra [this message]
2019-04-18 2:15 ` Josh Poimboeuf
2019-04-17 14:44 ` Kairui Song
2019-04-18 7:54 ` Peter Zijlstra
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=20190417070735.GW4038@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=jolsa@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=kasong@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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