llvm/llvm-project

[BOLT] Evaluate and speedup discoverFileObjects

Open

#90,661 建立於 2024年4月30日

在 GitHub 查看
 (14 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
BOLTgood first issuehelp wanted

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Operations with symbols such as name lookup are expensive and some binaries have millions of symbols, so it makes sense to try to reduce the symbol-related overheads.

Measure how much the following cost and refactor/eliminate:

  1. Checks for symbol name being equal to __asan_init and __llvm_coverage_mapping for every single symbol: https://github.com/llvm/llvm-project/blob/a1423ba4278775472523fed074de6dbdfd01898a/bolt/lib/Rewrite/RewriteInstance.cpp#L824-L837
  2. FileName set for every local function symbol (with O(1M) for large binaries) while we can instead use file symbol lookup with O(log N_Syms) cost and FileSyms memory cost https://github.com/llvm/llvm-project/pull/89088
  3. Merge iteration over two loops over symbols into one: https://github.com/llvm/llvm-project/blob/a1423ba4278775472523fed074de6dbdfd01898a/bolt/lib/Rewrite/RewriteInstance.cpp#L824 and https://github.com/llvm/llvm-project/blob/a1423ba4278775472523fed074de6dbdfd01898a/bolt/lib/Rewrite/RewriteInstance.cpp#L876

貢獻者指南