1. 17 12月, 2014 1 次提交
  2. 19 11月, 2014 1 次提交
  3. 24 7月, 2014 1 次提交
  4. 17 7月, 2014 1 次提交
  5. 28 12月, 2013 1 次提交
  6. 05 12月, 2013 1 次提交
  7. 14 10月, 2013 2 次提交
    • A
      perf buildid-cache: Add ability to add kcore to the cache · fc1b691d
      Adrian Hunter 提交于
      kcore can be used to view the running kernel object code.  However,
      kcore changes as modules are loaded and unloaded, and when the kernel
      decides to modify its own code.  Consequently it is useful to create a
      copy of kcore at a particular time.  Unlike vmlinux, kcore is not unique
      for a given build-id.  And in addition, the kallsyms and modules files
      are also needed.  The tool therefore creates a directory:
      
      	~/.debug/[kernel.kcore]/<build-id>/<YYYYmmddHHMMSShh>
      
      which contains: kcore, kallsyms and modules.
      
      Note that the copied kcore contains only code sections.  See the
      kcore_copy() function for how that is determined.
      
      The tool will not make additional copies of kcore if there is already
      one with the same modules at the same addresses.
      
      Currently, perf tools will not look for kcore in the cache.  That is
      addressed in another patch.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/525BF849.5030405@intel.com
      [ renamed 'index' to 'idx' to avoid shadowing string.h symbol in f12,
        use at least one member initializer when initializing a struct to
        zeros, also to fix the build on f12 ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fc1b691d
    • A
      perf symbols: Workaround objdump difficulties with kcore · afba19d9
      Adrian Hunter 提交于
      The objdump tool fails to annotate module symbols when looking at kcore.
      
      Workaround this by extracting object code from kcore and putting it in a
      temporary file for objdump to use instead.
      
      The temporary file is created to look like kcore but contains only the
      function being disassembled.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1381320078-16497-3-git-send-email-adrian.hunter@intel.com
      [ Renamed 'index' to 'idx' to avoid shadowing string.h's 'index' in Fedora 12,
        Replace local with variable length with malloc/free to fix build in Fedora 12 ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      afba19d9
  8. 08 8月, 2013 1 次提交
  9. 25 1月, 2013 1 次提交
  10. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  11. 14 8月, 2012 5 次提交
    • C
      perf symbols: Use both runtime and debug images · 3aafe5ae
      Cody P Schafer 提交于
      We keep both a 'runtime' elf image as well as a 'debug' elf image around
      and generate symbols by looking at both of these.
      
      This eliminates the need for the want_symtab/goto restart mechanism
      combined with iterating over and reopening the elf images a second time.
      
      Also give dso__synthsize_plt_symbols() the runtime image (which has
      dynsyms) instead of the symbol image (which may only have a symtab and
      no dynsyms).
      
      Previously if a debug image was found all runtime images were ignored.
      
      This fixes 2 issues:
      
       - Symbol resolution to failure on PowerPC systems with debug symbols
         installed, as the debug images lack a '.opd' section which contains
         function descriptors.
      
       - On all archs, plt synthesis failed when a debug image was loaded and
         that debug image lacks a dynsym section while a runtime image has a
         dynsym section.
      
      Assumptions:
      
       - If a .opd section exists, it is contained in the highest priority
         image with a dynsym section.
      
       - This generally implies that the debug image lacks a dynsym section
         (ie: it is marked as NO_BITS).
      Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Hansen <dave@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matt Hellsley <matthltc@us.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1344637382-22789-17-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3aafe5ae
    • C
      perf symbols: Convert dso__load_syms to take 2 symsrc's · 261360b6
      Cody P Schafer 提交于
      To properly handle platforms with an opd section, both a runtime image
      (which contains the opd section but possibly lacks symbols) and a symbol
      image (which probably lacks an opd section but has symbols).
      
      The next patch ("perf symbol: use both runtime and debug images")
      adjusts the callsite in dso__load() to take advantage of being able to
      pass both runtime & debug images.
      
      Assumptions made here:
      
       - The opd section, if it exists in the runtime image, has headers in
         both the runtime image and the debug/syms image.
      
       - The index of the opd section (again, only if it exists in the runtime
         image) is the same in both the runtime and debug/symbols image.
      
      Both of these are true on RHEL, but it is unclear how accurate they are
      in general (on platforms with function descriptors in opd sections).
      Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Hansen <dave@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matt Hellsley <matthltc@us.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1344637382-22789-16-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      261360b6
    • C
      perf symbols: Factor want_symtab out of dso__load_sym() · d26cd12b
      Cody P Schafer 提交于
      Only one callsite of dso__load_sym() uses the want_symtab functionality,
      so place the logic at the callsite instead of within dso__load_sym().
      
      This sets us up for removal of want_symtab completely once we keep
      multiple elf handles (within symsrc's) around.
      
      Setup for the later patch
      
      "perf symbols: Use both runtime and debug images"
      Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Hansen <dave@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matt Hellsley <matthltc@us.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1344637382-22789-15-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d26cd12b
    • C
      perf symbols: Switch dso__synthesize_plt_symbols() to use symsrc · a44f605b
      Cody P Schafer 提交于
      Previously dso__synthesize_plt_symbols() was reopening the elf file to
      obtain dynsyms from it. Rather than reopen the file, use the already
      opened reference within the symsrc to access it.
      
      Setup for the later patch
      
      "perf symbols: Use both runtime and debug images"
      Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Hansen <dave@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matt Hellsley <matthltc@us.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1344637382-22789-14-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a44f605b
    • C
      perf symbols: Introduce symsrc structure. · b68e2f91
      Cody P Schafer 提交于
      Factors opening of certain sections & tracking certain elf info into an
      external structure.
      
      The goal here is to keep multiple elfs (and their looked up
      sections/indexes) around during the symbol generation process (in
      dso__load()).
      
      We need this to properly resolve symbols on PPC due to the use of
      function descriptors & the .opd section (ie: symbols which are functions
      don't point to their actual location, they point to their function
      descriptor in .opd which contains their actual location.
      
      It would be possible to just keep the (Elf *) around, but then we'd end
      up with duplicate code for looking up the same sections and checking for
      the existence of an important section wouldn't be as clean (and we need
      to keep the Elf stuff confined to symtab-elf.c).
      
      Utilized by the later patch
      "perf symbols: Use both runtime and debug images"
      Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Hansen <dave@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Matt Hellsley <matthltc@us.ibm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1344637382-22789-12-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b68e2f91
  12. 10 8月, 2012 2 次提交