Lines Matching refs:c2c

3  * This is rewrite of original c2c tool introduced in here:
130 static struct perf_c2c c2c;
140 c2c_he->cpuset = bitmap_alloc(c2c.cpus_cnt);
144 c2c_he->nodeset = bitmap_alloc(c2c.nodes_cnt);
148 c2c_he->node_stats = zalloc(c2c.nodes_cnt * sizeof(*c2c_he->node_stats));
231 node = mem2node__node(&c2c.mem2node, sample->phys_addr);
263 struct c2c_hists *c2c_hists = &c2c.hists;
277 if (c2c.stitch_lbr)
324 int node = c2c.cpu2node[cpu];
328 c2c_hists = he__get_c2c_hists(he, c2c.cl_sort, 2);
363 static struct perf_c2c c2c = {
378 "perf c2c {record|report}",
383 "perf c2c report",
426 if (!c2c.symbol_full)
793 switch (c2c.display) {
1058 for (node = 0; node < c2c.nodes_cnt; node++) {
1059 DECLARE_BITMAP(set, c2c.cpus_cnt);
1061 bitmap_zero(set, c2c.cpus_cnt);
1062 bitmap_and(set, c2c_he->cpuset, c2c.nodes[node], c2c.cpus_cnt);
1064 if (!bitmap_weight(set, c2c.cpus_cnt)) {
1065 if (c2c.node_info == 1) {
1077 switch (c2c.node_info) {
1084 int num = bitmap_weight(set, c2c.cpus_cnt);
1098 switch (c2c.display) {
1129 ret = bitmap_scnprintf(set, c2c.cpus_cnt, hpp->buf, hpp->size);
1179 scnprintf(buf, 10, "%d", bitmap_weight(c2c_he->cpuset, c2c.cpus_cnt));
1808 * fields, so switching this off for c2c.
1855 if (c2c.show_all)
1869 switch (c2c.display) {
1893 has_hitm = c2c.display == DISPLAY_TOT ? c2c_he->stats.tot_hitm :
1894 c2c.display == DISPLAY_LCL ? c2c_he->stats.lcl_hitm :
1903 dim = &c2c.hists == c2c_he->hists ?
1918 if (bitmap_weight(c2c_he->nodeset, c2c.nodes_cnt)) {
1919 len = bitmap_scnprintf(c2c_he->nodeset, c2c.nodes_cnt,
1945 if (c2c.show_src && !he->srcline)
1960 bool display = he__display(he, &c2c.hitm_stats);
1971 c2c_hists__reinit(c2c_hists, c2c.cl_output, c2c.cl_resort);
1982 dim_node.header = header_node[c2c.node_info];
1992 if (c2c.node_info > 2)
1993 c2c.node_info = 2;
1995 c2c.nodes_cnt = session->header.env.nr_numa_nodes;
1996 c2c.cpus_cnt = session->header.env.nr_cpus_avail;
2002 nodes = zalloc(sizeof(unsigned long *) * c2c.nodes_cnt);
2006 c2c.nodes = nodes;
2008 cpu2node = zalloc(sizeof(int) * c2c.cpus_cnt);
2012 for (cpu = 0; cpu < c2c.cpus_cnt; cpu++)
2015 c2c.cpu2node = cpu2node;
2017 for (node = 0; node < c2c.nodes_cnt; node++) {
2021 set = bitmap_alloc(c2c.cpus_cnt);
2053 c2c.shared_clines++;
2054 c2c_add_stats(&c2c.hitm_stats, &c2c_he->stats);
2081 struct c2c_stats *stats = &c2c.hists.stats;
2125 struct c2c_stats *stats = &c2c.hitm_stats;
2131 fprintf(out, " Total Shared Cache Lines : %10d\n", c2c.shared_clines);
2189 nd = rb_first_cached(&c2c.hists.hists.entries);
2210 fprintf(out, " c2c details \n");
2218 display_str[c2c.display]);
2219 fprintf(out, " Cacheline data grouping : %s\n", c2c.cl_sort);
2232 if (c2c.stats_only)
2241 hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, true);
2326 c2c.symbol_full = false;
2348 c2c.symbol_full = !c2c.symbol_full;
2351 c2c.node_info = (c2c.node_info + 1) % 3;
2376 display_str[c2c.display]);
2439 perf_c2c__hists_browse(&c2c.hists.hists);
2482 if (!c2c.use_stdio) {
2488 dim_percent_hitm.header = percent_hitm_header[c2c.display];
2559 if (c2c.stitch_lbr && (mode != CALLCHAIN_LBR)) {
2562 c2c.stitch_lbr = false;
2575 c2c.display = DISPLAY_TOT;
2577 c2c.display = DISPLAY_RMT;
2579 c2c.display = DISPLAY_LCL;
2625 if (asprintf(&c2c.cl_output,
2627 c2c.use_stdio ? "cl_num_empty," : "",
2649 c2c.show_src = add_src;
2659 if (asprintf(&c2c.cl_sort, "offset,%s", c) < 0)
2662 if (build_cl_output(c2c.cl_sort, no_source))
2665 if (asprintf(&c2c.cl_resort, "offset,%s",
2666 c2c.display == DISPLAY_TOT ?
2668 c2c.display == DISPLAY_RMT ?
2673 pr_debug("coalesce sort fields: %s\n", c2c.cl_sort);
2674 pr_debug("coalesce resort fields: %s\n", c2c.cl_resort);
2675 pr_debug("coalesce output fields: %s\n", c2c.cl_output);
2695 OPT_INCR('N', "node-info", &c2c.node_info,
2697 OPT_BOOLEAN(0, "stdio", &c2c.use_stdio, "Use the stdio interface"),
2698 OPT_BOOLEAN(0, "stats", &c2c.stats_only,
2700 OPT_BOOLEAN(0, "full-symbols", &c2c.symbol_full,
2704 OPT_BOOLEAN(0, "show-all", &c2c.show_all,
2714 OPT_BOOLEAN(0, "stitch-lbr", &c2c.stitch_lbr,
2727 c2c.use_stdio = true;
2730 if (c2c.stats_only)
2731 c2c.use_stdio = true;
2749 err = c2c_hists__init(&c2c.hists, "dcacheline", 2);
2755 session = perf_session__new(&data, 0, &c2c.tool);
2768 err = mem2node__init(&c2c.mem2node, &session->header.env);
2785 if (c2c.use_stdio)
2798 c2c_hists__reinit(&c2c.hists,
2813 c2c.display == DISPLAY_TOT ? "tot_hitm" :
2814 c2c.display == DISPLAY_LCL ? "lcl_hitm" : "rmt_hitm"
2817 ui_progress__init(&prog, c2c.hists.hists.nr_entries, "Sorting...");
2819 hists__collapse_resort(&c2c.hists.hists, NULL);
2820 hists__output_resort_cb(&c2c.hists.hists, &prog, resort_hitm_cb);
2821 hists__iterate_cb(&c2c.hists.hists, resort_cl_cb);
2833 mem2node__exit(&c2c.mem2node);
2858 "perf c2c record [<options>] [<command>]",
2859 "perf c2c record [<options>] -- <command> [<options>]",
2874 "event selector. Use 'perf c2c record -e list' to list available events",