return scnprintf(hpp->buf, hpp->size, "%*s", width, c2c_he->nodestr);
}
+static int
+dcacheline_node_count(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
+ struct hist_entry *he)
+{
+ struct c2c_hist_entry *c2c_he;
+ int width = c2c_width(fmt, hpp, he->hists);
+
+ c2c_he = container_of(he, struct c2c_hist_entry, he);
+ return scnprintf(hpp->buf, hpp->size, "%*lu", width, c2c_he->paddr_cnt);
+}
+
static int offset_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
struct hist_entry *he)
{
}
static struct c2c_dimension dim_dcacheline = {
- .header = HEADER_SPAN("--- Cacheline ----", "Address", 1),
+ .header = HEADER_SPAN("--- Cacheline ----", "Address", 2),
.name = "dcacheline",
.cmp = dcacheline_cmp,
.entry = dcacheline_entry,
.width = 4,
};
-static struct c2c_header header_offset_tui = HEADER_SPAN("-----", "Off", 1);
+static struct c2c_dimension dim_dcacheline_count = {
+ .header = HEADER_LOW("PA cnt"),
+ .name = "dcacheline_count",
+ .cmp = empty_cmp,
+ .entry = dcacheline_node_count,
+ .width = 6,
+};
+
+static struct c2c_header header_offset_tui = HEADER_SPAN("-----", "Off", 2);
static struct c2c_dimension dim_offset = {
- .header = HEADER_SPAN("--- Data address -", "Offset", 1),
+ .header = HEADER_SPAN("--- Data address -", "Offset", 2),
.name = "offset",
.cmp = offset_cmp,
.entry = offset_entry,
static struct c2c_dimension *dimensions[] = {
&dim_dcacheline,
&dim_dcacheline_node,
+ &dim_dcacheline_count,
&dim_offset,
&dim_offset_node,
&dim_iaddr,
/* Fix the zero line for dcacheline column. */
buf = fill_line("Cacheline", dim_dcacheline.width +
- dim_dcacheline_node.width + 2);
+ dim_dcacheline_node.width +
+ dim_dcacheline_count.width + 4);
if (!buf)
return -ENOMEM;
/* Fix the zero line for offset column. */
buf = fill_line(nodestr, dim_offset.width +
- dim_offset_node.width + 2);
+ dim_offset_node.width +
+ dim_dcacheline_count.width + 4);
if (!buf)
return -ENOMEM;
"percent_lcl_hitm,"
"percent_stores_l1hit,"
"percent_stores_l1miss,"
- "offset,offset_node,",
+ "offset,offset_node,dcacheline_count,",
add_pid ? "pid," : "",
add_tid ? "tid," : "",
add_iaddr ? "iaddr," : "",
"cl_idx,"
"dcacheline,"
"dcacheline_node,"
+ "dcacheline_count,"
"tot_recs,"
"percent_hitm,"
"tot_hitm,lcl_hitm,rmt_hitm,"