mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
* Keep more statistics about stack space usage.
* Reduce stack space usage.
This commit is contained in:
parent
b7b3dd55f9
commit
f3dc7ab877
2 changed files with 78 additions and 43 deletions
|
@ -144,10 +144,6 @@ public:
|
|||
private:
|
||||
SrcToStore srcToStore;
|
||||
|
||||
unsigned long nrValues;
|
||||
unsigned long nrEnvs;
|
||||
unsigned long nrEvaluated;
|
||||
|
||||
bool allowUnsafeEquality;
|
||||
|
||||
ATermMap parseTrees;
|
||||
|
@ -155,6 +151,7 @@ private:
|
|||
public:
|
||||
|
||||
EvalState();
|
||||
~EvalState();
|
||||
|
||||
/* Evaluate an expression read from the given file to normal
|
||||
form. */
|
||||
|
@ -242,6 +239,17 @@ public:
|
|||
|
||||
/* Print statistics. */
|
||||
void printStats();
|
||||
|
||||
private:
|
||||
|
||||
unsigned long nrValues;
|
||||
unsigned long nrEnvs;
|
||||
unsigned long nrEvaluated;
|
||||
unsigned int recursionDepth;
|
||||
unsigned int maxRecursionDepth;
|
||||
char * deepestStack; /* for measuring stack usage */
|
||||
|
||||
friend class RecursionCounter;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue