[Lldb-commits] [PATCH] D123357: [trace][intelpt] Add task timer classes
Jakob Johnson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 12 07:43:59 PDT 2022
jj10306 added inline comments.
================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:243
+ /// Total amount of time spent decoding.
+ std::chrono::milliseconds m_total_decoding_time{0};
};
----------------
nit: Do you need an explicit initialization?
================
Comment at: lldb/source/Plugins/Trace/intel-pt/TaskTimer.cpp:17
+
+ThreadTaskTimer &TaskTimer::ForThread(lldb::tid_t tid) {
+ auto it = m_thread_timers.find(tid);
----------------
Should this be named to better reflect what this function is doing? It seems that this function is "getting" the ThreadTaskTimer associated with the tid and creates it if one doesn't already exist.
Maybe something like `GetThreadTaskTimer`, `TimerForThread`, `TimerByThread` ?
================
Comment at: lldb/source/Plugins/Trace/intel-pt/TaskTimer.h:58
+private:
+ std::unordered_map<std::string, std::chrono::milliseconds> m_timed_tasks;
+};
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123357/new/
https://reviews.llvm.org/D123357
More information about the lldb-commits
mailing list