Lines Matching refs:c2c

3  * This is rewrite of original c2c tool introduced in here:
136 static struct perf_c2c c2c;
146 c2c_he->cpuset = bitmap_zalloc(c2c.cpus_cnt);
150 c2c_he->nodeset = bitmap_zalloc(c2c.nodes_cnt);
154 c2c_he->node_stats = zalloc(c2c.nodes_cnt * sizeof(*c2c_he->node_stats));
245 node = mem2node__node(&c2c.mem2node, sample->phys_addr);
281 struct c2c_hists *c2c_hists = &c2c.hists;
298 if (c2c.stitch_lbr)
348 int node = c2c.cpu2node[cpu];
352 c2c_hists = he__get_c2c_hists(he, c2c.cl_sort, 2);
387 static struct perf_c2c c2c = {
406 "perf c2c {record|report}",
411 "perf c2c report",
454 if (!c2c.symbol_full)
821 switch (c2c.display) {
1200 for (node = 0; node < c2c.nodes_cnt; node++) {
1201 DECLARE_BITMAP(set, c2c.cpus_cnt);
1203 bitmap_zero(set, c2c.cpus_cnt);
1204 bitmap_and(set, c2c_he->cpuset, c2c.nodes[node], c2c.cpus_cnt);
1206 if (bitmap_empty(set, c2c.cpus_cnt)) {
1207 if (c2c.node_info == 1) {
1219 switch (c2c.node_info) {
1226 int num = bitmap_weight(set, c2c.cpus_cnt);
1232 switch (c2c.display) {
1269 ret = bitmap_scnprintf(set, c2c.cpus_cnt, hpp->buf, hpp->size);
1321 scnprintf(buf, 10, "%d", bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt));
2056 * fields, so switching this off for c2c.
2110 if (c2c.show_all)
2115 switch (c2c.display) {
2150 switch (c2c.display) {
2173 dim = &c2c.hists == c2c_he->hists ?
2188 if (!bitmap_empty(c2c_he->nodeset, c2c.nodes_cnt)) {
2189 len = bitmap_scnprintf(c2c_he->nodeset, c2c.nodes_cnt,
2215 if (c2c.show_src && !he->srcline)
2230 bool display = he__display(he, &c2c.shared_clines_stats);
2241 c2c_hists__reinit(c2c_hists, c2c.cl_output, c2c.cl_resort);
2259 switch (c2c.node_info) {
2264 if (c2c.display == DISPLAY_SNP_PEER)
2287 if (c2c.node_info > 2)
2288 c2c.node_info = 2;
2290 c2c.nodes_cnt = session->header.env.nr_numa_nodes;
2291 c2c.cpus_cnt = session->header.env.nr_cpus_avail;
2297 nodes = zalloc(sizeof(unsigned long *) * c2c.nodes_cnt);
2301 c2c.nodes = nodes;
2303 cpu2node = zalloc(sizeof(int) * c2c.cpus_cnt);
2307 for (idx = 0; idx < c2c.cpus_cnt; idx++)
2310 c2c.cpu2node = cpu2node;
2312 for (node = 0; node < c2c.nodes_cnt; node++) {
2316 set = bitmap_zalloc(c2c.cpus_cnt);
2349 c2c.shared_clines++;
2350 c2c_add_stats(&c2c.shared_clines_stats, &c2c_he->stats);
2377 struct c2c_stats *stats = &c2c.hists.stats;
2423 struct c2c_stats *stats = &c2c.shared_clines_stats;
2429 fprintf(out, " Total Shared Cache Lines : %10d\n", c2c.shared_clines);
2478 if (c2c.display != DISPLAY_SNP_PEER)
2501 nd = rb_first_cached(&c2c.hists.hists.entries);
2522 fprintf(out, " c2c details \n");
2530 display_str[c2c.display]);
2531 fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort);
2544 if (c2c.stats_only)
2553 hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, true);
2638 c2c.symbol_full = false;
2660 c2c.symbol_full = !c2c.symbol_full;
2663 c2c.node_info = (c2c.node_info + 1) % 3;
2688 display_str[c2c.display]);
2751 perf_c2c__hists_browse(&c2c.hists.hists);
2794 if (!c2c.use_stdio) {
2800 dim_percent_costly_snoop.header = percent_costly_snoop_header[c2c.display];
2872 if (c2c.stitch_lbr && (mode != CALLCHAIN_LBR)) {
2875 c2c.stitch_lbr = false;
2888 c2c.display = DISPLAY_TOT_HITM;
2890 c2c.display = DISPLAY_RMT_HITM;
2892 c2c.display = DISPLAY_LCL_HITM;
2894 c2c.display = DISPLAY_SNP_PEER;
2940 if (asprintf(&c2c.cl_output,
2942 c2c.use_stdio ? "cl_num_empty," : "",
2943 c2c.display == DISPLAY_SNP_PEER ? "percent_rmt_peer,"
2954 c2c.display == DISPLAY_SNP_PEER ? "mean_rmt_peer,"
2969 c2c.show_src = add_src;
2980 if (asprintf(&c2c.cl_sort, "offset,%s", c) < 0)
2983 if (build_cl_output(c2c.cl_sort, no_source))
2986 if (c2c.display == DISPLAY_TOT_HITM)
2988 else if (c2c.display == DISPLAY_RMT_HITM)
2990 else if (c2c.display == DISPLAY_LCL_HITM)
2992 else if (c2c.display == DISPLAY_SNP_PEER)
2995 if (asprintf(&c2c.cl_resort, "offset,%s", sort_str) < 0)
2998 pr_debug("coalesce sort fields: %s\n", c2c.cl_sort);
2999 pr_debug("coalesce resort fields: %s\n", c2c.cl_resort);
3000 pr_debug("coalesce output fields: %s\n", c2c.cl_output);
3026 OPT_INCR('N', "node-info", &c2c.node_info,
3028 OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"),
3029 OPT_BOOLEAN(0, "stats", &c2c.stats_only,
3031 OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full,
3035 OPT_BOOLEAN(0, "show-all", &c2c.show_all,
3045 OPT_BOOLEAN(0, "stitch-lbr", &c2c.stitch_lbr,
3060 c2c.use_stdio = true;
3063 if (c2c.stats_only)
3064 c2c.use_stdio = true;
3076 session = perf_session__new(&data, &c2c.tool);
3105 err = c2c_hists__init(&c2c.hists, "dcacheline", 2);
3119 err = mem2node__init(&c2c.mem2node, &session->header.env);
3136 if (c2c.use_stdio)
3149 if (c2c.display != DISPLAY_SNP_PEER)
3180 if (c2c.display == DISPLAY_TOT_HITM)
3182 else if (c2c.display == DISPLAY_RMT_HITM)
3184 else if (c2c.display == DISPLAY_LCL_HITM)
3186 else if (c2c.display == DISPLAY_SNP_PEER)
3189 c2c_hists__reinit(&c2c.hists, output_str, sort_str);
3191 ui_progress__init(&prog, c2c.hists.hists.nr_entries, "Sorting...");
3193 hists__collapse_resort(&c2c.hists.hists, NULL);
3194 hists__output_resort_cb(&c2c.hists.hists, &prog, resort_shared_cl_cb);
3195 hists__iterate_cb(&c2c.hists.hists, resort_cl_cb);
3207 mem2node__exit(&c2c.mem2node);
3232 "perf c2c record [<options>] [<command>]",
3233 "perf c2c record [<options>] -- <command> [<options>]",
3250 "event selector. Use 'perf c2c record -e list' to list available events",