This updates the documentation of the gdb-remote protocol, as well as the help messages, to include the new --per-core-tracing option.
I made some renames to account for this new option
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Before doing a complete review can you provide clarity on the decision to only support perCore for process wide (see my inline comment with my thoughts/questions)? Understanding this will potentially provide the answers to many other questions I was going to leave, so figured I'd ask it ahead of time (:
lldb/docs/lldb-gdb-remote.txt | ||
---|---|---|
369 | Why do we only want this option for process tracing? | |
lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp | ||
66 | So now m_trace_buffer_size is the size of each trace buffer, regardless of the buffer is for a single thread or a single core? |
lldb/docs/lldb-gdb-remote.txt | ||
---|---|---|
369 | The reason is that if you want to trace a specific thread, it's actually much better to use single-buffer thread tracing than per cpu. You get full fidelity and no data loss in this mode. On the other hand, per cpu tracing is really useful in a thread-unbounded case where you are okay with having no data for unfrequent threads. |
lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp | ||
---|---|---|
66 | yep |
Why do we only want this option for process tracing?
Per cpu tracing collects all trace data agnostic to a user specified process/thread, so why should this only be exposed for process wide? I think it makes more sense to decouple the perCoreTracing option from process/threads specific options entirely so it is its own option all together and cannot be used in conjunction with process/thread options.
If there is reason to not go down that route, we then should also add support for perCoreTracing with the thread tracing option, not just the process tracing option as I feel it doesn't make since to only expose this for process tracing since it's doing the same thing behind the scenes.