perf test: Read child test 10 times a second rather than 1
authorIan Rogers <irogers@google.com>
Fri, 1 Mar 2024 07:46:39 +0000 (23:46 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 21 Mar 2024 16:54:39 +0000 (13:54 -0300)
Make the perf test output smoother by timing out the poll of the child
process after 100ms rather than 1s.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Disha Goel <disgoel@linux.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20240301074639.2260708-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c

index e05b370b1e2b1d7b1e97662600a9a4c60ef22965..ddb2f4e38ea523ba3e70f1f0b5789aa081ad6b4b 100644 (file)
@@ -307,8 +307,8 @@ static int finish_test(struct child_test *child_test, int width)
                char buf[512];
                ssize_t len;
 
-               /* Poll to avoid excessive spinning, timeout set for 1000ms. */
-               poll(pfds, ARRAY_SIZE(pfds), /*timeout=*/1000);
+               /* Poll to avoid excessive spinning, timeout set for 100ms. */
+               poll(pfds, ARRAY_SIZE(pfds), /*timeout=*/100);
                if (!err_done && pfds[0].revents) {
                        errno = 0;
                        len = read(err, buf, sizeof(buf) - 1);