[PATCH] D77422: [llvm-exegesis] Add benchmark mode that uses LBR for more precise measurements.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 23:22:48 PDT 2020


courbet added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp:184
+    } else if (PollResult == 0) {
+      llvm::errs() << "LBR polling timed out without result, NumTimeouts ="
+                   << NumTimeouts << ". ";
----------------
oontvoo wrote:
> courbet wrote:
> > how often does that happen ? Do we want that much logging ?
> It could happen 100% of the time if the code happens to have no branches.
> With "proper" input, it happens less frequently. I don't really have a sense of how often ... it's probably be fine to change this to llvm::debug() or something? 
> 
> 
I'm not worried about the no-branch case as we can avoid that. We might as well remove it, because we don't really care if it fanally succeeded, and if it did not we can print an error there.


================
Comment at: llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp:183
+                                                 llvm::errc::io_error);
+    else if (PollResult != 0)
+      continue;
----------------
you don't need the else after the return.


================
Comment at: llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp:189
+      continue;
+    } else {
+      llvm::errs() << "At max-retries. Giving up. This probably means there "
----------------
you don't need the else here after the continue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77422/new/

https://reviews.llvm.org/D77422





More information about the llvm-commits mailing list