Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
function-trace.hh
Go to the documentation of this file.
1#pragma once
3
4#include "nix/expr/eval.hh"
6
7namespace nix {
8
9class FunctionCallTrace : public EvalProfiler
10{
11 Hooks getNeededHooksImpl() const override
12 {
13 return Hooks().set(preFunctionCall).set(postFunctionCall);
14 }
15
16public:
17 FunctionCallTrace() = default;
18
19 [[gnu::noinline]] void
20 preFunctionCallHook(EvalState & state, const Value & v, std::span<Value * const> args, const PosIdx pos) override;
21 [[gnu::noinline]] void
22 postFunctionCallHook(EvalState & state, const Value & v, std::span<Value * const> args, const PosIdx pos) override;
23};
24
25} // namespace nix
Definition eval-profiler.hh:23
Definition eval.hh:420
void preFunctionCallHook(EvalState &state, const Value &v, std::span< Value *const > args, const PosIdx pos) override
Definition function-trace.cc:6
void postFunctionCallHook(EvalState &state, const Value &v, std::span< Value *const > args, const PosIdx pos) override
Definition function-trace.cc:14
Definition pos-idx.hh:10
Definition value.hh:1166