MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / build_addr_index

Function build_addr_index

src/os/linux/pscallstack.cpp:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 std::vector<std::size_t> idx;
25};
26AddrIndex build_addr_index(const KallsymsResult& ks) {
27 AddrIndex a;
28 a.idx.resize(ks.symbols.size());
29 for (std::size_t i = 0; i < ks.symbols.size(); ++i) a.idx[i] = i;
30 std::sort(a.idx.begin(), a.idx.end(),
31 [&](std::size_t i, std::size_t j) {
32 return ks.symbols[i].address < ks.symbols[j].address;
33 });
34 return a;
35}
36const KallsymsEntry* find_sym_below(const KallsymsResult& ks,
37 const AddrIndex& a, VAddr addr) {
38 if (a.idx.empty()) return nullptr;

Callers 1

walk_kernel_stackFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected