From: Jiri Olsa <jolsa@redhat.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Maynard Johnson <mpjohn@us.ibm.com>,
Ulrich.Weigand@de.ibm.com, Anton Blanchard <anton@au1.ibm.com>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
michael@ellerman.id.au
Subject: Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug
Date: Thu, 22 May 2014 12:04:04 +0200 [thread overview]
Message-ID: <20140522100404.GB4789@krava.brq.redhat.com> (raw)
In-Reply-To: <20140521012644.GA2890@us.ibm.com>
On Tue, May 20, 2014 at 06:26:44PM -0700, Sukadev Bhattiprolu wrote:
SNIP
> + * TODO:
> + * Rather than returning an index into the callchain and have the
> + * caller skip that entry, we could modify the callchain in-place
> + * by putting a PERF_CONTEXT_IGNORE marker in the affected entry.
> + *
> + * But @chain points to read-only mmap, so the caller needs to
> + * duplicate the callchain to modify in-place - something like:
> + *
> + * new_callchain = arch_duplicate_callchain();
> + * arch_adjust_callchain(new_callchain);
> + * ...
> + * arch_free_callchain(new_callchain);
> + *
> + * Since we only expect to adjust <= 1 entry for now, just return
> + * the index.
> + */
> +int arch_adjust_callchain(struct machine *machine, struct thread *thread,
> + struct ip_callchain *chain)
> +{
so in case we dont do the real adjusting of the callchain (see the other email)
and just returning the index, I think we should rename this accordingly,
so it's not confusing.. arch_callchain_skip_idx ? ;-)
SNIP
> --- a/tools/perf/util/callchain.h
> +++ b/tools/perf/util/callchain.h
> @@ -165,4 +165,16 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp
>
> extern const char record_callchain_help[];
> int parse_callchain_report_opt(const char *arg);
> +
> +#ifdef HAVE_ADJUST_CALLCHAIN
> +extern int arch_adjust_callchain(struct machine *machine,
> + struct thread *thread, struct ip_callchain *chain);
> +#else
> +static inline int arch_adjust_callchain(struct machine *machine,
> + struct thread *thread, struct ip_callchain *chain)
this needs 'maybe_unused' attribute at each parameter, otherwise
it won't compile for arch != ppc
thanks,
jirka
prev parent reply other threads:[~2014-05-22 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 1:26 [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug Sukadev Bhattiprolu
2014-05-22 10:00 ` Jiri Olsa
2014-05-22 17:09 ` Sukadev Bhattiprolu
2014-05-22 10:04 ` Jiri Olsa [this message]
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=20140522100404.GB4789@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=acme@kernel.org \
--cc=anton@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=mpjohn@us.ibm.com \
--cc=sukadev@linux.vnet.ibm.com \
/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).