It is to be displayed in the single cacheline output:
cl_srcline
It displays source line related to the code address that accessed
cacheline. It's a wrapper to global srcline sort entry.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-cmnzgm37mjz56ozsg4mnbgxq@git.kernel.org
[ Remove __maybe_unused from now used 'he' parameter in filter_cb() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
int cpus_cnt;
int *cpu2node;
int node_info;
+
+ bool show_src;
};
static struct perf_c2c c2c;
.width = 8,
};
+static struct c2c_dimension dim_srcline = {
+ .name = "cl_srcline",
+ .se = &sort_srcline,
+};
+
static struct c2c_dimension *dimensions[] = {
&dim_dcacheline,
&dim_offset,
&dim_mean_lcl,
&dim_mean_load,
&dim_cpucnt,
+ &dim_srcline,
NULL,
};
return hpp_list__parse(&c2c_hists->list, output, sort);
}
-static int filter_cb(struct hist_entry *he __maybe_unused)
+static int filter_cb(struct hist_entry *he)
{
+ if (c2c.show_src && !he->srcline)
+ he->srcline = hist_entry__get_srcline(he);
+
return 0;
}
/* --sort srcline */
-static char *hist_entry__get_srcline(struct hist_entry *he)
+char *hist_entry__get_srcline(struct hist_entry *he)
{
struct map *map = he->ms.map;
sort__daddr_cmp(struct hist_entry *left, struct hist_entry *right);
int64_t
sort__dcacheline_cmp(struct hist_entry *left, struct hist_entry *right);
+char *hist_entry__get_srcline(struct hist_entry *he);
#endif /* __PERF_SORT_H */