1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 18:20:26 +09:00

Fixes a few issues for dprintf on OSX (#64076)

This commit is contained in:
Andrew Au 2022-01-26 17:24:15 -08:00 committed by GitHub
parent 7fcd1f6e45
commit 5f72148e03
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View file

@ -27459,7 +27459,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
_sort (&mark_list[0], mark_list_index - 1, 0);
#endif //USE_VXSORT
dprintf (3, ("using mark list at GC #%d", settings.gc_index));
dprintf (3, ("using mark list at GC #%Id", (size_t)settings.gc_index));
//verify_qsort_array (&mark_list[0], mark_list_index-1);
#endif //!MULTIPLE_HEAPS
use_mark_list = TRUE;
@ -36666,7 +36666,7 @@ go_through_refs:
hpt->heap_number, heap_number, n_eph, n_gen, n_card_set, total_cards_cleared,
(n_eph ? (int)(((float)n_gen / (float)n_eph) * 100) : 0)));
dprintf (3, ("h%d marking h%d Msoh: total cross %Id, useful: %Id, running ratio: %d",
hpt->heap_number, heap_number, n_eph_soh, n_gen_soh,
hpt->heap_number, heap_number, (size_t)n_eph_soh, (size_t)n_gen_soh,
(n_eph_soh ? (int)(((float)n_gen_soh / (float)n_eph_soh) * 100) : 0)));
#else
generation_skip_ratio = ((n_eph > MIN_SOH_CROSS_GEN_REFS) ? (int)(((float)n_gen / (float)n_eph) * 100) : 100);
@ -41414,7 +41414,7 @@ go_through_refs:
hpt->heap_number, heap_number, n_eph, n_gen, n_card_set, total_cards_cleared,
(n_eph ? (int)(((float)n_gen / (float)n_eph) * 100) : 0)));
dprintf (3, ("h%d marking h%d Mloh: total cross %Id, useful: %Id, running ratio: %d",
hpt->heap_number, heap_number, n_eph_loh, n_gen_loh,
hpt->heap_number, heap_number, (size_t)n_eph_loh, (size_t)n_gen_loh,
(n_eph_loh ? (int)(((float)n_gen_loh / (float)n_eph_loh) * 100) : 0)));
#else
generation_skip_ratio = min (((n_eph > MIN_LOH_CROSS_GEN_REFS) ?

View file

@ -345,6 +345,12 @@ void StressLog::AddModule(uint8_t* moduleBase)
}
#endif //MEMORY_MAPPED_STRESSLOG
theLog.modules[moduleIndex].size = PAL_CopyModuleData(moduleBase, destination, destination_end);
#ifdef MEMORY_MAPPED_STRESSLOG
if (hdr != nullptr)
{
hdr->modules[moduleIndex].size = theLog.modules[moduleIndex].size;
}
#endif //MEMORY_MAPPED_STRESSLOG
#endif //HOST_WINDOWS
}
@ -884,7 +890,6 @@ void StressLog::LogMsg(unsigned level, unsigned facility, const StressLogMsg &ms
if (InlinedStressLogOn(facility, level))
{
#ifdef HOST_WINDOWS // On Linux, this cast: (va_list)msg.m_args gives a compile error
ThreadStressLog* msgs = t_pCurrentThreadLog;
if (msgs == 0)
@ -894,7 +899,15 @@ void StressLog::LogMsg(unsigned level, unsigned facility, const StressLogMsg &ms
if (msgs == 0)
return;
}
#ifdef HOST_WINDOWS
// On Linux, this cast: (va_list)msg.m_args gives a compile error
msgs->LogMsg(facility, msg.m_cArgs, msg.m_format, (va_list)msg.m_args);
#else
msgs->LogMsg(facility, msg.m_cArgs, msg.m_format,
msg.m_args[0], msg.m_args[1], msg.m_args[2], msg.m_args[3],
msg.m_args[4], msg.m_args[5], msg.m_args[6], msg.m_args[7],
msg.m_args[8], msg.m_args[9], msg.m_args[10], msg.m_args[11],
msg.m_args[12], msg.m_args[13], msg.m_args[14], msg.m_args[15]);
#endif //HOST_WINDOWS
}