lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/21] perf, c2c: Add symbol count table
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@redhat.com>
> Original-by: Dick Fowles <rfowles@redhat.com>
> Signed-off-by: Don Zickus <dzickus@redhat.com>
> ---
> 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


\
 
 \ /
  Last update: 2014-02-18 15:01    [W:1.900 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site