[Lldb-commits] [PATCH] D122076: [trace][intelpt] Instruction count in trace info
Alisamar Husain via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 19 22:40:47 PDT 2022
zrthxn updated this revision to Diff 416756.
zrthxn added a comment.
Using arrow op and made it inline. I think creating a variable looks a bit better but this is fine too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122076/new/
https://reviews.llvm.org/D122076
Files:
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
lldb/test/API/commands/trace/TestTraceDumpInfo.py
Index: lldb/test/API/commands/trace/TestTraceDumpInfo.py
===================================================================
--- lldb/test/API/commands/trace/TestTraceDumpInfo.py
+++ lldb/test/API/commands/trace/TestTraceDumpInfo.py
@@ -38,4 +38,5 @@
substrs=['''Trace technology: intel-pt
thread #1: tid = 3842849
- Raw trace size: 4096 bytes'''])
+ Raw trace size: 4096 bytes
+ Total number of instructions: 21'''])
Index: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
===================================================================
--- lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
+++ lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
@@ -110,7 +110,10 @@
s.Printf(", not traced\n");
return;
}
- s.Printf("\n Raw trace size: %zu bytes\n", *raw_size);
+ s.Printf("\n");
+ s.Printf(" Raw trace size: %zu bytes\n", *raw_size);
+ s.Printf(" Total number of instructions: %zu\n",
+ Decode(thread)->GetInstructions().size());
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122076.416756.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220320/36681177/attachment.bin>
More information about the lldb-commits
mailing list