1. 18 2月, 2014 1 次提交
  2. 17 1月, 2014 1 次提交
  3. 20 12月, 2013 1 次提交
    • A
      perf symbols: Add 'machine' member to struct addr_location · cc22e575
      Arnaldo Carvalho de Melo 提交于
      The addr_location struct should fully qualify an address, and to do that
      it should have in it the machine where the thread was found.
      
      Thus all functions that receive an addr_location now don't need to also
      receive a 'machine', those functions just need to access al->machine
      instead, just like it does with the other parts of an address location:
      al->thread, al->map, etc.
      
      Cc: Adrian 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@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-o51iiee7vyq4r3k362uvuylg@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cc22e575
  4. 13 12月, 2013 1 次提交
  5. 11 12月, 2013 1 次提交
  6. 28 11月, 2013 2 次提交
  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. 11 10月, 2013 1 次提交
  9. 09 10月, 2013 2 次提交
  10. 08 8月, 2013 1 次提交
  11. 01 4月, 2013 1 次提交
  12. 27 3月, 2013 1 次提交
  13. 01 2月, 2013 1 次提交
  14. 25 1月, 2013 1 次提交
  15. 09 12月, 2012 1 次提交
  16. 15 11月, 2012 1 次提交
  17. 09 11月, 2012 1 次提交
  18. 29 10月, 2012 5 次提交
  19. 29 9月, 2012 1 次提交
  20. 24 9月, 2012 1 次提交
  21. 11 9月, 2012 2 次提交
  22. 09 9月, 2012 1 次提交
  23. 08 9月, 2012 1 次提交
    • I
      perf tools: include basename for non-glibc systems · b771a830
      Irina Tirdea 提交于
      perf uses the glibc version of basename(), by defining _GNU_SOURCE,
      including string.h and not including libgen.h. The glibc version of
      basename is better than the POSIX version since it does not modify its
      argument.
      
      Android has only one version of basename which is defined in libgen.h.
      This version is the same as the glibc version.
      
      Error on Android:
      util/annotate.c: In function 'symbol__annotate_printf':
      util/annotate.c:503:3: error: implicit declaration of function 'basename'
      [-Werror=implicit-function-declaration]
      util/annotate.c:503:3: error: nested extern declaration of 'basename'
      [-Werror=nested-externs]
      util/annotate.c:503:14: error: assignment makes pointer from integer without
      a cast [-Werror]
      
      On Android libgen.h should be included to define basename.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      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/1347065004-15306-6-git-send-email-irina.tirdea@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b771a830
  24. 14 8月, 2012 7 次提交
    • 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
    • C
      perf symbols: Track symtab_type of vmlinux · 21ea4539
      Cody P Schafer 提交于
      Previously, symtab_type would have been left at 0, or KALLSYMS, which is
      not quite accurate.
      
      Introduce DSO_BINARY_TYPE__VMLINUX[_GUEST].
      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-11-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      21ea4539
    • C
      perf symbols: Remove unused 'end' arg in kallsyms parse cb · 82151520
      Cody P Schafer 提交于
      kallsyms__parse() takes a callback that is called on every discovered
      symbol. As /proc/kallsyms does not supply symbol sizes, the callback was
      simply called with end=start, faking the symbol size to 1.
      
      All of the callbacks (there are 2) used in calls to kallsyms__parse()
      are _only_ used as callbacks for kallsyms__parse().
      
      Given that kallsyms__parse() lacks real information about what
      end/length should be, don't make up a length in kallsyms__parse().
      Instead have the callbacks handle guessing the length.
      
      Also relocate a comment regarding symbol creation to the callback which
      does symbol creation (kallsyms__parse() is not in general used to create
      symbols).
      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-3-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      82151520
  25. 10 8月, 2012 2 次提交