Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755391AbaBRNJn (ORCPT ); Tue, 18 Feb 2014 08:09:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5627 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755062AbaBRNJl (ORCPT ); Tue, 18 Feb 2014 08:09:41 -0500 Date: Tue, 18 Feb 2014 14:09:29 +0100 From: Jiri Olsa To: Don Zickus Cc: acme@ghostprotocols.net, LKML , jmario@redhat.com, fowles@inreach.com, eranian@google.com Subject: Re: [PATCH 17/21] perf, c2c: Add symbol count table Message-ID: <20140218130929.GL4343@krava.brq.redhat.com> References: <1392053356-23024-1-git-send-email-dzickus@redhat.com> <1392053356-23024-18-git-send-email-dzickus@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1392053356-23024-18-git-send-email-dzickus@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Original-by: Dick Fowles > Signed-off-by: Don Zickus > --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/