![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <eval-profiler.hh>
Public Member Functions | |
| void | addProfiler (ref< EvalProfiler > profiler) |
| void | preFunctionCallHook (EvalState &state, const Value &v, std::span< Value *const > args, const PosIdx pos) override |
| void | postFunctionCallHook (EvalState &state, const Value &v, std::span< Value *const > args, const PosIdx pos) override |
| Public Member Functions inherited from nix::EvalProfiler | |
| Hooks | getNeededHooks () |
Additional Inherited Members | |
| Public Types inherited from nix::EvalProfiler | |
| enum | Hook { preFunctionCall , postFunctionCall } |
| using | Hooks = std::bitset<numHooks> |
| Static Public Attributes inherited from nix::EvalProfiler | |
| static constexpr std::size_t | numHooks = Hook::postFunctionCall + 1 |
| Protected Member Functions inherited from nix::EvalProfiler | |
| void | invalidateNeededHooks () |
Profiler that invokes multiple profilers at once.
| void nix::MultiEvalProfiler::addProfiler | ( | ref< EvalProfiler > | profiler | ) |
Register a profiler instance.
|
overridevirtual |
Hook called on EvalState::callFunction exit. Gets called only if (getNeededHooks().test(Hook::postFunctionCall)) is true.
| state | Evaluator state. |
| v | Function being invoked. |
| args | Function arguments. |
| pos | Function position. |
Reimplemented from nix::EvalProfiler.
|
overridevirtual |
Hook called in the EvalState::callFunction preamble. Gets called only if (getNeededHooks().test(Hook::preFunctionCall)) is true.
| state | Evaluator state. |
| v | Function being invoked. |
| args | Function arguments. |
| pos | Function position. |
Reimplemented from nix::EvalProfiler.