From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, David Ahern <daahern@cisco.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 09/10] perf script: Add support for dumping symbols
Date: Thu, 10 Mar 2011 00:30:41 +0100 [thread overview]
Message-ID: <20110309233039.GA2533@nowhere> (raw)
In-Reply-To: <1299695491-15786-10-git-send-email-acme@infradead.org>
On Wed, Mar 09, 2011 at 03:31:30PM -0300, Arnaldo Carvalho de Melo wrote:
> @@ -868,6 +892,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __used)
> exit(-1);
> }
>
> + symbol_conf.use_callchain = no_callchain ? false : true;
> +
That also depend on (sample_type & PERF_SAMPLE_CALLCHAIN)...
> if (rec_script_path)
> script_path = rec_script_path;
> if (rep_script_path)
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index f642615..51fac44 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -1145,3 +1145,64 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp)
>
> return ret;
> }
> +
> +void perf_session__print_symbols(union perf_event *event,
> + struct perf_sample *sample,
> + struct perf_session *session)
> +{
> + struct addr_location al;
> + const char *symname, *dsoname;
> + struct callchain_cursor *cursor = &session->callchain_cursor;
> + struct callchain_cursor_node *node;
> +
> + if (perf_event__preprocess_sample(event, session, &al, sample,
> + NULL) < 0) {
> + error("problem processing %d event, skipping it.\n",
> + event->header.type);
> + return;
> + }
> +
> + if (symbol_conf.use_callchain && sample->callchain) {
...otherwise you may deref some crap there. sample->callchain is
random when there is actually no callchain.
> +
> + if (perf_session__resolve_callchain(session, al.thread,
> + sample->callchain, NULL) != 0) {
> + if (verbose)
> + error("Failed to resolve callchain. Skipping\n");
> + return;
> + }
next prev parent reply other threads:[~2011-03-09 23:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 18:31 [GIT PULL 00/10] perf/core fixes and improvements Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 01/10] perf session: Simplify evlist creation from perf.data header Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 02/10] perf evsel: Assume rest of perf_header_attr functions Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 03/10] perf header: Stop using 'self' Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 04/10] perf top: Fix events overflow in top command Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 05/10] perf top: Don't let events to eat up whole header line Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 06/10] perf script: Change process_event prototype Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 07/10] perf script: Move printing of 'common' data from print_event and rename Arnaldo Carvalho de Melo
2011-03-09 23:50 ` Frederic Weisbecker
2011-03-10 0:04 ` David Ahern
2011-03-10 0:10 ` Frederic Weisbecker
2011-03-10 0:11 ` David Ahern
2011-03-10 0:14 ` Frederic Weisbecker
2011-03-10 0:22 ` Frederic Weisbecker
2011-03-10 0:32 ` David Ahern
2011-03-10 0:50 ` Frederic Weisbecker
2011-03-09 18:31 ` [PATCH 08/10] perf script: Support custom field selection for output Arnaldo Carvalho de Melo
2011-03-09 18:31 ` [PATCH 09/10] perf script: Add support for dumping symbols Arnaldo Carvalho de Melo
2011-03-09 23:30 ` Frederic Weisbecker [this message]
2011-03-10 0:21 ` David Ahern
2011-03-09 18:31 ` [PATCH 10/10] perf script: Add support for H/W and S/W events Arnaldo Carvalho de Melo
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=20110309233039.GA2533@nowhere \
--to=fweisbec@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=acme@redhat.com \
--cc=daahern@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.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