summaryrefslogtreecommitdiff
path: root/src/zap/zapimage.h
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2017-03-30 18:16:58 -0700
committerBrian Sullivan <briansul@microsoft.com>2017-03-31 14:43:13 -0700
commited8ab5793008d3a87d5518458565a30e8d9a0414 (patch)
treeaf68fa1abade80d8141f8aa93b8207b7534f51eb /src/zap/zapimage.h
parentc8e55616e98b97c66bfb24f194e3fbca68cc152b (diff)
downloadcoreclr-ed8ab5793008d3a87d5518458565a30e8d9a0414.tar.gz
coreclr-ed8ab5793008d3a87d5518458565a30e8d9a0414.tar.bz2
coreclr-ed8ab5793008d3a87d5518458565a30e8d9a0414.zip
Added DisableInlining flag to the ProfileData.
Extended CompileStatus to have both COMPILE_HOT_EXCLUDED and COMPILE_COLD_EXCLUDED. Fixes the IsNull implementation Fixes getBBProfileData to handle the case where pos can now be zero
Diffstat (limited to 'src/zap/zapimage.h')
-rw-r--r--src/zap/zapimage.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/zap/zapimage.h b/src/zap/zapimage.h
index ba4bbc5cfc..f0bcbcb033 100644
--- a/src/zap/zapimage.h
+++ b/src/zap/zapimage.h
@@ -338,10 +338,20 @@ private:
public:
enum CompileStatus {
- LOOKUP_FAILED = -2, COMPILE_FAILED = -1, // Failure
- NOT_COMPILED = 0, COMPILE_EXCLUDED = 1, // Info
- COMPILE_SUCCEED = 10, ALREADY_COMPILED = 11
- }; // Success
+ // Failure status values are negative
+ LOOKUP_FAILED = -2,
+ COMPILE_FAILED = -1,
+
+ // Info status values are [0..9]
+ NOT_COMPILED = 0,
+ COMPILE_EXCLUDED = 1,
+ COMPILE_HOT_EXCLUDED = 2,
+ COMPILE_COLD_EXCLUDED = 3,
+
+ // Successful status values are 10 or greater
+ COMPILE_SUCCEED = 10,
+ ALREADY_COMPILED = 11
+ };
private:
// A hash table entry that contains the profile infomation and the CompileStatus for a given method
@@ -376,8 +386,24 @@ private:
return (count_t)k;
}
- static const element_t Null() { LIMITED_METHOD_CONTRACT; ProfileDataHashEntry e; e.pos = 0; e.size = 0; e.md = 0; return e; } // Assuming method profile data cannot start from position 0.
- static bool IsNull(const element_t &e) { LIMITED_METHOD_CONTRACT; return e.pos == 0; }
+ static const element_t Null()
+ {
+ LIMITED_METHOD_CONTRACT;
+ ProfileDataHashEntry e;
+ e.md = 0;
+ e.size = 0;
+ e.pos = 0;
+ e.flags = 0;
+ e.status = NOT_COMPILED;
+ return e;
+ }
+
+ static bool IsNull(const element_t &e)
+ {
+ LIMITED_METHOD_CONTRACT;
+ // returns true if both md and pos are zero
+ return (e.md == 0) && (e.pos == 0);
+ }
};
typedef SHash<ProfileDataHashTraits> ProfileDataHashTable;