Skip to content
  1. May 18, 2018
  2. May 14, 2018
  3. May 10, 2018
  4. May 01, 2018
    • David Blaikie's avatar
      llvm-symbolizer: Handle function definitions nested within other functions · aa537da8
      David Blaikie authored
      LLVM always puts function definition DIEs at the top level, but under
      some circumstances GCC does not (at least in this case with member
      functions of a function-local type).
      
      To ensure that doesn't appear as though the local type's member function
      is unduly inlined within the outer function - ensure the inline
      discovery DIE parent walk stops at the first DW_TAG_subprogram.
      
      llvm-svn: 331291
      aa537da8
  5. Apr 15, 2018
  6. Mar 21, 2018
  7. Mar 14, 2018
    • Pavel Labath's avatar
      DWARF: Unify form size handling code · 322711f5
      Pavel Labath authored
      Summary:
      This patch replaces the two switches which are deducing the size of
      various forms with a single implementation. I have put the new
      implementation into BinaryFormat, to avoid introducing dependencies
      between the two independent libraries (DebugInfo and CodeGen) that need
      this functionality.
      
      Reviewers: aprantl, JDevlieghere, dblaikie
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D44418
      
      llvm-svn: 327486
      322711f5
  8. Feb 13, 2018
    • David Blaikie's avatar
      Revert "Rewrite the cached map used for locating the most precise DIE among... · 3b6de6fe
      David Blaikie authored
      Revert "Rewrite the cached map used for locating the most precise DIE among inlined subroutines for a given address."
      
      Seeing some inlining missing in internal uses of symbolizer. I'll work
      on a reproduction, tests, improvements & recommit as soon as possible.
      
      (Chandler would like it to be known that this improvement did make
      check-llvm 4x faster... - so there's certainly some fairly good
      motivation to push on fixing/figuring this out & getting it back in)
      
      This reverts commit r321345.
      
      llvm-svn: 324981
      3b6de6fe
  9. Jan 29, 2018
  10. Jan 25, 2018
  11. Dec 22, 2017
    • Chandler Carruth's avatar
      Rewrite the cached map used for locating the most precise DIE among · 54a5ad36
      Chandler Carruth authored
      inlined subroutines for a given address.
      
      This is essentially the hot path of llvm-symbolizer when extracting
      inlined frames during symbolization. Previously, we would read every
      subprogram and every inlined subroutine, building a std::map across the
      entire PC space to the best DIE, and then do only a handful of queries
      as we symbolized a backtrace. A huge fraction of the time was spent
      building the map itself.
      
      This patch changes it two a two-level system. First, we just build a map
      from PC-interval to DWARF subprograms. These are required to be disjoint
      and so constructing this is pretty easy. Second, we build a map *just*
      for the inlined subroutines within the subprogram containing the query
      address. This allows us to look at far fewer DIEs and build a *much*
      smaller set of cached maps in the llvm-symbolizer case where only a few
      address get symbolized during the entire run.
      
      It also builds both interval maps in a very different way. It constructs
      a single flat vector of pairs that maps from offset -> index. The
      indices point into collections of DIE objects, but can also be
      "tombstones" (-1) to mark gaps. In the case of subprograms, this mostly
      just simplifies the data structure a bit. For inlined subroutines,
      because we carefully split them as we build the map, we end up in many
      cases having no holes and not having to store both start and stop
      offsets.
      
      Finally, the PC ranges for the inlined subroutines are compressed into
      32-bits by making them relative to the base PC of the outer subprogram.
      This means that if you have a single function body with over 2gb of
      executable code in it, we will stop mapping address past the first 2gb
      of that function into inlined subroutines and just give you the
      subprogram. This doesn't seem like a problem. ;]
      
      All of this combines to make llvm-symbolizer *well* over 2x faster for
      symbolizing backtraces out of LLVM's unittests. Death-test heavy unit
      tests are running >2x faster. I'm still going to look at completely
      disabling symbolization there, but figured while I had a good benchmark
      we should make symbolization a bit better.
      
      Sadly, the logic to build the flat interval map for the inlined
      subroutines is fairly complex. I'm not super happy about this and
      welcome any simplifying suggestions.
      
      Huge thanks to Dave Blaikie who helped walk me through what the various
      things I needed to do in DWARF to make this work.
      
      Differential Revision: https://reviews.llvm.org/D40987
      
      llvm-svn: 321345
      54a5ad36
  12. Dec 21, 2017
  13. Oct 25, 2017
  14. Oct 03, 2017
  15. Sep 19, 2017
  16. Sep 04, 2017
  17. Aug 02, 2017
    • David Blaikie's avatar
      DebugInfo: Test & handle (differently) non-zero DW_AT_ranges_base · 22dc4474
      David Blaikie authored
      Followup to r309570, fixing it slightly differently (ranges_base and
      addr_base should never be read from a DWO file - so there shouldn't be
      any issue with 'overriding' the values - conditionalize the code and
      assert that the values aren't being overriden).
      
      llvm-svn: 309879
      22dc4474
  18. Aug 01, 2017
  19. Jul 31, 2017
  20. Jul 20, 2017
    • Rafael Espindola's avatar
      Use delegation instead of inheritance. · c398e67f
      Rafael Espindola authored
      This changes DwarfContext to delegate to DwarfObject instead of having
      pure virtual methods.
      
      With this DwarfContextInMemory is replaced with an implementation of
      DwarfObject that is local to a .cpp file.
      
      llvm-svn: 308543
      c398e67f
  21. Jun 29, 2017
  22. Jun 27, 2017
  23. Jun 26, 2017
  24. Jun 23, 2017
  25. Jun 06, 2017
    • Chandler Carruth's avatar
      Sort the remaining #include lines in include/... and lib/.... · 6bda14b3
      Chandler Carruth authored
      I did this a long time ago with a janky python script, but now
      clang-format has built-in support for this. I fed clang-format every
      line with a #include and let it re-sort things according to the precise
      LLVM rules for include ordering baked into clang-format these days.
      
      I've reverted a number of files where the results of sorting includes
      isn't healthy. Either places where we have legacy code relying on
      particular include ordering (where possible, I'll fix these separately)
      or where we have particular formatting around #include lines that
      I didn't want to disturb in this patch.
      
      This patch is *entirely* mechanical. If you get merge conflicts or
      anything, just ignore the changes in this patch and run clang-format
      over your #include lines in the files.
      
      Sorry for any noise here, but it is important to keep these things
      stable. I was seeing an increasing number of patches with irrelevant
      re-ordering of #include lines because clang-format was used. This patch
      at least isolates that churn, makes it easy to skip when resolving
      conflicts, and gets us to a clean baseline (again).
      
      llvm-svn: 304787
      6bda14b3
    • Wolfgang Pieb's avatar
      [DWARF] Adding support for the DWARF v5 string offsets table (consumer/reader part only). · 77d3e938
      Wolfgang Pieb authored
      Reviewers: dblaikie, aprantl
      
      Differential Revision: https://reviews.llvm.org/D32779
      
      llvm-svn: 304759
      77d3e938
  26. May 23, 2017
  27. May 22, 2017
  28. May 20, 2017
  29. May 16, 2017
  30. Apr 24, 2017
    • George Rimar's avatar
      [DWARF] - Take relocations in account when extracting ranges from .debug_ranges · ca53211b
      George Rimar authored
      I found this when investigated "Bug 32319 - .gdb_index is broken/incomplete" for LLD.
      
      When we have object file with .debug_ranges section it may be filled with zeroes.
      Relocations are exist in file to relocate this zeroes into real values later, but until that
      a pair of zeroes is treated as terminator. And DWARF parser thinks there is no ranges at all
      when I am trying to collect address ranges for building .gdb_index.
      
      Solution implemented in this patch is to take relocations in account when parsing ranges.
      
      Differential revision: https://reviews.llvm.org/D32228
      
      llvm-svn: 301170
      ca53211b
  31. Apr 19, 2017
Loading