[Lldb-commits] [PATCH] D33674: Implementation of Intel(R) Processor Trace support for Linux
Ravitheja Addepally via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 19 04:16:36 PDT 2017
ravitheja added a comment.
Although a bit confusing, there is more flexibility for the user.I must also point out that the trace buffer available is not unlimited and there can be situations where a user might simultaneously want to trace newly spawned threads with a smaller buffer and trace an individual thread with perhaps a bigger buffer size. Tracing all threads is definitely important coz the user might not want to separately start tracing on each new thread. Now the current design might be a bit confusing but I am willing to document it well with examples and uses cases.
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.h:277
+ llvm::DenseMap<lldb::tid_t, ProcessorTraceMonitorSP>
> I'd like to downgrade these to unique pointers to ProcessTraceMonitor. There's no reason for these to ever outlive or escape the process instance, so it's natural to say they are strongly owned by it. In other places where you use ProcessorTraceMonitorSP you can just use regular pointers or references (depending on whether they can be null or not).
Hi, I don't see the advantage of changing to unique pointers ? coz when the process dies they will be destroyed anyhow, plus using shared pointers makes it easier for functions operating with the ProcessTraceMonitor to work.
More information about the lldb-commits