[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131112124442.GB13057@gmail.com>
Date: Tue, 12 Nov 2013 13:44:42 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
Adrian Hunter <adrian.hunter@...el.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 04/10] perf machine: Introduce synthesize_threads method
out of open coded equivalent
* Arnaldo Carvalho de Melo <acme@...stprotocols.net> wrote:
> Em Mon, Nov 11, 2013 at 09:50:45PM +0100, Ingo Molnar escreveu:
> > * David Ahern <dsahern@...il.com> wrote:
>
> > > On 11/11/13, 1:22 PM, Arnaldo Carvalho de Melo wrote:
> > > >+ if (perf_target__has_task(target))
> > > >+ return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
> > > >+ else if (perf_target__has_cpu(target))
> > > >+ return perf_event__synthesize_threads(tool, process, machine, data_mmap);
>
> > > Getting kind of long on the line lengths...
>
> > Maybe we could start losing most of the perf_ prefixes - it's all about
> > perf here, so it does not really add much information, does it?
>
> In some cases that is ok, that is why I didn't call it 'perf_machine',
> just 'machine', in others, like 'perf_event', I thought 'event' would be
> too general when somebody tries to use this code together with other
> libraries.
I think 'event' as a variable name is generally unused by libraries,
exactly because so much random code uses it.
The only unfortunate C library land grabs I've run into are 'time' [by
glibc] and 'y0' [by libm].
What I was suggesting here was more like an event__*() namespace - there
shouldn't be any collision with public functions from libraries, public
functions are generally either well established, or prefixed with a
library name.
These are perf-internal function names, so using event__*() should be fine
- assuming there are no counter arguments.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists