public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>, Borislav Petkov <bp@suse.de>,
	Jiri Olsa <jolsa@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Robert Richter <rric@kernel.org>
Subject: Re: [PATCH] perf: Move fs.* to generic lib/lk/
Date: Tue, 26 Nov 2013 19:03:33 +0100	[thread overview]
Message-ID: <20131126180333.GC9958@gmail.com> (raw)
In-Reply-To: <20131123131243.GB24148@pd.tnic>


* Borislav Petkov <bp@alien8.de> wrote:

> On Fri, Nov 22, 2013 at 04:54:25PM +0100, Ingo Molnar wrote:
> > comet:~/tip/tools/perf> ls util/*.h
> > util/annotate.h   util/data.h       util/fs.h           util/parse-events-bison.h  util/probe-event.h   util/sort.h       util/thread.h       util/values.h
> > util/build-id.h   util/debug.h      util/header.h       util/parse-events-flex.h   util/probe-finder.h  util/stat.h       util/thread_map.h   util/vdso.h
> > util/cache.h      util/dso.h        util/help.h         util/parse-events.h        util/pstack.h        util/strbuf.h     util/tool.h         util/xyarray.h
> > util/callchain.h  util/dwarf-aux.h  util/hist.h         util/parse-options.h       util/quote.h         util/strfilter.h  util/top.h
> > util/cgroup.h     util/event.h      util/intlist.h      util/perf_regs.h           util/rblist.h        util/strlist.h    util/trace-event.h
> > util/color.h      util/evlist.h     util/levenshtein.h  util/pmu-bison.h           util/run-command.h   util/svghelper.h  util/types.h
> > util/comm.h       util/evsel.h      util/machine.h      util/pmu-flex.h            util/session.h       util/symbol.h     util/unwind.h
> > util/cpumap.h     util/exec_cmd.h   util/map.h          util/pmu.h                 util/sigchain.h      util/target.h     util/util.h
> > 
> > That is pretty healty granularity IMO.
> > 
> > Do we want a separate directory for each one?
> 
> For each single one of them? This would be insane.

Not necessarily, if the number goes up - obviously then we'd also want 
to add some second directory structure to organize them into broad 
categories or so.

> > I don't see a big problem with doing that, but it could be kept in 
> > tools/lib/util/ or tools/lib/core/ as well,
> 
> That's much better :)
> 
> > _as long as they are not lumped together
> 
> Why not a single .a?

Unnecessarily longer build time.

> > That also means that these bits shouldn't really be librarized in 
> > the classical sense into a single .a and linked into whatever tool 
> > uses it, but should be used individually as singular targets with 
> > clean .h interfaces to utilize them topically.
> 
> Yeah, but why?

If a tool uses just a handful of these (hopefully quickly increasing 
number of) facilities then it should not be burdened by building it 
all.

> > That also means that utilities won't run into any dependency 
> > problems, and the build will be faster as well as it all will be a 
> > single dependency graph within a single make session.
> 
> That's maybe the only half-reason for not lumping them together I've 
> read so far. I say half-reason because the preprocessor already will 
> include only stuff it needs. And if that were a problem, glibc 
> would've been multiple libs too.

The preprocessor does nothing with the .a - eliminating extra stuff 
from the .a is a link time step, and that means the whole .a will be 
built first ... just to throw away bits of it.

( Also, arguably, from a sw design POV glibc should probably have been
  multiple libs, but that's water down the bridge. No need to 
  repeat/clone such mistakes though. )

Thanks,

	Ingo

  reply	other threads:[~2013-11-26 18:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 21:56 [PATCH] perf: Move fs.* to generic lib/lk/ Borislav Petkov
2013-11-21  7:34 ` Ingo Molnar
2013-11-21 10:07   ` Borislav Petkov
2013-11-21 11:17     ` Ingo Molnar
2013-11-21 11:30       ` Borislav Petkov
2013-11-21 11:42         ` Ingo Molnar
2013-11-21 12:06           ` Borislav Petkov
2013-11-21 12:39             ` Steven Rostedt
2013-11-21 13:49               ` Borislav Petkov
2013-11-21 13:56                 ` Steven Rostedt
2013-11-21 14:18                   ` Borislav Petkov
2013-11-21 15:12               ` Arnaldo Carvalho de Melo
2013-11-21 15:05             ` Arnaldo Carvalho de Melo
2013-11-21 15:28               ` Borislav Petkov
2013-11-21 17:37                 ` Arnaldo Carvalho de Melo
2013-11-21 19:00                   ` Borislav Petkov
2013-11-22 12:27                   ` Ingo Molnar
2013-11-22 13:50                     ` Borislav Petkov
2013-11-22 15:00                       ` Arnaldo Carvalho de Melo
2013-11-22 15:20                         ` David Ahern
2013-11-22 15:39                       ` Ingo Molnar
2013-11-22 15:54                         ` Ingo Molnar
2013-11-23 13:12                           ` Borislav Petkov
2013-11-26 18:03                             ` Ingo Molnar [this message]
2013-11-27 15:42                               ` Borislav Petkov
2013-11-23 13:04                         ` Borislav Petkov
2013-11-26 18:17                           ` Ingo Molnar
2013-11-27 15:39                             ` Borislav Petkov
2013-11-28 12:16                               ` Borislav Petkov
2013-12-02 20:30                                 ` Arnaldo Carvalho de Melo
2013-11-22 14:57                     ` Arnaldo Carvalho de Melo
2013-11-22 15:43                       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131126180333.GC9958@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@infradead.org \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rric@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox