Message ID | 20240214045356.748330-1-irogers@google.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp990539dyb; Tue, 13 Feb 2024 20:54:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVotVwmfq8a+cCjFoBXAA7KG7hxP9LWfqrTHBgiVflTF68tnVqoGY+JtA1/+ObFnb9vPZiNAK18pkd0Qad4XBTA/GAR3w== X-Google-Smtp-Source: AGHT+IGrBW9+DzPfbgIhA+J58QQrIzC1TJ5nM9KlRECa7K+zOdiQXr9Z/7kvf005zM1H1wOAbXgj X-Received: by 2002:a05:620a:15bb:b0:785:c078:9fd2 with SMTP id f27-20020a05620a15bb00b00785c0789fd2mr1697652qkk.25.1707886487100; Tue, 13 Feb 2024 20:54:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707886487; cv=pass; d=google.com; s=arc-20160816; b=gSlMH+hzZnTfiYduM6meNJhTFiwCNA9e+yH5sRbCab17AsQNfOzA7aaTddlmi6OMEO LkpqrQJu65WsJa89lxz0+qfRWZazNdD3nOiA4xmJi+H/UwEnBhUs1Q7ryKodoOK5Jzqm uu+kNCjUaTDoZgR4qT6Vqrz66VtUd1HLiS4UwCUc56sFXREvAcqbEcpWduhCzqzL2Chh HjLJlk/ogiUslvgx2YH/qthv5pgZf5sk5kTEgNvvkAActSC5RaQyW1gCwnIWLMM6GROw G2UourT2WdqVbTE4hmBGlTrZX97Xfp8eEoZ9aGUuipMLo/XtefO1CKcJaQL/yEV66sOz vdAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=ctzZOFDIDCO27f6VAbHfS1jvQWovSoWz66g42EKGfuk=; fh=HF7vS9CRMJrB5GCQiEZ2Sbv6o3zYFpsrxCOMB/rxzQQ=; b=vk8Zy3pS8nsiSJBbDvcdeFNzGdcjXiNeyUGwwjl+aKJiU73BMQ1Igb7XTgZmZpaZI1 U+MnmY1UzV+mibf1o6KgDx+8EPEj3ep9FfUULnxKqsZrJbrETAr4UCJAKSongxxlt8gs CJPHwcFULVGB3SKsZL6xqOVrPJ6jlLwajO2x7w2lypCjUFYRr+59WEwrV4AuqVp2HbqV any8llQllYDGjAEL9BArvtzafKNtA8m+2VeopjQQ0M9XULdkzC9wFNwtJkdlha7w3Og4 aQ1zPY0wDe6ffPjkc4yIApFJ2N3zh+RprWeF4kqUASoEYtHRCr2JuUB3Ab9ruEsvOEdt KGYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uPyKZM8Y; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCUrif5FYsvJuNv//l60+RDRZ4llQeBKsPGGYLQunRGpLPgPj8qfLuJmN3lzrmsnbJkmkRG9fnqW/xkOuV/BOSAtuHYBnA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l14-20020a05620a210e00b007872209d07csi2348287qkl.575.2024.02.13.20.54.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 20:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uPyKZM8Y; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64736-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DE8941C2675C for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 04:54:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52058D510; Wed, 14 Feb 2024 04:54:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uPyKZM8Y" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 369FB10A01 for <linux-kernel@vger.kernel.org>; Wed, 14 Feb 2024 04:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707886473; cv=none; b=jryRA8oY9XSW8P+JNCDG3WxBWiJBlq+33pJOqhfCeaTIR2WSzxKfsa/83KCj82a2sxhzCc+RD7xlVclIMygc3VNEc+kEDFJ4+Fcfon4Rml/XxWWS34eA89Ur90pcyvNay+AdOUAffcuTrU1MKN4GpmTtoAsKArzziahP6yQGut0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707886473; c=relaxed/simple; bh=AZkj8nr3rTJwCIYBmRK7nb3+iIvG9RkuLmqV/PSrPQs=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=eI4u8dglGmpOCwVyEiVmy6O8peVlEb1u15gy4CTNbDExQyR6GBB7lNfNuOjUIEXzTUgYY2kn2doBI2joT5NYXj0czEiIjChacxncfYRL5UA8y5Wi6a+GDa5MWUpUTnC4uMzdNDk9GR8PrwREdb/bWgHXBOVMnW+Q51frbg5xifo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=uPyKZM8Y; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcbfe1a42a4so4464895276.2 for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 20:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707886471; x=1708491271; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=ctzZOFDIDCO27f6VAbHfS1jvQWovSoWz66g42EKGfuk=; b=uPyKZM8YMvZZIznt1YcoDrzBj1Tk2olWjC2SI9xAFwwMlF23m+6PUoSyQxdj6Zuu+d 7Ei5HeuvifXvbwrQkNMHGAH1/rtjrHno38Zl8I6lt8yTUOfiuuGO/KoNv6sTpmzhDczz muKzAqsaehNRUKTsFTDzxZ7/v6LTCVUWm9ZBIdXFy2+KnT9I4sDueqPbgNoKXekvuaB/ nzXTxJ3L8Z68qtyTkN/+gYfFMoVbFg3K9Qo8BcOEk+6nbi3xPGnHmi0yZP8TNBFJAn4U l52dvZAr5tPe0oQv67DTkBGxYlUqU5hH2Mj3A4mXb2JGcOc5xCtIZKYkVkcBWHi5rs1j 16fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707886471; x=1708491271; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ctzZOFDIDCO27f6VAbHfS1jvQWovSoWz66g42EKGfuk=; b=vkK4DmYkmsNINe7vjzGPvbBL4o7ox54NnGbrnfYu4DWlyl0RF5OlhSVDMxzEzSUy8i WFsa0+SCRF2FmnJdWaQNQfe3saPJF2EnPBJpbFQoZXlBA+jQGpx7HkQjNNgv/mtFZPos 6NjWQGxs69IlSGs0rLSjZETwNEC8KYRUnKGMMrAbZ+werQ7FWrZdvD5Xk/RstJFDvRtK OQUF1U/pVTWj2Dj35NpAjS8cUj6qFVWceu2mHbRYFM91dKu7SsXkEe0Julpv2QTXJNmv FWCmamxmmSjR53bFzo6wvePIPgCYPf6KsWGDcIApy702OSJf4w1Inu+ClRT2G0FFxDX5 LcGg== X-Forwarded-Encrypted: i=1; AJvYcCXtCJrfHNayq+sCtyUgBoYHvN4QabD7mWxVTS+Nv2Mid2k1wWEORK6RNDzRTUM3raskn98KGDw2jw6ZyrOjRcEzL+czIxT7SACUuev4 X-Gm-Message-State: AOJu0YzNzb1GiZolgKMVRhBAHKCWiAvC3p/2mrcSHIzLWZ05UoN7WQ3U r4T/O2lUN/XqHV+qlk44Tz3BOZ5UbmUwKKNzuZjwH4jzqSdMx0UeeG7FNhENikrEhDfiJgygqsn SNTRAQQ== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6d92:85eb:9adc:66dd]) (user=irogers job=sendgmr) by 2002:a05:6902:150d:b0:dc6:e1ed:bd1a with SMTP id q13-20020a056902150d00b00dc6e1edbd1amr357350ybu.2.1707886471142; Tue, 13 Feb 2024 20:54:31 -0800 (PST) Date: Tue, 13 Feb 2024 20:53:48 -0800 Message-Id: <20240214045356.748330-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Subject: [PATCH v4 0/8] Run tests in parallel From: Ian Rogers <irogers@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Bill Wendling <morbo@google.com>, Justin Stitt <justinstitt@google.com>, James Clark <james.clark@arm.com>, Athira Jajeev <atrajeev@linux.vnet.ibm.com>, Kan Liang <kan.liang@linux.intel.com>, Yang Jihong <yangjihong1@huawei.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790848781150591202 X-GMAIL-MSGID: 1790848781150591202 |
Series |
Run tests in parallel
|
|
Message
Ian Rogers
Feb. 14, 2024, 4:53 a.m. UTC
If command line option '-p' is provided, start/fork all tests in the main thread and then gather them in order at the end. On a laptop test time was reduced from 5 minutes 21 seconds to 1 minute 50 seconds. The option isn't default as the test shows up perf and test flakes. The '-v' option is modified so that 'perf test -v' will give verbose output only from failing tests. v4 - fix bug in width computation. v3 - fix a crash if shell test directory isn't found, remove merged patch. v2 - fix parallel test output/verbose issue v1 - initial PoC Ian Rogers (8): perf thread_map: Skip exited threads when scanning /proc perf list: Add scandirat compatibility function perf tests: Avoid fork in perf_has_symbol test tools subcmd: Add a no exec function call option perf test: Rename builtin-test-list and add missed header guard perf tests: Use scandirat for shell script finding perf tests: Run time generate shell test suites perf tests: Add option to run tests in parallel tools/lib/subcmd/run-command.c | 2 + tools/lib/subcmd/run-command.h | 2 + tools/perf/tests/Build | 2 +- tools/perf/tests/builtin-test-list.c | 207 ---------- tools/perf/tests/builtin-test-list.h | 12 - tools/perf/tests/builtin-test.c | 378 ++++++++++-------- tools/perf/tests/shell/lib/perf_has_symbol.sh | 2 +- tools/perf/tests/tests-scripts.c | 257 ++++++++++++ tools/perf/tests/tests-scripts.h | 9 + tools/perf/util/print-events.c | 12 +- tools/perf/util/thread_map.c | 9 +- tools/perf/util/util.c | 19 + tools/perf/util/util.h | 8 + 13 files changed, 509 insertions(+), 410 deletions(-) delete mode 100644 tools/perf/tests/builtin-test-list.c delete mode 100644 tools/perf/tests/builtin-test-list.h create mode 100644 tools/perf/tests/tests-scripts.c create mode 100644 tools/perf/tests/tests-scripts.h
Comments
Hi Ian, On Tue, Feb 13, 2024 at 8:54 PM Ian Rogers <irogers@google.com> wrote: > > If command line option '-p' is provided, start/fork all tests in the > main thread and then gather them in order at the end. On a laptop test > time was reduced from 5 minutes 21 seconds to 1 minute 50 seconds. The > option isn't default as the test shows up perf and test flakes. It's a bit sad that tests flake when run in parallel but I think we can work on improving it later. So Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > > The '-v' option is modified so that 'perf test -v' will give verbose > output only from failing tests. > > v4 - fix bug in width computation. > v3 - fix a crash if shell test directory isn't found, remove merged patch. > v2 - fix parallel test output/verbose issue > v1 - initial PoC > > Ian Rogers (8): > perf thread_map: Skip exited threads when scanning /proc > perf list: Add scandirat compatibility function > perf tests: Avoid fork in perf_has_symbol test > tools subcmd: Add a no exec function call option > perf test: Rename builtin-test-list and add missed header guard > perf tests: Use scandirat for shell script finding > perf tests: Run time generate shell test suites > perf tests: Add option to run tests in parallel > > tools/lib/subcmd/run-command.c | 2 + > tools/lib/subcmd/run-command.h | 2 + > tools/perf/tests/Build | 2 +- > tools/perf/tests/builtin-test-list.c | 207 ---------- > tools/perf/tests/builtin-test-list.h | 12 - > tools/perf/tests/builtin-test.c | 378 ++++++++++-------- > tools/perf/tests/shell/lib/perf_has_symbol.sh | 2 +- > tools/perf/tests/tests-scripts.c | 257 ++++++++++++ > tools/perf/tests/tests-scripts.h | 9 + > tools/perf/util/print-events.c | 12 +- > tools/perf/util/thread_map.c | 9 +- > tools/perf/util/util.c | 19 + > tools/perf/util/util.h | 8 + > 13 files changed, 509 insertions(+), 410 deletions(-) > delete mode 100644 tools/perf/tests/builtin-test-list.c > delete mode 100644 tools/perf/tests/builtin-test-list.h > create mode 100644 tools/perf/tests/tests-scripts.c > create mode 100644 tools/perf/tests/tests-scripts.h > > -- > 2.43.0.687.g38aa6559b0-goog >