[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
Thu Jun 22 08:20:18 PDT 2017
ravitheja added inline comments.
Comment at: source/Plugins/Process/Linux/ProcessorTrace.h:79
+ // Trace id of trace instance corresponding to the process.
+ static lldb::user_id_t m_pt_process_traceid;
> labath wrote:
> > Instead of global variables (we may want to debug more than one process eventually), we could have a member variable `std::pair<user_id_t, TraceOptions> m_process_trace;` (you can have a special class for that if you don't like .first and .second everywhere).
> I guess I wasn't too clear about this, but I meant a member variable in the Process class. This solves the "multiple process" issue, but creates a couple of other ones. All the call sites are now more complicated, and you have to worry about managing the lifetime of the entries in this map. If this was a Process member variable, those would be handled automatically (and it makes more sense, since it is the process class that owns these traces instances).
Ok sorry now I understand what u meant.
More information about the lldb-commits