[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-04-01 Thread Alisamar Husain via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGca922a3559d7: [intelpt] Refactor timestamps out of `IntelPTInstruction` (authored by zrthxn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-04-01 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419656. zrthxn edited the summary of this revision. zrthxn added a comment. The difference in memory usage is appreciable with large number of instructions, as shown below # Before (with current metrics, total memory does not include raw trace size)

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Don't forget to update the description of this diff and of the commit before pushing (you need to do both). Include the avg instruction size for a trace of at least 10k instructions as well :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:145 + private: +friend class DecodedThread; + wallace wrote: > jj10306 wrote: > > nit: No need to friend the enclosing class since C++11 - > >

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419619. zrthxn marked 3 inline comments as done. zrthxn added a comment. Dont use auto for simple types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files:

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:145 + private: +friend class DecodedThread; + jj10306 wrote: > nit: No need to friend the enclosing class since C++11 - >

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Jakob Johnson via Phabricator via lldb-commits
jj10306 added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:145 + private: +friend class DecodedThread; + nit: No need to friend the enclosing class since C++11 - https://en.cppreference.com/w/cpp/language/nested_types

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. one last nit and good to go Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:82 + + auto dist = FindDistanceAndSetPos(); + m_tsc_range = m_decoded_thread_sp->CalculateTscRange(m_pos); don't use auto for simple

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:67-82 switch (origin) { case TraceCursor::SeekType::Set: m_pos = fitPosToBounds(offset); +m_current_tsc = m_decoded_thread_sp->CalculateTscRange(m_pos); return

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419560. zrthxn marked 12 inline comments as done. zrthxn added a comment. Incorporate feedback and update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files:

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added a comment. This revision now requires changes to proceed. almost there! Mostly cosmetic changes needed Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:94-98 + m_instructions.emplace_back(insn); + if

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419519. zrthxn added a comment. Updated tests according to new memory usage calculation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files:

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419517. zrthxn marked an inline comment as done. zrthxn added a comment. Fixed issue with TSC becoming invalid midway through trace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419348. zrthxn added a comment. Change tsc check anyway Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:45-52 +if (!m_current_tsc) + m_current_tsc = m_decoded_thread_sp->CalculateTscRange(m_pos); +else if (!m_current_tsc->InRange(m_pos)) { + if (m_pos >

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-31 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 419347. zrthxn marked 23 inline comments as done. zrthxn added a comment. Included requested changes, removed extra members Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-30 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added a comment. This revision now requires changes to proceed. Some calculations are wrong, but overall this is good. We are very close! Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:112-113

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-29 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418981. zrthxn added a comment. Prevent crash on printing info when we have 0 instructions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files:

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-29 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418977. zrthxn added a comment. Update memory calc function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122603/new/ https://reviews.llvm.org/D122603 Files:

[Lldb-commits] [PATCH] D122603: [intelpt] Refactor timestamps out of IntelPTInstruction

2022-03-29 Thread Alisamar Husain via Phabricator via lldb-commits
zrthxn updated this revision to Diff 418975. zrthxn marked 7 inline comments as done. zrthxn retitled this revision from "[wip][intelpt] Refactor timestamps out of `IntelPTInstruction`" to "[intelpt] Refactor timestamps out of IntelPTInstruction". zrthxn added a comment. Change TscRange to