summaryrefslogtreecommitdiff
path: root/src/jit/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/utils.cpp')
-rw-r--r--src/jit/utils.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/jit/utils.cpp b/src/jit/utils.cpp
index 9934416412..3a45039aa7 100644
--- a/src/jit/utils.cpp
+++ b/src/jit/utils.cpp
@@ -657,7 +657,7 @@ void dumpILRange(const BYTE* const codeAddr, unsigned codeSize) // in bytes
for (IL_OFFSET offs = 0; offs < codeSize;)
{
char prefix[100];
- sprintf(prefix, "IL_%04x ", offs);
+ sprintf_s(prefix, _countof(prefix), "IL_%04x ", offs);
unsigned codeBytesDumped = dumpSingleInstr(codeAddr, offs, prefix);
offs += codeBytesDumped;
}
@@ -665,11 +665,9 @@ void dumpILRange(const BYTE* const codeAddr, unsigned codeSize) // in bytes
/*****************************************************************************
*
- * Display a variable set (which may be a 32-bit or 64-bit number); only
- * one or two of these can be used at once.
+ * Display a variable set.
*/
-
-const char* genES2str(EXPSET_TP set)
+const char* genES2str(BitVecTraits* traits, EXPSET_TP set)
{
const int bufSize = 17;
static char num1[bufSize];
@@ -682,11 +680,7 @@ const char* genES2str(EXPSET_TP set)
nump = (nump == num1) ? num2 : num1;
-#if EXPSET_SZ == 32
- sprintf_s(temp, bufSize, "%08X", set);
-#else
- sprintf_s(temp, bufSize, "%08X%08X", (int)(set >> 32), (int)set);
-#endif
+ sprintf_s(temp, bufSize, "%s", BitVecOps::ToString(traits, set));
return temp;
}
@@ -876,7 +870,7 @@ void ConfigMethodRange::InitRanges(const wchar_t* rangeStr, unsigned capacity)
#endif // defined(DEBUG) || defined(INLINE_DATA)
-#if CALL_ARG_STATS || COUNT_BASIC_BLOCKS || COUNT_LOOPS || EMITTER_STATS || MEASURE_NODE_SIZE
+#if CALL_ARG_STATS || COUNT_BASIC_BLOCKS || COUNT_LOOPS || EMITTER_STATS || MEASURE_NODE_SIZE || MEASURE_MEM_ALLOC
/*****************************************************************************
* Histogram class.
@@ -896,7 +890,10 @@ Histogram::Histogram(IAllocator* allocator, const unsigned* const sizeTable)
Histogram::~Histogram()
{
- m_allocator->Free(m_counts);
+ if (m_counts != nullptr)
+ {
+ m_allocator->Free(m_counts);
+ }
}
// We need to lazy allocate the histogram data so static `Histogram` variables don't try to
@@ -1414,6 +1411,9 @@ void HelperCallProperties::init()
case CORINFO_HELP_GETGENERICS_GCSTATIC_BASE:
case CORINFO_HELP_GETGENERICS_NONGCSTATIC_BASE:
case CORINFO_HELP_READYTORUN_STATIC_BASE:
+#if COR_JIT_EE_VERSION > 460
+ case CORINFO_HELP_READYTORUN_GENERIC_STATIC_BASE:
+#endif // COR_JIT_EE_VERSION > 460
// These may invoke static class constructors
// These can throw InvalidProgram exception if the class can not be constructed