The old code is not able to handle multi-threaded events so this change
simply filters out all the events that originated from another thread.
This fixes an Assertion caused by an invalid event.
This is basically the old code but it has been ported to the new tracing
system.
There is still some weirdness with the percentages but I have no idea
where that comes from since I don't know the code.