[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
244/376: Show total allocations
From: |
Ludovic Courtès |
Subject: |
244/376: Show total allocations |
Date: |
Wed, 28 Jan 2015 22:05:21 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 14188069692215264eb1a25d60920fac7117a2ef
Author: Eelco Dolstra <address@hidden>
Date: Sun Oct 5 00:39:28 2014 +0200
Show total allocations
---
src/libexpr/eval.cc | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 46a4259..1eeb809 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1450,17 +1450,18 @@ void EvalState::printStats()
getrusage(RUSAGE_SELF, &buf);
float cpuTime = buf.ru_utime.tv_sec + ((float) buf.ru_utime.tv_usec /
1000000);
+ uint64_t bEnvs = nrEnvs * sizeof(Env) + nrValuesInEnvs * sizeof(Value *);
+ uint64_t bLists = nrListElems * sizeof(Value *);
+ uint64_t bValues = nrValues * sizeof(Value);
+ uint64_t bAttrsets = nrAttrsets * sizeof(Bindings) + nrAttrsInAttrsets *
sizeof(Attr);
+
printMsg(v, format(" time elapsed: %1%") % cpuTime);
printMsg(v, format(" size of a value: %1%") % sizeof(Value));
- printMsg(v, format(" environments allocated: %1% (%2% bytes)")
- % nrEnvs % (nrEnvs * sizeof(Env) + nrValuesInEnvs * sizeof(Value *)));
- printMsg(v, format(" list elements: %1% (%2% bytes)")
- % nrListElems % (nrListElems * sizeof(Value *)));
+ printMsg(v, format(" environments allocated: %1% (%2% bytes)") % nrEnvs %
bEnvs);
+ printMsg(v, format(" list elements: %1% (%2% bytes)") % nrListElems %
bLists);
printMsg(v, format(" list concatenations: %1%") % nrListConcats);
- printMsg(v, format(" values allocated: %1% (%2% bytes)")
- % nrValues % (nrValues * sizeof(Value)));
- printMsg(v, format(" sets allocated: %1% (%2% bytes)")
- % nrAttrsets % (nrAttrsets * sizeof(Bindings) + nrAttrsInAttrsets *
sizeof(Attr)));
+ printMsg(v, format(" values allocated: %1% (%2% bytes)") % nrValues %
bValues);
+ printMsg(v, format(" sets allocated: %1% (%2% bytes)") % nrAttrsets %
bAttrsets);
printMsg(v, format(" right-biased unions: %1%") % nrOpUpdates);
printMsg(v, format(" values copied in right-biased unions: %1%") %
nrOpUpdateValuesCopied);
printMsg(v, format(" symbols in symbol table: %1%") % symbols.size());
@@ -1470,6 +1471,7 @@ void EvalState::printStats()
printMsg(v, format(" number of attr lookups: %1%") % nrLookups);
printMsg(v, format(" number of primop calls: %1%") % nrPrimOpCalls);
printMsg(v, format(" number of function calls: %1%") % nrFunctionCalls);
+ printMsg(v, format(" total allocations: %1% bytes") % (bEnvs + bLists +
bValues + bAttrsets));
if (countCalls) {
v = lvlInfo;
- 270/376: Revert "Temporarily disable darwin builds while hydra's darwin is borked", (continued)
- 270/376: Revert "Temporarily disable darwin builds while hydra's darwin is borked", Ludovic Courtès, 2015/01/28
- 283/376: Doh, Ludovic Courtès, 2015/01/28
- 300/376: import derivation: cleanup, Ludovic Courtès, 2015/01/28
- 264/376: Temporarily disable darwin builds while hydra's darwin is borked, Ludovic Courtès, 2015/01/28
- 291/376: Fix message, Ludovic Courtès, 2015/01/28
- 273/376: Fix more warnings, Ludovic Courtès, 2015/01/28
- 258/376: Fix nix-copy-closure --from, Ludovic Courtès, 2015/01/28
- 260/376: Drop support for pre-c++11 compilers., Ludovic Courtès, 2015/01/28
- 262/376: Revert "Drop support for pre-c++11 compilers.", Ludovic Courtès, 2015/01/28
- 263/376: Fix build on gcc < 4.7, Ludovic Courtès, 2015/01/28
- 244/376: Show total allocations,
Ludovic Courtès <=
- 293/376: Remove Hydra build product, Ludovic Courtès, 2015/01/28
- 279/376: Add a launchd configuration file to run nix-daemon, Ludovic Courtès, 2015/01/28
- 251/376: nix-channel --add: Validate URL / channel ID, Ludovic Courtès, 2015/01/28
- 252/376: Remove redundant space in usage errors, Ludovic Courtès, 2015/01/28
- 290/376: realiseContext: Handle all context types, Ludovic Courtès, 2015/01/28
- 276/376: Improve error message if the daemon worker fails to start, Ludovic Courtès, 2015/01/28
- 267/376: Remove comments claiming we use a private PID namespace, Ludovic Courtès, 2015/01/28
- 237/376: Don't recompile the same regex over and over, Ludovic Courtès, 2015/01/28
- 297/376: Build Ubuntu 14.10 package, Ludovic Courtès, 2015/01/28
- 268/376: Document some primops, Ludovic Courtès, 2015/01/28