Slight modification to comment to remove the indication that we flush the trace log explicitly.

This commit is contained in:
A.J. Beamon 2021-09-24 11:44:10 -07:00 committed by Jingyu Zhou
parent 0fc3cf44dc
commit 77c3122391

View File

@ -388,10 +388,10 @@ public:
eventBuffer.push_back(fields); eventBuffer.push_back(fields);
bufferLength += fields.sizeBytes(); bufferLength += fields.sizeBytes();
// If we have queued up a large number of events in simulation, then flush the trace file and throw an error. // If we have queued up a large number of events in simulation, then throw an error. This makes it easier to
// This makes it easier to diagnose cases where we get stuck in a loop logging trace events that eventually // diagnose cases where we get stuck in a loop logging trace events that eventually runs out of memory.
// runs out of memory. Without this we would never see any trace events from that loop, and it would be more // Without this we would never see any trace events from that loop, and it would be more difficult to identify
// difficult to identify where the process is actually stuck. // where the process is actually stuck.
if (g_network && g_network->isSimulated() && bufferLength > 1e8) { if (g_network && g_network->isSimulated() && bufferLength > 1e8) {
// Setting this to 0 avoids a recurse from the assertion trace event and also prevents a situation where // Setting this to 0 avoids a recurse from the assertion trace event and also prevents a situation where
// we roll the trace log only to log the single assertion event when using --crash. // we roll the trace log only to log the single assertion event when using --crash.