[Lldb-commits] [PATCH] D122076: [trace][intelpt] Instruction count in trace info
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 19 14:55:42 PDT 2022
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<size_t> raw_size = GetRawTraceSize(thread);
+ size_t inst_size = (*Decode(thread)).GetInstructions().size();
s.Printf("\nthread #%u: tid = %" PRIu64, thread.GetIndexID(), thread.GetID());
----------------
use -> instead of dereferencing. It's less characters and more readable
================
Comment at: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp:116
+ s.Printf(" Raw trace size: %zu bytes\n", *raw_size);
+ s.Printf(" Total number of instructions: %zu\n", inst_size);
return;
----------------
no need to create a new variable. You can just inline everything here. It's not complex
================
Comment at: lldb/test/API/commands/trace/TestTraceDumpInfo.py:38-42
substrs=['''Trace technology: intel-pt
thread #1: tid = 3842849
- Raw trace size: 4096 bytes'''])
+ Raw trace size: 4096 bytes
+ Total number of instructions: 21'''])
----------------
thanks for putting the entire output here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122076/new/
https://reviews.llvm.org/D122076
More information about the lldb-commits
mailing list