1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5/*
6
7 */
8
9
10#ifndef ZAPPER_STATS_H_0170123740208327
11#define ZAPPER_STATS_H_0170123740208327
12
13#include "sarray.h"
14#include "sstring.h"
15#include "corcompile.h"
16#include "arraylist.h"
17#include "log.h"
18#include "shash.h"
19#include "utilcode.h"
20
21
22// forward declarations
23class ZapperOptions;
24
25class ZapperStats
26{
27 public:
28
29 unsigned m_methods; // Total number of methods
30 unsigned m_failedMethods; // Methods which failed to compile correctly
31 unsigned m_failedILStubs; // ILSTUB methods which failed to compile correctly
32
33 ULONG m_ilCodeSize;
34 ULONG m_nativeCodeSize; // Really just the Hot Code Size + Unprofiled size
35 ULONG m_nativeColdCodeSize;
36 ULONG m_nativeRODataSize;
37 ULONG m_gcInfoSize;
38#ifdef WIN64EXCEPTIONS
39 ULONG m_unwindInfoSize;
40#endif // WIN64EXCEPTIONS
41
42 ULONG m_NumHotAllocations;
43 ULONG m_NumHotColdAllocations;
44 ULONG m_NumMediumHeaders;
45
46 ULONG m_nativeCodeSizeInSplitMethods;
47 ULONG m_nativeColdCodeSizeInSplitMethods;
48 ULONG m_nativeCodeSizeInSplitProfiledMethods;
49 ULONG m_nativeColdCodeSizeInSplitProfiledMethods;
50 ULONG m_nativeCodeSizeInProfiledMethods;
51 ULONG m_nativeColdCodeSizeInProfiledMethods;
52 ULONG m_totalHotCodeSize;
53 ULONG m_totalUnprofiledCodeSize;
54 ULONG m_totalColdCodeSize;
55 ULONG m_totalCodeSizeInProfiledMethods;
56 ULONG m_totalColdCodeSizeInProfiledMethods;
57
58 unsigned m_inputFileSize;
59 unsigned m_outputFileSize;
60 unsigned m_metadataSize;
61 unsigned m_preloadImageSize;
62 unsigned m_hotCodeMgrSize;
63 unsigned m_unprofiledCodeMgrSize;
64 unsigned m_coldCodeMgrSize;
65 unsigned m_eeInfoTableSize;
66 unsigned m_helperTableSize;
67 unsigned m_dynamicInfoTableSize;
68 unsigned m_dynamicInfoDelayListSize;
69 unsigned m_debuggingTableSize;
70 unsigned m_headerSectionSize;
71 unsigned m_codeSectionSize;
72 unsigned m_coldCodeSectionSize;
73 unsigned m_exceptionSectionSize;
74 unsigned m_readOnlyDataSectionSize;
75 unsigned m_relocSectionSize;
76 unsigned m_ILMetadataSize;
77 unsigned m_virtualImportThunkSize;
78 unsigned m_externalMethodThunkSize;
79 unsigned m_externalMethodDataSize;
80
81 unsigned m_prestubMethods;
82 unsigned m_directMethods;
83 unsigned m_indirectMethodReasons[CORINFO_INDIRECT_CALL_COUNT];
84
85 ZapperStats();
86 void PrintStats();
87};
88
89char const * GetCallReasonString( CorInfoIndirectCallReason reason );
90
91#endif // ZAPPER_STATS_H_0170123740208327
92
93