Skip to content

Commit

Permalink
fix: Changes to source-tracing requires child process restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Nov 9, 2024
1 parent 9b97da7 commit 57900be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/rt/RtraceSimulManager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: RtraceSimulManager.cpp,v 2.20 2024/11/07 18:37:11 greg Exp $";
static const char RCSid[] = "$Id: RtraceSimulManager.cpp,v 2.21 2024/11/09 00:10:49 greg Exp $";
#endif
/*
* RtraceSimulManager.cpp
Expand Down Expand Up @@ -288,7 +288,13 @@ RtraceSimulManager::UpdateMode()

int misMatch = (rtFlags ^ curFlags) & RTmask;
// updates based on toggled flags
if (misMatch & RTtraceSources) {
if (((misMatch & RTtraceSources) != 0) & (nsources > 0)) {
int nt = NThreads();
if (nt > 1) {
if (FlushQueue() < 0)
return false;
SetThreadCount(1);
}
int sn = nsources;
if (rtFlags & RTtraceSources) {
srcFollowed.NewBitMap(nsources);
Expand All @@ -304,6 +310,7 @@ RtraceSimulManager::UpdateMode()
source[sn].sflags &= ~SFOLLOW;
srcFollowed.NewBitMap(0);
}
if (nt > 1) SetThreadCount(nt);
}
if (misMatch & RTdoFIFO && FlushQueue() < 0)
return false;
Expand Down

0 comments on commit 57900be

Please # to comment.