Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500508

Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf
Date 2016-10-13 21:20 +0200
Message-ID <srTHQ-7Il-19@gated-at.bofh.it> (permalink)
References <srM3D-2I3-3@gated-at.bofh.it> <srM3E-2I3-51@gated-at.bofh.it> <srSLM-78p-15@gated-at.bofh.it> <srTot-7lC-7@gated-at.bofh.it> <srTot-7lC-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Thu, Oct 13, 2016 at 03:51:35PM -0300, Arnaldo Carvalho de Melo escreveu:
> So we need:
> 
> [acme@jouet linux]$ git diff
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 8cfc310d4358..cffdd9cf3ebf 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -366,8 +366,10 @@ ifndef NO_SDT
>  endif
>  
>  ifdef PERF_HAVE_JITDUMP
> +  ifndef NO_LIBELF
>      $(call detected,CONFIG_JITDUMP)
>      CFLAGS += -DHAVE_JITDUMP
> +  endif
>  endif
>  
>  ifeq ($(ARCH),powerpc)
> [acme@jouet linux]$ 
> 
> To get that fixed.
> 
> Please let me know if this suits your needs.
> 
> I'll now try building with elfutils static libraries to see if in that case it
> all gets linked.

After installing these packages, on fedora, i.e. installing what is
needed to statically link against libelf:

  elfutils-devel-static
  elfutils-libelf-devel-static
  zlib-static

Then it all works, libelf is statically linked and we also statically
link the jitdump code:

  $ make -C tools/perf LDFLAGS=-static O=/tmp/build/perf install-bin
  $ grep libelf /tmp/build/perf/FEATURE-DUMP 
  feature-libelf=1
  feature-libelf-getphdrnum=1
  feature-libelf-gelf_getnote=1
  feature-libelf-getshdrstrndx=1
  feature-libelf-mmap=1
  $
  
And:

[acme@jouet linux]$ size /tmp/build/perf/perf
   text	   data	    bss	    dec	    hex	filename
4478822	 581702	23919240	28979764	1ba3234	/tmp/build/perf/perf
[acme@jouet linux]$ 
[acme@jouet linux]$ file /tmp/build/perf/perf
/tmp/build/perf/perf: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=c2950590a0f24d76baa0ce4896414e5d523fefba, not stripped
[acme@jouet linux]$ 
[acme@jouet linux]$ nm /tmp/build/perf/perf | grep jit
00000000005007f0 T jit_process
0000000000501920 T jit_write_elf
0000000000431a50 t perf_event__jit_repipe_mmap
0000000000431b20 t perf_event__jit_repipe_mmap2
[acme@jouet linux]$ 

- Arnaldo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] perf/jit: various improvements Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
  [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Nilay Vaish <nilayvaish@gmail.com> - 2016-10-13 22:30 +0200
      Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 13:20 +0200
        Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-14 15:30 +0200
          Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 17:30 +0200
            Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-17 16:00 +0200
    [tip:perf/core] perf jit: Improve error messages from JVMTI tip-bot for Stephane Eranian <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 5/9] perf/jit: do not assume pgoff is zero Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Do not assume pgoff is zero tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 8/9] perf/jit: Check JITHEADER_VERSION Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Check JITHEADER_VERSION tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 3/9] perf/jit: remove unecessary padding in jitdump file Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Remove unecessary padding in jitdump file tip-bot for Stephane Eranian <tipbot@zytor.com> - 2016-10-24 21:00 +0200
  [PATCH 6/9] perf/jit: add unwinding support Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Add unwinding support tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 2/9] perf/jit: enable jitdump support without dwarf Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 20:20 +0200
      Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:00 +0200
        Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:20 +0200
          Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:50 +0200
      Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:40 +0200
    [tip:perf/core] perf jit: Enable jitdump support without dwarf tip-bot for Maciej Debski <tipbot@zytor.com> - 2016-10-24 21:00 +0200

csiph-web