This is an archive of the discontinued LLVM Phabricator instance.

[trace][intelpt] Instruction count in trace info
ClosedPublic

Authored by zrthxn on Mar 19 2022, 12:59 PM.

Details

Summary

Added a line to thread trace dump info results which shows total number of instructions executed until now.

Diff Detail

Event Timeline

zrthxn created this revision.Mar 19 2022, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2022, 12:59 PM
zrthxn requested review of this revision.Mar 19 2022, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2022, 12:59 PM
zrthxn updated this revision to Diff 416736.Mar 19 2022, 1:53 PM

Fix failing test

wallace requested changes to this revision.Mar 19 2022, 2:55 PM

just some minor details and good to go

lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
108

use -> instead of dereferencing. It's less characters and more readable

115

no need to create a new variable. You can just inline everything here. It's not complex

lldb/test/API/commands/trace/TestTraceDumpInfo.py
38–42

thanks for putting the entire output here

This revision now requires changes to proceed.Mar 19 2022, 2:55 PM
zrthxn updated this revision to Diff 416756.Mar 19 2022, 10:40 PM

Using arrow op and made it inline. I think creating a variable looks a bit better but this is fine too.

zrthxn marked 3 inline comments as done.Mar 19 2022, 10:41 PM
wallace accepted this revision.Mar 19 2022, 10:51 PM

Lgtm!

This revision is now accepted and ready to land.Mar 19 2022, 10:51 PM
This revision was automatically updated to reflect the committed changes.