[clangd-dev] Moving clangd/Trace over to LLVM

Sam McCall via clangd-dev clangd-dev at lists.llvm.org
Fri Aug 10 16:22:52 PDT 2018


Hey Alex,
In principle no objections, but some design concerns/questions for a larger
scope.

- the global registration of the EventTracer is awkward and may not be the
right design for all environments who might otherwise want to consume
events. Didn't spend a lot of time digging for alternatives here since it
was sufficient for clangd.
- tracer depends on Context to handle cross-thread interactions, which is
another possibly-controversial piece. (I'm more confident the design of
Context is right though)
- contexts need to be propagated across thread boundaries when work is
transferred. Clangd's TUScheduler does this, but the wider LLVM universe
does not. (More generally: these APIs may not be very useful if they're not
used consistently)
- both tracer and context propagation were designed as extension points for
weird clangd embedders, and we have nontrivial uses of these (happy to give
details). So if these APIs change a lot to make them more suitable for
LLVM, we need to make sure they still work for those original purposes.


On Fri, Aug 10, 2018, 22:20 Alex L via clangd-dev <clangd-dev at lists.llvm.org>
wrote:

> Hi,
>
> I would like to move the Tracing support from Clangd over to LLVM, as I
> would like to add some tracing support to Clang itself as well. Are there
> any objections to this from the Clangd side? I will make a follow-up post
> on llvm-dev with a patch if there are no objections.
>
> Cheers,
> Alex
>
>
> _______________________________________________
> clangd-dev mailing list
> clangd-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20180811/94c18bc4/attachment.html>


More information about the clangd-dev mailing list