mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Add environment variable NIX_SHOW_SYMBOLS for dumping the symbol table
This commit is contained in:
parent
41ba5135e0
commit
bb6e6923f2
2 changed files with 13 additions and 0 deletions
|
@ -1811,6 +1811,7 @@ void EvalState::printStats()
|
|||
gc.attr("totalBytes", totalBytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (countCalls) {
|
||||
{
|
||||
auto obj = topObj.object("primops");
|
||||
|
@ -1846,6 +1847,11 @@ void EvalState::printStats()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getEnv("NIX_SHOW_SYMBOLS", "0") != "0") {
|
||||
auto list = topObj.list("symbols");
|
||||
symbols.dump([&](const std::string & s) { list.elem(s); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue