[Lldb-commits] [PATCH] D123356: add task timer

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. Herald added a subscriber: mgorny. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D123356 Files: lldb/so

[Lldb-commits] [PATCH] D123281: [trace][intel pt] Create a common accessor for live and postmortem data

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/Trace.h:386-396 + llvm::DenseMap> m_live_thread_data; + /// data kind -> size std::unordered_map m_live_process_data; + /// \} + jj10306 wrote: > Why not change all the maps to Den

[Lldb-commits] [PATCH] D123281: [trace][intel pt] Create a common accessor for live and postmortem data

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 421291. wallace added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123281/new/ https://reviews.llvm.org/D123281 Files: lldb/include/lldb/Target/Trace.h lldb/source/Plugins/Trac

[Lldb-commits] [PATCH] D123106: [trace][intel pt] Create a class for the libipt decoder wrapper

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 421283. wallace marked 6 inline comments as done. wallace added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123106/new/ https://reviews.llvm.org/D123106 Files: lldb/source/Plugi

[Lldb-commits] [PATCH] D123106: [trace][intel pt] Create a class for the libipt decoder wrapper

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. thanks for the gotchas Comment at: lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp:41 + +/// Class that decodes a raw buffer for a single thread using the low level +/// libipt library. jj10306 wrote: > "for a single thread" > thin

[Lldb-commits] [PATCH] D123281: [trace][intel pt] Create a common accessor for live and postmortem data

2022-04-07 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/Trace.h:265 + lldb::tid_t tid, llvm::StringRef kind, + std::function data)> callback); + jj10306 wrote: > typedef the callback to be cleaner and make the intention more clear? good idea

[Lldb-commits] [PATCH] D123281: [trace][intel pt] Create a common accessor for live and postmortem data

2022-04-06 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 421093. wallace added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123281/new/ https://reviews.llvm.org/D123281 Files: lldb/include/lldb/Target/Trace.h lldb/source/Plugins/Trace/common/Tra

[Lldb-commits] [PATCH] D123281: [trace][intel pt] Create a common accessor for live and postmortem data

2022-04-06 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, zrthxn. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Some parts of the code have to distinguish between live and postmortem threads to

[Lldb-commits] [PATCH] D123025: [lldb-vscode] Implement stderr/stdout on win32 and redirect lldb log to VSCode

2022-04-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. ok! I'll commit it for you Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123025/new/ https://reviews.llvm.org/D123025 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [PATCH] D123025: [lldb-vscode] Implement stderr/stdout on win32 and redirect lldb log to VSCode

2022-04-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Let me know if you need help upstreaming this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123025/new/ https://reviews.llvm.org/D123025 ___ lldb-commits mailing list lldb

[Lldb-commits] [PATCH] D123025: [lldb-vscode] Implement stderr/stdout on win32 and redirect lldb log to VSCode

2022-04-05 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. thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123025/new/ https://reviews.llvm.org/D123025 ___

[Lldb-commits] [PATCH] D122991: [lldb][intelpt] Remove `IntelPTInstruction` and move methods to `DecodedThread`

2022-04-05 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. great job! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122991/new/ https://reviews.llvm.org/D122991 ___

[Lldb-commits] [PATCH] D122991: [lldb][intelpt] Remove `IntelPTInstruction` and move methods to `DecodedThread`

2022-04-05 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. just remove a small comment and good to go! Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:143-146 + /// \param[in] next_load_address + ///

[Lldb-commits] [PATCH] D123106: [trace][intel pt] Create a class for the libipt decoder wrapper

2022-04-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 420395. wallace added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123106/new/ https://reviews.llvm.org/D123106 Files: lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt lldb/source/Plugins

[Lldb-commits] [PATCH] D123106: [trace][intel pt] Create a class for the libipt decoder wrapper

2022-04-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, zrthxn. Herald added a subscriber: mgorny. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. As we soon will need to decode multiple raw tra

[Lldb-commits] [PATCH] D123025: [lldb-vscode] Implement stderr/stdout on win32 and redirect lldb log to VSCode

2022-04-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/tools/lldb-vscode/OutputRedirector.cpp:12 +#else +#include +#include mstorsjo wrote: > Minor style issue - I guess it'd be less of double negation, if we'd change > the ifdef to `#if defined(_WIN32) .. #else` fee

[Lldb-commits] [PATCH] D122991: [lldb][intelpt] Remove `IntelPTInstruction` and move methods to `DecodedThread`

2022-04-04 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. only mostly cosmetic changes needed. Thanks for this. I'm glad that we are bringing the usage down Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.c

[Lldb-commits] [PATCH] D122867: [trace][intel pt] Handle better tsc in the decoder

2022-04-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 419813. wallace added a comment. - Address comments - Also now using Format instead of Printf, which more idiomatic in this repo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122867/new/ https://reviews.llvm.o

[Lldb-commits] [PATCH] D122867: [trace][intel pt] Handle better tsc in the decoder

2022-04-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:120 + +void DecodedThread::ReportTscError(int libipt_error_code) { m_tsc_errors++; } + jj10306 wrote: > The parameter is unused, is there a reason to keep this or shou

[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 https://r

[Lldb-commits] [PATCH] D122867: [trace][intel pt] Handle better tsc in the decoder

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, zrthxn. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. A problem that I introduced in the decoder is that I was considering TSC decoding

[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] D122859: [trace] Show ideas for the main interfaces for new HTR

2022-03-31 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: davidca, clayborg, jj10306. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This diff tries to show the low level structures and the high level API

[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 - > https://en.cppreference.com/w/cpp/languag

[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 typ

[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-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 +DecodedThread:

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

2022-03-29 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. I'm proposing a new interface for the TscRange. Let me know if you have questions Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:95 + m_instru

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 418680. wallace added a comment. - Bring back the --continue command. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122254/new/ https://reviews.llvm.org/D122254 Files: lldb/include/lldb/Target/TraceCursor.h

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

2022-03-28 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added inline comments. This revision now requires changes to proceed. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:94-96 + auto last_ts = m_instruction_timestamps[m_instruction_timestamps.size() - 1]; + if

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

2022-03-28 Thread walter erquinigo via Phabricator via lldb-commits
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); + --

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 418404. wallace added a comment. - make tests pass - simplified the error handling. In fact, using Error objects might be too expensive and potentially provides little value in the API, because the user needs to consume the Error forcefully. Besides that, o

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 418361. wallace marked 2 inline comments as done. wallace added a comment. Some updates: - Modified `thread trace dump instructions` to accept one single thread instead of many. The reason is that, with the new --id argument, traversing multiple threads doe

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:77 bool TraceCursorIntelPT::IsError() { return m_decoded_thread_sp->GetInstructions()[m_pos].IsError(); } jj10306 wrote: > zrthxn wrote: > > jj10306 wrote: >

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:25 IntelPTError::IntelPTError(int libipt_error_code, lldb::addr_t address) : m_libipt_error_code(libipt_error_code), m_address(address) { assert(libipt_error_code < 0); --

[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

2022-03-25 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. much closer! I'm glad you are starting to understand the patterns we use for this kind of code Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:1

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Target/TraceInstructionDumper.h:50 + /// Additional options for configuring the dumping. + TraceInstructionDumper(lldb::TraceCursorUP &&cursor_up, Stream &s, + const TraceInstructionDumperO

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 418032. wallace added a comment. fix some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122254/new/ https://reviews.llvm.org/D122254 Files: lldb/include/lldb/Target/TraceCursor.h lldb/include/lldb

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-24 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. there are many comments from the previous versions of this diff that you didn't apply. Go through all of them first :) Comment at: lldb/source/Plugins/Trace/inte

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.cpp:227 + +static Expected DecodeLiveThread(const ThreadSP &thread_sp, + TraceIntelPT &trace) { don't use expected. The D

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-24 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:103-105 +// llvm::Error DecodedThread::GetError(uint64_t idx) const { +// return m_errors.at(idx); +// } Errors can only be copied, that's why we need to create a ne

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.cpp:149 +thread.AppendError(insn_index, make_error(time_error, insn.ip)); +thread.AppendInstruction(IntelPTInstruction(insn)); break; zrthxn wro

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 417828. wallace added a comment. nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122254/new/ https://reviews.llvm.org/D122254 Files: lldb/include/lldb/Target/TraceCursor.h lldb/include/lldb/Target/Trace

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 417827. wallace added a comment. - improve documentation - use lldb::user_id_t - add the new TraceInstructionDumperOptions struct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122254/new/ https://reviews.llvm.o

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:103-105 +std::unordered_map DecodedThread::GetErrors() const { + return m_errors; +} remove this Commen

[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility

2022-03-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:172 std::vector m_instructions; + std::vector m_errors; + you need to have something like std::unordered_map m_errors; that way, you'll be able to quickly look fo

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-22 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 417389. wallace marked 2 inline comments as done. wallace added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122254/new/ https://reviews.llvm.org/D122254 Files: lldb/include/lldb

[Lldb-commits] [PATCH] D122254: [trace][intelpt] Introduce instruction Ids

2022-03-22 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, clayborg, zrthxn. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. In order to support quick arbitrary access to instructions in the trace,

[Lldb-commits] [PATCH] D122192: [trace] Use vector instead of ArrayRef when reading data

2022-03-21 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, zrthxn. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. I incorrectly returned an ArrayRef when the underlying object didn't own the data.

[Lldb-commits] [PATCH] D122176: [trace] clear any existing tracing sessions before relaunching the binary

2022-03-21 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 417082. wallace added a comment. improve test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122176/new/ https://reviews.llvm.org/D122176 Files: lldb/source/Target/Target.cpp lldb/test/API/commands/trace/Te

[Lldb-commits] [PATCH] D122176: [trace] clear any existing tracing sessions before relaunching the binary

2022-03-21 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added reviewers: jj10306, zrthxn. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. There's a bug caused when a process is relaunched: the target, which doesn't chang

[Lldb-commits] [PATCH] D122093: [trace][intelpt] Added total memory usage by decoded trace

2022-03-21 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. great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122093/new/ https://reviews.llvm.org/D122093 ___

[Lldb-commits] [PATCH] D122093: [trace][intelpt] Added total memory usage by decoded trace

2022-03-20 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added inline comments. This revision now requires changes to proceed. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:123-130 + size_t non_err_instruction_count = 0; + for (const IntelPTInstruction &insn : m_i

[Lldb-commits] [PATCH] D122093: [trace][intelpt] Added total memory usage by decoded trace

2022-03-20 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. just some few remaining nits Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.h:85 + + /// Get the size in bytes of non-error instance of this clas

[Lldb-commits] [PATCH] D122093: [trace][intelpt] Added total memory usage by decoded trace

2022-03-20 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:121-126 + size_t total = sizeof(m_raw_trace_size); + + for (const IntelPTInstruction &ins : m_instructions) +total += ins.GetMemoryUsage(); + + return total; wa

[Lldb-commits] [PATCH] D122093: [trace][intelpt] Added total memory usage by decoded trace

2022-03-20 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. Pretty nice! just some details i've noticed when reading your diff and good to go Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:121-126 + siz

[Lldb-commits] [PATCH] D122076: [trace][intelpt] Instruction count in trace info

2022-03-19 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/D122076/new/ https://reviews.llvm.org/D122076

[Lldb-commits] [PATCH] D122076: [trace][intelpt] Instruction count in trace info

2022-03-19 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. just some minor details and good to go Comment at: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp:108 Optional raw_size = GetRawTraceSize(thread); + size

[Lldb-commits] [PATCH] D122073: [docs] Fixed minor ordering issue

2022-03-19 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. Herald added a subscriber: JDevlieghere. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122073/new/ https://reviews.llvm.org/D122073 _

[Lldb-commits] [PATCH] D122023: [trace][intelpt] fix some test failures

2022-03-18 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 416558. wallace added a comment. Herald added a subscriber: JDevlieghere. nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122023/new/ https://reviews.llvm.org/D122023 Files: lldb/source/Commands/CommandObj

[Lldb-commits] [PATCH] D122023: [trace][intelpt] fix some test failures

2022-03-18 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: jj10306. Herald added a project: All. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Minor fixes needed and now `./bin/lldb-dotest -p TestTrace` passes correctly. - There wa

[Lldb-commits] [PATCH] D121935: added intel-pt build instructions for lldb

2022-03-18 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added a comment. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121935/new/ https://reviews.llvm.org/D121935 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [PATCH] D121935: added intel-pt build instructions for lldb

2022-03-17 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. Pretty nice improvement! Now you need to reference this doc from the main page. See this reference patch https://reviews.llvm.org/D82064. According to it, you need to move this doc

[Lldb-commits] [PATCH] D121935: added intel-pt build instructions for lldb

2022-03-17 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added a comment. Thank you very much for helping out with the documentaiton! As Jonas said, move the file to lldb/docs/intel_pt.rst and modify the necessary bits (some CMake changes) so that the documentation eventually appears in https://lldb

[Lldb-commits] [PATCH] D121711: [trace][intelpt] Rename IntelPTManager and change TraceCursor::GetTimestampCounter API to general trace counter API

2022-03-16 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. just fix these two simple comments and good to go Comment at: lldb/include/lldb/Target/TraceCursor.h:188-189 + /// \param[in] counter_type + ///The counter type //

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-03-10 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:455 +//}], +//"tsc_conversion"?: Optional<{ +// "kind": , wallace wrote: > wallace wrote: > > wallace wrote: > > > The ? After the key name makes Optional<> redundant. Just keep

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-03-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. The main change is to make the counter conversion generic, so that we don't need to add more APIs in the future. Besides that, you don't need to make any drastic change. Good job so far! Comment at: lldb/docs/lldb-gdb-remote.txt:455 +//}], +//

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-03-08 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/docs/lldb-gdb-remote.txt:455 +//}], +//"tsc_conversion"?: Optional<{ +// "kind": , The ? After the key name makes Optional<> redundant. Just keep the ? Comment at: lldb/docs/lldb-gdb-

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-03-04 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. Thanks @davidca and @labath for chiming in. @jj10306, please rename IntelPTManager to IntelPTCollector for clarity. Comment at: lldb/docs/lldb-gdb-remote.txt:469 +// +//tsc_rate: { +// kind: "perf", davidca wrote: > why is all

[Lldb-commits] [PATCH] D120755: Fix race condition when launching and attaching.This is a modified version of a previous patch that was reverted: https://reviews.llvm.org/D119797This version only wait

2022-03-01 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. I'm assuming this passes all tests locally Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120755/new/ https://reviews.llvm.org/D120755 ___

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-02-28 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. in terms of functionality, everything is right, but you need to do some improvements Comment at: lldb/docs/lldb-gdb-remote.txt:454-479 +//}], +//... othe

[Lldb-commits] [PATCH] D120595: [WIP][trace][intelpt] Add TSC to Nanosecond conversion for IntelPT traces

2022-02-25 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. you got the flow correct. I left comments regarding specific details, but good job overall!! Comment at: lldb/docs/lldb-gdb-remote.txt:454-479 +//}], +//

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 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 Comment at: lldb/tools/lldb-vscode/VSCode.cpp:533 + // Wait for the process hit a stopped state. When running a launch (with or + // without "launchCommands") or att

[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "system-wide" lldbinit file

2022-02-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Interpreter/CommandInterpreter.h:256 void SourceInitFileHome(CommandReturnObject &result, bool is_repl); + void SourceSystemInitFile(CommandReturnObject &result); JDevlieghere wrote: > `SourceInit

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. I agree with labath. Specially because I wouldn't like the user having aborted debug sessions if their setup takes longer than 10 seconds to get the process ready, which I imagine might happen with android or oculus devices using custom launch configs. What about using

[Lldb-commits] [PATCH] D119400: Fix a double debug info size counting in top level stats for "statistics dump".

2022-02-10 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. good catch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119400/new/ https://reviews.llvm.org/D119400 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm

[Lldb-commits] [PATCH] D117288: [LLDB][NFC] Fix a typo in comment

2022-01-14 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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117288/new/ https://reviews.llvm.org/D117288 __

[Lldb-commits] [PATCH] D115974: [formatters] Improve documentation

2022-01-05 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 397667. wallace added a comment. per comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115974/new/ https://reviews.llvm.org/D115974 Files: lldb/docs/use/variable.rst Index: lldb/docs/use/variable.rst =

[Lldb-commits] [PATCH] D115951: Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

2021-12-21 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/D115951/new/ https://reviews.llvm.org/D115951 _

[Lldb-commits] [PATCH] D115974: [formatters] Improve documentation

2021-12-17 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: clayborg. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This adds some important remarks to the data formatter documentation. Repository: rG LLVM Github Monorepo https:

[Lldb-commits] [PATCH] D115951: Cache the manual DWARF index out to the LLDB cache directory when the LLDB index cache is enabled.

2021-12-17 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/include/lldb/Symbol/Symtab.h:279 m_mutex; // Provide thread safety for this symbol table - bool m_file_addr_to_index_computed : 1, m_name_indexes_computed : 1; + bool m_file_addr_to_index_computed : 1, m_name_indexes_comput

[Lldb-commits] [PATCH] D115324: Added the ability to cache the finalized symbol tables subsequent debug sessions to start faster.

2021-12-14 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/D115324/new/ https://reviews.llvm.org/D115324 _

[Lldb-commits] [PATCH] D115324: Added the ability to cache the finalized symbol tables subsequent debug sessions to start faster.

2021-12-13 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. much nicer than the first version. I'm just asking a few minor things. Comment at: lldb/include/lldb/Host/FileSystem.h:147 + /// + /// The path must specify a f

[Lldb-commits] [PATCH] D115178: Unify libstdcpp and libcxx formatters for `std::optional`

2021-12-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. committed as cfb075089128b2e5918afd0ce21ec10bf455e5ab Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115178/new/ https://reviews.llvm.org/D115178 __

[Lldb-commits] [PATCH] D114008: [formatters] Add a deque formatter for libstdcpp and fix the libcxx one

2021-12-09 Thread walter erquinigo via Phabricator via lldb-commits
wallace closed this revision. wallace added a comment. committed as 2ea3c8a50add5436cf939d59c3235408ca0255c1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114008/new/ https://re

[Lldb-commits] [PATCH] D115178: Unify libstdcpp and libcxx formatters for `std::optional`

2021-12-08 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. great job! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115178/new/ https://reviews.llvm.org/D115178 ___

[Lldb-commits] [PATCH] D115178: Unify libstdcpp and libcxx formatters for `std::optional`

2021-12-06 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. good job! Only some cosmetic changes are needed and you also need to delete the python code Comment at: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp:775-779 + // AddCXXSummary(cpp_category_sp, + // lldb_private::formatte

[Lldb-commits] [PATCH] D115178: Unify libstdcpp and libcxx formatters for `std::optional`

2021-12-06 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. back to your queue until you get things working Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115178/new/ https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D115137: [formatters] Add a pointer and reference tests for a list and forward_list formatters for libstdcpp and libcxx

2021-12-06 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. thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115137/new/ https://reviews.llvm.org/D115137 ___

[Lldb-commits] [PATCH] D115033: [lldb-vscode] Report supportsModulesRequest=true

2021-12-03 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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115033/new/ https://reviews.llvm.org/D115033 __

[Lldb-commits] [PATCH] D114008: Draft PR for the deque, stack, queue lldb data formatters

2021-12-02 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 391513. wallace added a comment. Fix the few issues in Danil's implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114008/new/ https://reviews.llvm.org/D114008 Files: lldb/examples/synthetic/gnu_lib

[Lldb-commits] [PATCH] D114461: [formatters] Capping size limitation avoidance for the libcxx and libcpp bitset data formatters.

2021-11-23 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. great!!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114461/new/ https://reviews.llvm.org/D114461 _

[Lldb-commits] [PATCH] D114458: Make some libstd++ formatters safer

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 389267. wallace added a comment. labath's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114458/new/ https://reviews.llvm.org/D114458 Files: lldb/examples/synthetic/gnu_libstdcpp.py lldb/source/Plug

[Lldb-commits] [PATCH] D114458: Make some libstd++ formatters safer

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace added inline comments. Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/main.cpp:16 -int main() { +int main() { // Set break point at this line. std::unordered_map map; labath wrote: > It'd be better to

[Lldb-commits] [PATCH] D114450: Improve optional formatter

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 389260. wallace added a comment. fix the issue when both formatters run together and apply labath's suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114450/new/ https://reviews.llvm.org/D114450 Files:

[Lldb-commits] [PATCH] D114433: [formatters] Draft PR for the list nad forward_list capping_size

2021-11-23 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. add generic tests for list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114433/new/ https://reviews.llvm.org/D114433 _

[Lldb-commits] [PATCH] D114450: Improve optional formatter

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. > That said, I'm more worried about the strange interactions between libc++ and > libstdc++ formatters I reported. yes, I'm trying to install libc++ on my machine now Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:24 self.value = se

[Lldb-commits] [PATCH] D114458: Make some libstd++ formatters safer

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. We need to add checks that ensure that some core variables are valid, so that we avoid printing out garbage data. The worst that could happen is that an

[Lldb-commits] [PATCH] D114450: Improve optional formatter

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace created this revision. wallace added a reviewer: labath. wallace requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. As suggested by @labath in https://reviews.llvm.org/D114403, we should make the formatter more resilient to corrupted d

[Lldb-commits] [PATCH] D114433: [formatters] Draft PR for the list nad forward_list capping_size

2021-11-23 Thread walter erquinigo via Phabricator via lldb-commits
wallace requested changes to this revision. wallace added inline comments. This revision now requires changes to proceed. Comment at: lldb/examples/synthetic/gnu_libstdcpp.py:14-16 +if valobj.GetNumChildren() >= list_capping_size: +return "(capped) size=" + str(valobj

<    1   2   3   4   5   6   7   8   9   10   >