lix/src/libexpr
Eelco Dolstra e82767910c Add some basic profiling support to the evaluator
Setting the environment variable NIX_COUNT_CALLS to 1 enables some
basic profiling in the evaluator.  It will count calls to functions
and primops as well as evaluations of attributes.

For example, to see where evaluation of a NixOS configuration spends
its time:

$ NIX_SHOW_STATS=1 NIX_COUNT_CALLS=1 ./src/nix-instantiate/nix-instantiate '<nixos>' -A system --readonly-mode
...
calls to 39 primops:
    239532 head
    233962 tail
    191252 hasAttr
...
calls to 1595 functions:
    224157 `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/lists.nix:17:19'
    221767 `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/lists.nix:17:14'
    221767 `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/lists.nix:17:10'
...
evaluations of 7088 attributes:
    167377 undefined position
    132459 `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/attrsets.nix:119:41'
     47322 `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/attrsets.nix:13:21'
...
2012-08-12 23:29:28 -04:00
..
attr-path.cc Fix compilation on FreeBSD 2012-03-05 22:04:40 +01:00
attr-path.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
common-opts.cc Fix error message 2012-02-09 18:56:48 +01:00
common-opts.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
eval-inline.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
eval.cc Add some basic profiling support to the evaluator 2012-08-12 23:29:28 -04:00
eval.hh Add some basic profiling support to the evaluator 2012-08-12 23:29:28 -04:00
get-drvs.cc * Inline some functions and get rid of the indirection through 2012-02-04 13:50:25 +00:00
get-drvs.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
lexer.l * Add a Nix expression search path feature. Paths between angle 2011-08-06 16:05:24 +00:00
Makefile.am * Inline some functions and get rid of the indirection through 2012-02-04 13:50:25 +00:00
names.cc * Export the nix-env derivation name parsing and version comparison 2008-07-01 10:10:32 +00:00
names.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
nix.sdf First attempt to update Nix SDF grammar to match the actual bison grammar 2008-06-04 14:36:46 +00:00
nixexpr.cc * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
nixexpr.hh Add some basic profiling support to the evaluator 2012-08-12 23:29:28 -04:00
parser.y Use Bison 2.5 2012-04-13 14:28:26 +02:00
primops.cc Add some basic profiling support to the evaluator 2012-08-12 23:29:28 -04:00
symbol-table.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value-to-xml.cc Fix compilation on FreeBSD 2012-03-05 22:04:40 +01:00
value-to-xml.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00