[all-commits] [llvm/llvm-project] 6c12ae: Exposes interface to free up caching data structur...

Hyoun Kyu Cho via All-commits all-commits at lists.llvm.org
Mon May 23 20:23:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c12ae8163c77c508aa846958360aa96d1c2c00d
      https://github.com/llvm/llvm-project/commit/6c12ae8163c77c508aa846958360aa96d1c2c00d
  Author: Hyoun Kyu Cho <netforce at google.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp

  Log Message:
  -----------
  Exposes interface to free up caching data structure in DWARFDebugLine and DWARFUnit for memory management

This is minimum changes extracted from https://reviews.llvm.org/D78950. The old patch tried to add LRU eviction of caching data structure. Due to multiple layers of interfaces that users could be using, it was not clear where to put the functionality. While we work out on where to put that functionality, it'll be great to add this minimum interface change so that the user could implement their own memory management. More specifically:

* Add a clearLineTable method for DWARFDebugLine which erases the given offset from the LineTableMap.
* DWARFDebugContext adds the clearLineTableForUnit method that leverages clearLineTable to remove the object corresponding to a given compile unit, for memory management purposes. When it is referred to again, the line table object will be repopulated.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D90006




More information about the All-commits mailing list