[lkml]   [2014]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/6 V2] perf, sort: Add physid sorting based on mmap2 data
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:


> +
> +static int64_t
> +sort__physid_major_cmp(struct hist_entry *left, struct hist_entry *right)
> +{
> + struct map *l = left->mem_info->;
> + struct map *r = right->mem_info->;
> +
> + return r->maj - l->maj;

I got segfault here, and consequently in all other sorting
functions, because it failed to resolve map earlier in

we need to check it here, or before adding to the tree


 \ /
  Last update: 2014-03-29 18:21    [W:0.083 / U:0.136 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site