[Lldb-commits] [PATCH] D105741: [trace] Add `thread trace export` command for Intel PT trace visualization
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 26 21:24:00 PDT 2021
wallace added a comment.
Pretty good. Just some minor nits. Once you rebase on top of the trace exporter plugin patch, this should be good to go.
================
Comment at: lldb/test/API/commands/trace/TestTraceExport.py:54-56
+ TODO: Once the "trace save" command is implemented, gather Intel PT
+ trace of this program and load it like the other tests instead of
+ manually executing the commands to trace the program.
----------------
delete this. You can actually compile a main.cpp file as part of the test and trace it with intel pt, and then check its output. You don't need "trace save" to do that.
================
Comment at: lldb/test/API/commands/trace/intelpt-trace/functions_example.cpp:1
+void log_request_response(int reqest_response) {
+ // logging logic
----------------
rename this file to export_htr_input.cpp or something like that. Same for the a.out
================
Comment at: lldb/test/API/commands/trace/intelpt-trace/functions_example.cpp:26
+}
+
+int main() {
----------------
given that we are going to add a binary and we don't want to do it often, add another function like
void iterative_handle_request_by_id(int id, int reps) {
for (int i = 0; i < reps; i++) {
if (i % 2 == 0)
slow_handle_request(id);
else
fast_handle_request(id);
}
just to have someone interesting to test later. Then recompile your a.out
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105741/new/
https://reviews.llvm.org/D105741
More information about the lldb-commits
mailing list