From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbcLFVJK (ORCPT ); Tue, 6 Dec 2016 16:09:10 -0500 Received: from mail.kernel.org ([198.145.29.136]:48282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbcLFVJJ (ORCPT ); Tue, 6 Dec 2016 16:09:09 -0500 Date: Tue, 6 Dec 2016 18:02:12 -0300 From: Arnaldo Carvalho de Melo To: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo , Wang Nan , ast@fb.com, lizefan@huawei.com, hekuang@huawei.com, Ingo Molnar , linux-kernel@vger.kernel.org, pi3orama@163.com, joe@ovn.org, Jiri Olsa Subject: Re: [PATCH v3 10/30] perf clang: Add builtin clang support ant test case Message-ID: <20161206210212.GF8257@kernel.org> References: <20161126070354.141764-1-wangnan0@huawei.com> <20161126070354.141764-11-wangnan0@huawei.com> <20161202154440.GB5931@redhat.com> <20161205165055.GB79989@ast-mbp.thefacebook.com> <20161206191934.GA8257@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161206191934.GA8257@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Dec 06, 2016 at 04:19:34PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Dec 05, 2016 at 08:51:01AM -0800, Alexei Starovoitov escreveu: > > On Fri, Dec 02, 2016 at 01:44:40PM -0200, Arnaldo Carvalho de Melo wrote: > > > make LIBCLANGLLVM=1 O=/tmp/build/perf -C tools/perf install-bin > > > > > > the resulting binary: > > > > > > [acme@jouet linux]$ > > > [acme@jouet linux]$ ls -la ~/bin/perf > > > -rwxr-xr-x. 2 acme acme 131689136 Dec 2 12:31 /home/acme/bin/perf > > > [acme@jouet linux]$ ls -lah ~/bin/perf > > > -rwxr-xr-x. 2 acme acme 126M Dec 2 12:31 /home/acme/bin/perf > > > [acme@jouet linux]$ > > > > > > Huge, after stripping it: > > > > > > [acme@jouet linux]$ ls -la /tmp/perf > > > -rwxr-xr-x. 1 root root 76759056 Dec 2 12:33 /tmp/perf > > > [acme@jouet linux]$ ls -lah /tmp/perf > > > -rwxr-xr-x. 1 root root 74M Dec 2 12:33 /tmp/perf > > > [acme@jouet linux]$ > > > > > > Still huge :-\ > > > > yeah. it's kinda high. I'm guessing rpm llvm libs are in debug mode. > > Try llvm-config --build-mode --assertion-mode > > it should be Release OFF > > It was ON, rebuilding it with > > $ cmake -DCMAKE_BUILD_TYPE=Release /home/acme/git/llvm > $ make -j4 > > Will take a (another) while :-) Almost halved the size: [acme@jouet build]$ llvm-config --build-mode --assertion-mode Release OFF [acme@jouet build]$ clang -v clang version 4.0.0 (http://llvm.org/git/clang.git b7a0d79a6691813bf7d6ade1b4e8b21fd502f50a) (http://llvm.org/git/llvm.git 3a783f8716bfc621355e8ae61daf3a2093c341fc) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.2.1 Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.2.1 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 [acme@jouet build]$ llvm-config --version 4.0.0svn [acme@jouet build]$ [acme@jouet linux]$ ls -la /tmp/perf -rwxr-xr-x. 1 acme acme 63641016 Dec 6 17:58 /tmp/perf [acme@jouet linux]$ size /tmp/perf text data bss dec hex filename 40877921 1577232 24065712 66520865 3f70721 /tmp/perf [acme@jouet linux]$ strip /tmp/perf [acme@jouet linux]$ ls -la /tmp/perf -rwxr-xr-x. 1 acme acme 42460904 Dec 6 17:58 /tmp/perf [acme@jouet linux]$ ls -lah /tmp/perf -rwxr-xr-x. 1 acme acme 41M Dec 6 17:58 /tmp/perf [acme@jouet linux]$ size /tmp/perf text data bss dec hex filename 40877921 1577232 24065712 66520865 3f70721 /tmp/perf [acme@jouet linux]$