[llvm] [BOLT][test] Update perf2bolt/perf_test.test (PR #73482)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 26 21:21:42 PST 2023


https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/73482

perf_test keeps failing on bolt-aarch64-ubuntu-clang-shared:
https://lab.llvm.org/buildbot/#/builders/221/builds/20330

The reason is likely that there are no samples due to short test runtime.
Bump up the running time 10x and remove unneeded headers.

With the change that test passed on a buildbot host 10/10 times.


>From 8ae3b53517646293da581fd69435315a69a42e58 Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Sun, 26 Nov 2023 21:15:04 -0800
Subject: [PATCH] [BOLT][test] Update perf2bolt/perf_test.test

perf_test keeps failing on bolt-aarch64-ubuntu-clang-shared:
https://lab.llvm.org/buildbot/#/builders/221/builds/20330

The reason is likely that there are no samples due to short test runtime.
Bump up the running time 10x and remove unneeded headers.

With the change that test passed on a buildbot host 10/10 times.
---
 bolt/test/perf2bolt/Inputs/perf_test.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/bolt/test/perf2bolt/Inputs/perf_test.c b/bolt/test/perf2bolt/Inputs/perf_test.c
index 5830c4ca027b5a3..6c7044cc6b67f21 100644
--- a/bolt/test/perf2bolt/Inputs/perf_test.c
+++ b/bolt/test/perf2bolt/Inputs/perf_test.c
@@ -1,7 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
 int add(int a, int b) { return a + b; }
 int minus(int a, int b) { return a - b; }
 int multiple(int a, int b) { return a * b; }
@@ -15,7 +11,7 @@ int main() {
   int a = 16;
   int b = 8;
 
-  for (int i = 1; i < 100000; i++) {
+  for (int i = 1; i < 1000000; i++) {
     add(a, b);
     minus(a, b);
     multiple(a, b);
@@ -23,4 +19,4 @@ int main() {
   }
 
   return 0;
-}
\ No newline at end of file
+}



More information about the llvm-commits mailing list