lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/18] perf sort: Compare addresses if no symbol info
Em Wed, Dec 18, 2013 at 04:38:49PM +0100, Jiri Olsa escreveu:
> On Wed, Dec 18, 2013 at 02:21:09PM +0900, Namhyung Kim wrote:
> > From: Namhyung Kim <namhyung.kim@lge.com>
> >
> > If a hist entry doesn't have symbol information, compare it with its
> > address. Currently it only compares its level or whether it's NULL.
> > This can lead to an undesired result like an overhead exceeds 100%
> > especially when callchain accumulation is enabled by later patch.
> >
> > Cc: Stephane Eranian <eranian@google.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/util/sort.c | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> > index 8b0bb1f4494a..68a4fd2f505e 100644
> > --- a/tools/perf/util/sort.c
> > +++ b/tools/perf/util/sort.c
> > @@ -161,6 +161,11 @@ struct sort_entry sort_dso = {
> >
> > /* --sort symbol */
> >
> > +static int64_t _sort__addr_cmp(u64 left_ip, u64 right_ip)
> > +{
> > + return (int64_t)(right_ip - left_ip);
> > +}
> > +
>
> what's the reason for the leading '_' in the name?

Yeah, I'm curious as well, the convention is to only use double _ in
front of functions when it does a little less than a function of the
same name without such prefix, like locking, etc.

- Arnaldo

> otherwise:
>
> Acked-by: Jiri Olsa <jolsa@redhat.com>
>
> jirka


\
 
 \ /
  Last update: 2013-12-18 19:41    [W:0.173 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site