|
@@ -328,6 +328,27 @@ offset_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
|
|
return (int64_t)(r - l);
|
|
return (int64_t)(r - l);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int
|
|
|
|
+iaddr_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
|
|
|
|
+ struct hist_entry *he)
|
|
|
|
+{
|
|
|
|
+ uint64_t addr = 0;
|
|
|
|
+ int width = c2c_width(fmt, hpp, he->hists);
|
|
|
|
+ char buf[20];
|
|
|
|
+
|
|
|
|
+ if (he->mem_info)
|
|
|
|
+ addr = he->mem_info->iaddr.addr;
|
|
|
|
+
|
|
|
|
+ return scnprintf(hpp->buf, hpp->size, "%*s", width, HEX_STR(buf, addr));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int64_t
|
|
|
|
+iaddr_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
|
|
|
|
+ struct hist_entry *left, struct hist_entry *right)
|
|
|
|
+{
|
|
|
|
+ return sort__iaddr_cmp(left, right);
|
|
|
|
+}
|
|
|
|
+
|
|
#define HEADER_LOW(__h) \
|
|
#define HEADER_LOW(__h) \
|
|
{ \
|
|
{ \
|
|
.line[1] = { \
|
|
.line[1] = { \
|
|
@@ -379,9 +400,18 @@ static struct c2c_dimension dim_offset = {
|
|
.width = 18,
|
|
.width = 18,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static struct c2c_dimension dim_iaddr = {
|
|
|
|
+ .header = HEADER_LOW("Code address"),
|
|
|
|
+ .name = "iaddr",
|
|
|
|
+ .cmp = iaddr_cmp,
|
|
|
|
+ .entry = iaddr_entry,
|
|
|
|
+ .width = 18,
|
|
|
|
+};
|
|
|
|
+
|
|
static struct c2c_dimension *dimensions[] = {
|
|
static struct c2c_dimension *dimensions[] = {
|
|
&dim_dcacheline,
|
|
&dim_dcacheline,
|
|
&dim_offset,
|
|
&dim_offset,
|
|
|
|
+ &dim_iaddr,
|
|
NULL,
|
|
NULL,
|
|
};
|
|
};
|
|
|
|
|