summaryrefslogtreecommitdiff
path: root/src/zap/zapimage.h
diff options
context:
space:
mode:
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;