mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@ghostprotocols.net, LKML <linux-kernel@vger.kernel.org>,
	jmario@redhat.com, fowles@inreach.com, peterz@infradead.org,
	eranian@google.com, andi.kleen@intel.com
Subject: Re: [PATCH 4/6 V2] perf, sort:  Add physid sorting based on mmap2 data
Date: Mon, 31 Mar 2014 22:58:12 -0400	[thread overview]
Message-ID: <20140401025812.GU25953@redhat.com> (raw)
In-Reply-To: <20140329171152.GG2022@krava.redhat.com>

On Sat, Mar 29, 2014 at 06:11:52PM +0100, Jiri Olsa wrote:
> On Mon, Mar 24, 2014 at 04:57:18PM -0400, Don Zickus wrote:
> > In order for the c2c tool to work correctly, it needs to properly
> > sort all the records on uniquely identifiable data addresses.  These
> > unique addresses are converted from virtual addresses provided by the
> > hardware into a kernel address using an mmap2 record as the decoder.
> > 
> > Once a unique address is converted, we can sort on them based on
> > various rules.  Then it becomes clear which address are overlapping
> > with each other across mmap regions or pid spaces.
> > 
> > This patch just creates the rules and inserts the records into a
> > sort entry for safe keeping until later patches process them.
> > 
> > The general sorting rule is:
> 
> SNIP
> 
> > +
> > +static int64_t
> > +sort__physid_major_cmp(struct hist_entry *left, struct hist_entry *right)
> > +{
> > +	struct map *l = left->mem_info->daddr.map;
> > +	struct map *r = right->mem_info->daddr.map;
> > +
> > +	return r->maj - l->maj;
> 
> I got segfault here, and consequently in all other sorting
> functions, because it failed to resolve map earlier in
> ip__resolve_data
> 
> we need to check it here, or before adding to the tree

Crap.  I checked it before, when I had one big function.  I forgot to
carry that though.  Honestly I would love to block these before they made
it to the sort routine but don't know a good way without adding checks to
all the builtins.

Cheers,
Don

  reply	other threads:[~2014-04-01  2:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 19:34 [PATCH 0/6] perf, events: Enable mmap2 support Don Zickus
2014-03-24 19:34 ` [PATCH 1/6] events, perf: Pass protection and flags bits through mmap2 interface Don Zickus
2014-03-24 19:34 ` [PATCH 2/6] perf: Update mmap2 interface with protection and flag bits Don Zickus
2014-04-09  2:17   ` Namhyung Kim
2014-04-09  2:20     ` Namhyung Kim
2014-03-24 19:34 ` [PATCH 3/6] Revert "perf: Disable PERF_RECORD_MMAP2 support" Don Zickus
2014-04-09  2:32   ` Namhyung Kim
2014-03-24 19:34 ` [PATCH 4/6] perf, sort: Add physid sorting based on mmap2 data Don Zickus
2014-03-24 19:54   ` Andi Kleen
2014-03-24 20:17     ` Don Zickus
2014-03-24 20:20       ` Andi Kleen
2014-03-24 20:26         ` Don Zickus
2014-03-24 20:54   ` [PATCH 01/15 V3] perf: Fix stddev calculation Don Zickus
2014-03-24 20:57     ` Don Zickus
2014-03-24 20:57   ` [PATCH 4/6 V2] perf, sort: Add physid sorting based on mmap2 data Don Zickus
2014-03-29 17:11     ` Jiri Olsa
2014-04-01  2:58       ` Don Zickus [this message]
2014-04-09  5:21     ` Namhyung Kim
2014-04-09  5:45       ` Peter Zijlstra
2014-04-09  3:06   ` [PATCH 4/6] " Don Zickus
2014-03-24 19:34 ` [PATCH 5/6] perf: Update sort to handle MAP_SHARED bits Don Zickus
2014-03-24 19:34 ` [PATCH 6/6] perf, sort: Allow unique sorting instead of combining hist_entries Don Zickus
2014-04-09  5:31   ` Namhyung Kim
2014-04-09 13:57     ` Don Zickus
2014-04-10  5:09       ` Namhyung Kim

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=20140401025812.GU25953@redhat.com \
    --to=dzickus@redhat.com \
    --cc=acme@ghostprotocols.net \
    --cc=andi.kleen@intel.com \
    --cc=eranian@google.com \
    --cc=fowles@inreach.com \
    --cc=jmario@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.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

Powered by JetHome