All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, acme@infradead.org,
	Andi Kleen <ak@linux.intel.com>,
	Namhyung Kim <namhyung.kim@lge.com>,
	peterz@infradead.org
Subject: Re: [PATCH] RFC: perf, tools: Move gtk browser into separate perfgtk executable
Date: Mon, 5 Aug 2013 10:16:41 +0200	[thread overview]
Message-ID: <20130805081641.GA24808@gmail.com> (raw)
In-Reply-To: <1375669364-13838-1-git-send-email-andi@firstfloor.org>


* Andi Kleen <andi@firstfloor.org> wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> By default perf currently links with the GTK2 gui. This pulls
> in a lot of external libraries. It also causes dependency
> problems for distribution packages: simply installing perf
> requires pulling in GTK2 with all its dependencies.
> 
> I think the UI is valuable, but it shouldn't be everywhere.
> 
> The interfaces between the main perf and the GTK2 perf are
> already quite clean, so it's very straight forward to just
> add a few weak stubs and then generate two executables:
> perf and perfgtk
> 
> The only difference is that the gtk version links in the
> GTK code and overrides the weak stubs.
> (so everything is still only compiled once)
> 
> I currently gave it the preliminary name "perfgtk".
> 
> This cuts down the library dependencies on the main perf
> dramatically. It also completely eliminates the GTK2_SUPPORT
> ifdef.
> 
> % ldd ./perf | wc -l
> 18
> % ldd ./perfgtk | wc -l
> 53

If you want fewer dependencies then build with 'make NO_GTK=1'.

Furthermore, what really matters in practice is binary size - and the GKT 
UI frontend code isn't really big:

 comet:~/tip/tools/perf> ls -l perf.gtk perf.nogtk
 -rwxrwxr-x 1 mingo mingo 2525416 Aug  5 10:09 perf.gtk.stripped
 -rwxrwxr-x 1 mingo mingo 2497480 Aug  5 10:09 perf.nogtk.stripped

that's only a 1% difference ...

So this is not a good idea, as it breaks the single binary structure of 
perf, which is a rather powerful concept that has served us really well in 
the past.

Thanks,

	Ingo

  reply	other threads:[~2013-08-05  8:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05  2:22 [PATCH] RFC: perf, tools: Move gtk browser into separate perfgtk executable Andi Kleen
2013-08-05  8:16 ` Ingo Molnar [this message]
2013-08-05  8:23   ` Christoph Hellwig
2013-08-05  8:31     ` Ingo Molnar
2013-08-05  8:34       ` Christoph Hellwig
2013-08-05  9:08         ` Ingo Molnar
2013-08-06  6:19           ` Christoph Hellwig
2013-08-12 18:19             ` Ingo Molnar
2013-08-12 19:25               ` Vince Weaver
2013-08-13 10:48                 ` Ingo Molnar
2013-08-13 12:11                   ` Arnaldo Carvalho de Melo
2013-08-13 16:00                     ` Ingo Molnar
2013-08-13 21:57                       ` Vince Weaver
2013-08-13 22:17                         ` Andi Kleen
2013-08-14 14:13                         ` Arnaldo Carvalho de Melo
2013-08-14 14:20                           ` Ingo Molnar
2013-08-13 14:03                   ` Vince Weaver
2013-08-13 16:04                     ` Ingo Molnar
2013-08-05  9:08     ` Namhyung Kim
2013-08-05  9:12       ` Ingo Molnar
2013-08-05  9:18         ` Pekka Enberg
2013-08-05 19:10       ` Andi Kleen

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=20130805081641.GA24808@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.