Lines Matching refs:c2c
120 static struct perf_c2c c2c; variable
130 c2c_he->cpuset = bitmap_alloc(c2c.cpus_cnt); in c2c_he_zalloc()
134 c2c_he->nodeset = bitmap_alloc(c2c.nodes_cnt); in c2c_he_zalloc()
138 c2c_he->node_stats = zalloc(c2c.nodes_cnt * sizeof(*c2c_he->node_stats)); in c2c_he_zalloc()
221 node = mem2node__node(&c2c.mem2node, sample->phys_addr); in c2c_he__set_node()
253 struct c2c_hists *c2c_hists = &c2c.hists; in process_sample_event()
311 int node = c2c.cpu2node[cpu]; in process_sample_event()
315 c2c_hists = he__get_c2c_hists(he, c2c.cl_sort, 2); in process_sample_event()
350 static struct perf_c2c c2c = { variable
413 if (!c2c.symbol_full) in symbol_width()
817 switch (c2c.display) { in percent_hitm()
1082 for (node = 0; node < c2c.nodes_cnt; node++) { in node_entry()
1083 DECLARE_BITMAP(set, c2c.cpus_cnt); in node_entry()
1085 bitmap_zero(set, c2c.cpus_cnt); in node_entry()
1086 bitmap_and(set, c2c_he->cpuset, c2c.nodes[node], c2c.cpus_cnt); in node_entry()
1088 if (!bitmap_weight(set, c2c.cpus_cnt)) { in node_entry()
1089 if (c2c.node_info == 1) { in node_entry()
1101 switch (c2c.node_info) { in node_entry()
1108 int num = bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt); in node_entry()
1122 switch (c2c.display) { in node_entry()
1153 ret = bitmap_scnprintf(set, c2c.cpus_cnt, hpp->buf, hpp->size); in node_entry()
1203 scnprintf(buf, 10, "%d", bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt)); in cpucnt_entry()
1888 if (c2c.show_all) in he__display()
1902 switch (c2c.display) { in he__display()
1926 has_hitm = c2c.display == DISPLAY_TOT ? c2c_he->stats.tot_hitm : in valid_hitm_or_store()
1927 c2c.display == DISPLAY_LCL ? c2c_he->stats.lcl_hitm : in valid_hitm_or_store()
1936 dim = &c2c.hists == c2c_he->hists ? in set_node_width()
1951 if (bitmap_weight(c2c_he->nodeset, c2c.nodes_cnt)) { in set_nodestr()
1952 len = bitmap_scnprintf(c2c_he->nodeset, c2c.nodes_cnt, in set_nodestr()
1978 if (c2c.show_src && !he->srcline) in filter_cb()
1993 bool display = he__display(he, &c2c.hitm_stats); in resort_cl_cb()
2004 c2c_hists__reinit(c2c_hists, c2c.cl_output, c2c.cl_resort); in resort_cl_cb()
2015 dim_node.header = header_node[c2c.node_info]; in setup_nodes_header()
2025 if (c2c.node_info > 2) in setup_nodes()
2026 c2c.node_info = 2; in setup_nodes()
2028 c2c.nodes_cnt = session->header.env.nr_numa_nodes; in setup_nodes()
2029 c2c.cpus_cnt = session->header.env.nr_cpus_online; in setup_nodes()
2035 nodes = zalloc(sizeof(unsigned long *) * c2c.nodes_cnt); in setup_nodes()
2039 c2c.nodes = nodes; in setup_nodes()
2041 cpu2node = zalloc(sizeof(int) * c2c.cpus_cnt); in setup_nodes()
2045 for (cpu = 0; cpu < c2c.cpus_cnt; cpu++) in setup_nodes()
2048 c2c.cpu2node = cpu2node; in setup_nodes()
2050 for (node = 0; node < c2c.nodes_cnt; node++) { in setup_nodes()
2054 set = bitmap_alloc(c2c.cpus_cnt); in setup_nodes()
2082 c2c.shared_clines++; in resort_hitm_cb()
2083 c2c_add_stats(&c2c.hitm_stats, &c2c_he->stats); in resort_hitm_cb()
2110 struct c2c_stats *stats = &c2c.hists.stats; in print_c2c__display_stats()
2154 struct c2c_stats *stats = &c2c.hitm_stats; in print_shared_cacheline_info()
2160 fprintf(out, " Total Shared Cache Lines : %10d\n", c2c.shared_clines); in print_shared_cacheline_info()
2218 nd = rb_first(&c2c.hists.hists.entries); in print_pareto()
2248 display_str[c2c.display]); in print_c2c_info()
2249 fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort); in print_c2c_info()
2262 if (c2c.stats_only) in perf_c2c__hists_fprintf()
2271 hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, true); in perf_c2c__hists_fprintf()
2356 c2c.symbol_full = false; in perf_c2c__browse_cacheline()
2378 c2c.symbol_full = !c2c.symbol_full; in perf_c2c__browse_cacheline()
2381 c2c.node_info = (c2c.node_info + 1) % 3; in perf_c2c__browse_cacheline()
2406 display_str[c2c.display]); in perf_c2c_browser__title()
2469 perf_c2c__hists_browse(&c2c.hists.hists); in perf_c2c_display()
2512 if (!c2c.use_stdio) { in ui_quirks()
2518 dim_percent_hitm.header = percent_hitm_header[c2c.display]; in ui_quirks()
2599 c2c.display = DISPLAY_TOT; in setup_display()
2601 c2c.display = DISPLAY_RMT; in setup_display()
2603 c2c.display = DISPLAY_LCL; in setup_display()
2647 if (asprintf(&c2c.cl_output, in build_cl_output()
2649 c2c.use_stdio ? "cl_num_empty," : "", in build_cl_output()
2669 c2c.show_src = add_src; in build_cl_output()
2679 if (asprintf(&c2c.cl_sort, "offset,%s", c) < 0) in setup_coalesce()
2682 if (build_cl_output(c2c.cl_sort, no_source)) in setup_coalesce()
2685 if (asprintf(&c2c.cl_resort, "offset,%s", in setup_coalesce()
2686 c2c.display == DISPLAY_TOT ? in setup_coalesce()
2688 c2c.display == DISPLAY_RMT ? in setup_coalesce()
2693 pr_debug("coalesce sort fields: %s\n", c2c.cl_sort); in setup_coalesce()
2694 pr_debug("coalesce resort fields: %s\n", c2c.cl_resort); in setup_coalesce()
2695 pr_debug("coalesce output fields: %s\n", c2c.cl_output); in setup_coalesce()
2715 OPT_INCR('N', "node-info", &c2c.node_info, in perf_c2c__report()
2718 OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"), in perf_c2c__report()
2720 OPT_BOOLEAN(0, "stats", &c2c.stats_only, in perf_c2c__report()
2722 OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full, in perf_c2c__report()
2726 OPT_BOOLEAN(0, "show-all", &c2c.show_all, in perf_c2c__report()
2746 if (c2c.stats_only) in perf_c2c__report()
2747 c2c.use_stdio = true; in perf_c2c__report()
2765 err = c2c_hists__init(&c2c.hists, "dcacheline", 2); in perf_c2c__report()
2771 session = perf_session__new(&data, 0, &c2c.tool); in perf_c2c__report()
2783 err = mem2node__init(&c2c.mem2node, &session->header.env); in perf_c2c__report()
2800 if (c2c.use_stdio) in perf_c2c__report()
2813 c2c_hists__reinit(&c2c.hists, in perf_c2c__report()
2827 c2c.display == DISPLAY_TOT ? "tot_hitm" : in perf_c2c__report()
2828 c2c.display == DISPLAY_LCL ? "lcl_hitm" : "rmt_hitm" in perf_c2c__report()
2831 ui_progress__init(&prog, c2c.hists.hists.nr_entries, "Sorting..."); in perf_c2c__report()
2833 hists__collapse_resort(&c2c.hists.hists, NULL); in perf_c2c__report()
2834 hists__output_resort_cb(&c2c.hists.hists, &prog, resort_hitm_cb); in perf_c2c__report()
2835 hists__iterate_cb(&c2c.hists.hists, resort_cl_cb); in perf_c2c__report()
2847 mem2node__exit(&c2c.mem2node); in perf_c2c__report()