Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / runtime / gc / statistics.h
1 /* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 */
8
9 #if (defined (MLTON_GC_INTERNAL_TYPES))
10
11 struct GC_cumulativeStatistics {
12 uintmax_t bytesAllocated;
13 uintmax_t bytesCopied;
14 uintmax_t bytesCopiedMinor;
15 uintmax_t bytesHashConsed;
16 uintmax_t bytesMarkCompacted;
17 uintmax_t bytesScannedMinor;
18
19 size_t maxBytesLive;
20 size_t maxHeapSize;
21 uintmax_t maxPauseTime;
22 size_t maxStackSize;
23
24 uintmax_t numCardsMarked; /* Number of marked cards seen during minor GCs. */
25
26 uintmax_t numGCs;
27 uintmax_t numCopyingGCs;
28 uintmax_t numHashConsGCs;
29 uintmax_t numMarkCompactGCs;
30 uintmax_t numMinorGCs;
31
32 struct rusage ru_gc; /* total resource usage in gc. */
33 struct rusage ru_gcCopying; /* resource usage in major copying gcs. */
34 struct rusage ru_gcMarkCompact; /* resource usage in major mark-compact gcs. */
35 struct rusage ru_gcMinor; /* resource usage in minor copying gcs. */
36 };
37
38 struct GC_lastMajorStatistics {
39 size_t bytesHashConsed;
40 size_t bytesLive; /* Number of bytes live at most recent major GC. */
41 GC_majorKind kind;
42 uintmax_t numMinorGCs;
43 };
44
45 #endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */