[llvm] [llvm-exegesis] Debug generated disassembly (PR #142540)
Lakshay Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 04:13:39 PDT 2025
================
@@ -655,6 +660,96 @@ BenchmarkRunner::getRunnableConfiguration(
if (Error E = Snippet.takeError())
return std::move(E);
RC.ObjectFile = getObjectFromBuffer(*Snippet);
+
+ // Print the assembled snippet by disassembling the binary data
+ // Extract the actual function bytes from the object file
+ std::vector<uint8_t> FunctionBytes;
+ if (auto Err = getBenchmarkFunctionBytes(*Snippet, FunctionBytes)) {
+ dbgs() << "Failed to extract function bytes: " << toString(std::move(Err))
----------------
lakshayk-nv wrote:
Printing generating assembly as we agreed, quite an optional feature, orthogonal to getting hardware measurement. Thus, didn't want to interfere with default functioning of exegesis and simple print out any error/warning in this flow and continue with soft failure.
https://github.com/llvm/llvm-project/pull/142540
More information about the llvm-commits
mailing list