Messages in this thread | | | Date | Tue, 6 Dec 2016 18:02:12 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH v3 10/30] perf clang: Add builtin clang support ant test case |
| |
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]$
| |