[Lldb-commits] [PATCH] D122603: [wip][intelpt] Refactor timestamps out of `IntelPTInstruction`
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 28 11:50:02 PDT 2022
wallace added a comment.
let's better use the word TSC instead of timestamps, which is more accurate
================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:124
+ /// Append a successfully decoded instruction.
+ void AppendInstruction(pt_insn instruction);
+
----------------
receive `const &pt_insn` to avoid copies
================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:126-127
+
+ /// Append a timestamp at the index of the last instruction.
+ void AppendInstructionTimestamp(uint64_t timestamp);
+
----------------
Let's just use an overload
void AppendInstruction(const pt_insn &instruction, uint64_t tsc);
================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:141-142
+ /// Get timestamp of an instruction by its index.
+ uint64_t GetInstructionTimestamp(size_t index) const;
+
----------------
This has to be an optional because it might not be present
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122603/new/
https://reviews.llvm.org/D122603
More information about the lldb-commits
mailing list