Re: [PATCH 17/21] perf, c2c: Add symbol count table
From: Jiri Olsa
Date: Tue Feb 18 2014 - 08:09:50 EST
On Mon, Feb 10, 2014 at 12:29:12PM -0500, Don Zickus wrote:
> Just another table that displays the referenced symbols in the analysis
> report. The table lists the most frequently used symbols first.
>
> It is just another way to look at similar data to figure out who
> is causing the most contention (based on the workload used).
>
> Originally done by Dick Fowles and ported by me.
>
> Suggested-by: Joe Mario <jmario@xxxxxxxxxx>
> Original-by: Dick Fowles <rfowles@xxxxxxxxxx>
> Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
> ---
> tools/perf/builtin-c2c.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 99 insertions(+)
>
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 32c2319..979187f 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -950,6 +950,104 @@ static void c2c_hit__update_stats(struct c2c_stats *new,
> new->total_period += old->total_period;
> }
>
> +LIST_HEAD(ref_tree);
> +LIST_HEAD(ref_tree_sorted);
> +struct refs {
> + struct list_head list;
> + int nr;
> + const char *name;
> + char *long_name;
> +};
> +
> +static int update_ref_tree(struct c2c_entry *entry)
> +{
> + struct refs *p;
> + struct dso *dso = entry->mi->iaddr.map->dso;
> + const char *name = dso->short_name;
> +
> + list_for_each_entry(p, &ref_tree, list) {
> + if (!strcmp(p->name, name))
> + goto found;
> + }
> +
> + p = zalloc(sizeof(struct refs));
> + if (!p)
> + return -1;
> + p->name = name;
> + p->long_name = dso->long_name;
> + list_add_tail(&p->list, &ref_tree);
so this is a tree, which is actually a list ;-)
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/