Skip to content

Commit e316dc3

Browse files
committed
Fix confused profiler output in multi-threaded app
At some point we started to assign indexes to static frames and then look them up, so as to cheapen GC of the profiler data. Unfortunately, this introduced a bug when we recorded profiles in multi-threaded programs: the wrong thread context was used to resolve those indices when dumping the profile results, which in turn led to the indices resolving to the wrong static frame. Thus the output of profiles involving multiple threads would often end up garbled.
1 parent 15353bb commit e316dc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/profiler/instrument.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ static MVMObject * dump_thread_data(MVMThreadContext *tc, ProfDumpStrs *pds,
683683

684684
ProfTcPdsStruct tcpds;
685685

686-
tcpds.tc = tc;
686+
tcpds.tc = othertc;
687687
tcpds.pds = pds;
688688
tcpds.types_array = types_data;
689689

0 commit comments

Comments
 (0)