[clangd] Fix tracing now that spans lifetimes can overlap on a thread.
Summary:
The chrome trace viewer requires events within a thread to strictly nest.
So we need to record the lifetime of the Span objects, not the contexts.
But we still want to show the relationship between spans where a context crosses
threads, so do this with flow events (i.e. arrows).
Before: https://photos.app.goo.gl/q4Dd9u9xtelaXk1v1
After: https://photos.app.goo.gl/5RNLmAMLZR3unvY83
(This could stand some further improvement, in particular I think we want a
container span whenever we schedule work on a thread. But that's another patch)
Reviewers: ioeric
Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits
Differential Revision: https://reviews.llvm.org/D43272
llvm-svn: 325220