Lines Matching refs:c2c

137 static struct perf_c2c c2c;  variable
147 c2c_he->cpuset = bitmap_zalloc(c2c.cpus_cnt); in c2c_he_zalloc()
151 c2c_he->nodeset = bitmap_zalloc(c2c.nodes_cnt); in c2c_he_zalloc()
155 c2c_he->node_stats = zalloc(c2c.nodes_cnt * sizeof(*c2c_he->node_stats)); in c2c_he_zalloc()
246 node = mem2node__node(&c2c.mem2node, sample->phys_addr); in c2c_he__set_node()
282 struct c2c_hists *c2c_hists = &c2c.hists; in process_sample_event()
296 if (c2c.stitch_lbr) in process_sample_event()
343 int node = c2c.cpu2node[cpu]; in process_sample_event()
347 c2c_hists = he__get_c2c_hists(he, c2c.cl_sort, 2); in process_sample_event()
382 static struct perf_c2c c2c = { variable
449 if (!c2c.symbol_full) in symbol_width()
815 switch (c2c.display) { in percent_costly_snoop()
1194 for (node = 0; node < c2c.nodes_cnt; node++) { in node_entry()
1195 DECLARE_BITMAP(set, c2c.cpus_cnt); in node_entry()
1197 bitmap_zero(set, c2c.cpus_cnt); in node_entry()
1198 bitmap_and(set, c2c_he->cpuset, c2c.nodes[node], c2c.cpus_cnt); in node_entry()
1200 if (bitmap_empty(set, c2c.cpus_cnt)) { in node_entry()
1201 if (c2c.node_info == 1) { in node_entry()
1213 switch (c2c.node_info) { in node_entry()
1220 int num = bitmap_weight(set, c2c.cpus_cnt); in node_entry()
1226 switch (c2c.display) { in node_entry()
1263 ret = bitmap_scnprintf(set, c2c.cpus_cnt, hpp->buf, hpp->size); in node_entry()
1315 scnprintf(buf, 10, "%d", bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt)); in cpucnt_entry()
2104 if (c2c.show_all) in he__display()
2109 switch (c2c.display) { in he__display()
2144 switch (c2c.display) { in is_valid_hist_entry()
2167 dim = &c2c.hists == c2c_he->hists ? in set_node_width()
2182 if (!bitmap_empty(c2c_he->nodeset, c2c.nodes_cnt)) { in set_nodestr()
2183 len = bitmap_scnprintf(c2c_he->nodeset, c2c.nodes_cnt, in set_nodestr()
2209 if (c2c.show_src && !he->srcline) in filter_cb()
2224 bool display = he__display(he, &c2c.shared_clines_stats); in resort_cl_cb()
2235 c2c_hists__reinit(c2c_hists, c2c.cl_output, c2c.cl_resort); in resort_cl_cb()
2253 switch (c2c.node_info) { in setup_nodes_header()
2258 if (c2c.display == DISPLAY_SNP_PEER) in setup_nodes_header()
2281 if (c2c.node_info > 2) in setup_nodes()
2282 c2c.node_info = 2; in setup_nodes()
2284 c2c.nodes_cnt = session->header.env.nr_numa_nodes; in setup_nodes()
2285 c2c.cpus_cnt = session->header.env.nr_cpus_avail; in setup_nodes()
2291 nodes = zalloc(sizeof(unsigned long *) * c2c.nodes_cnt); in setup_nodes()
2295 c2c.nodes = nodes; in setup_nodes()
2297 cpu2node = zalloc(sizeof(int) * c2c.cpus_cnt); in setup_nodes()
2301 for (idx = 0; idx < c2c.cpus_cnt; idx++) in setup_nodes()
2304 c2c.cpu2node = cpu2node; in setup_nodes()
2306 for (node = 0; node < c2c.nodes_cnt; node++) { in setup_nodes()
2310 set = bitmap_zalloc(c2c.cpus_cnt); in setup_nodes()
2343 c2c.shared_clines++; in resort_shared_cl_cb()
2344 c2c_add_stats(&c2c.shared_clines_stats, &c2c_he->stats); in resort_shared_cl_cb()
2371 struct c2c_stats *stats = &c2c.hists.stats; in print_c2c__display_stats()
2417 struct c2c_stats *stats = &c2c.shared_clines_stats; in print_shared_cacheline_info()
2423 fprintf(out, " Total Shared Cache Lines : %10d\n", c2c.shared_clines); in print_shared_cacheline_info()
2472 if (c2c.display != DISPLAY_SNP_PEER) in print_pareto()
2495 nd = rb_first_cached(&c2c.hists.hists.entries); in print_pareto()
2524 display_str[c2c.display]); in print_c2c_info()
2525 fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort); in print_c2c_info()
2538 if (c2c.stats_only) in perf_c2c__hists_fprintf()
2547 hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, true); in perf_c2c__hists_fprintf()
2632 c2c.symbol_full = false; in perf_c2c__browse_cacheline()
2654 c2c.symbol_full = !c2c.symbol_full; in perf_c2c__browse_cacheline()
2657 c2c.node_info = (c2c.node_info + 1) % 3; in perf_c2c__browse_cacheline()
2682 display_str[c2c.display]); in perf_c2c_browser__title()
2745 perf_c2c__hists_browse(&c2c.hists.hists); in perf_c2c_display()
2788 if (!c2c.use_stdio) { in ui_quirks()
2794 dim_percent_costly_snoop.header = percent_costly_snoop_header[c2c.display]; in ui_quirks()
2865 if (c2c.stitch_lbr && (mode != CALLCHAIN_LBR)) { in setup_callchain()
2868 c2c.stitch_lbr = false; in setup_callchain()
2881 c2c.display = DISPLAY_TOT_HITM; in setup_display()
2883 c2c.display = DISPLAY_RMT_HITM; in setup_display()
2885 c2c.display = DISPLAY_LCL_HITM; in setup_display()
2887 c2c.display = DISPLAY_SNP_PEER; in setup_display()
2933 if (asprintf(&c2c.cl_output, in build_cl_output()
2935 c2c.use_stdio ? "cl_num_empty," : "", in build_cl_output()
2936 c2c.display == DISPLAY_SNP_PEER ? "percent_rmt_peer," in build_cl_output()
2947 c2c.display == DISPLAY_SNP_PEER ? "mean_rmt_peer," in build_cl_output()
2962 c2c.show_src = add_src; in build_cl_output()
2973 if (asprintf(&c2c.cl_sort, "offset,%s", c) < 0) in setup_coalesce()
2976 if (build_cl_output(c2c.cl_sort, no_source)) in setup_coalesce()
2979 if (c2c.display == DISPLAY_TOT_HITM) in setup_coalesce()
2981 else if (c2c.display == DISPLAY_RMT_HITM) in setup_coalesce()
2983 else if (c2c.display == DISPLAY_LCL_HITM) in setup_coalesce()
2985 else if (c2c.display == DISPLAY_SNP_PEER) in setup_coalesce()
2988 if (asprintf(&c2c.cl_resort, "offset,%s", sort_str) < 0) in setup_coalesce()
2991 pr_debug("coalesce sort fields: %s\n", c2c.cl_sort); in setup_coalesce()
2992 pr_debug("coalesce resort fields: %s\n", c2c.cl_resort); in setup_coalesce()
2993 pr_debug("coalesce output fields: %s\n", c2c.cl_output); in setup_coalesce()
3019 OPT_INCR('N', "node-info", &c2c.node_info, in perf_c2c__report()
3021 OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"), in perf_c2c__report()
3022 OPT_BOOLEAN(0, "stats", &c2c.stats_only, in perf_c2c__report()
3024 OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full, in perf_c2c__report()
3028 OPT_BOOLEAN(0, "show-all", &c2c.show_all, in perf_c2c__report()
3038 OPT_BOOLEAN(0, "stitch-lbr", &c2c.stitch_lbr, in perf_c2c__report()
3052 c2c.use_stdio = true; in perf_c2c__report()
3055 if (c2c.stats_only) in perf_c2c__report()
3056 c2c.use_stdio = true; in perf_c2c__report()
3068 session = perf_session__new(&data, &c2c.tool); in perf_c2c__report()
3097 err = c2c_hists__init(&c2c.hists, "dcacheline", 2); in perf_c2c__report()
3111 err = mem2node__init(&c2c.mem2node, &session->header.env); in perf_c2c__report()
3128 if (c2c.use_stdio) in perf_c2c__report()
3141 if (c2c.display != DISPLAY_SNP_PEER) in perf_c2c__report()
3172 if (c2c.display == DISPLAY_TOT_HITM) in perf_c2c__report()
3174 else if (c2c.display == DISPLAY_RMT_HITM) in perf_c2c__report()
3176 else if (c2c.display == DISPLAY_LCL_HITM) in perf_c2c__report()
3178 else if (c2c.display == DISPLAY_SNP_PEER) in perf_c2c__report()
3181 c2c_hists__reinit(&c2c.hists, output_str, sort_str); in perf_c2c__report()
3183 ui_progress__init(&prog, c2c.hists.hists.nr_entries, "Sorting..."); in perf_c2c__report()
3185 hists__collapse_resort(&c2c.hists.hists, NULL); in perf_c2c__report()
3186 hists__output_resort_cb(&c2c.hists.hists, &prog, resort_shared_cl_cb); in perf_c2c__report()
3187 hists__iterate_cb(&c2c.hists.hists, resort_cl_cb); in perf_c2c__report()
3199 mem2node__exit(&c2c.mem2node); in perf_c2c__report()