From patchwork Wed Jan 27 18:37:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 60640 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp14756lbb; Wed, 27 Jan 2016 10:37:30 -0800 (PST) X-Received: by 10.55.212.89 with SMTP id l86mr27847102qki.8.1453919850701; Wed, 27 Jan 2016 10:37:30 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c124si7140956qhc.105.2016.01.27.10.37.30; Wed, 27 Jan 2016 10:37:30 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D6D93617F1; Wed, 27 Jan 2016 18:37:29 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=bMjjj74+; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C73F961783; Wed, 27 Jan 2016 18:37:24 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BC8A6617C7; Wed, 27 Jan 2016 18:37:22 +0000 (UTC) Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by lists.linaro.org (Postfix) with ESMTPS id 5A3DC6177F for ; Wed, 27 Jan 2016 18:37:21 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id o11so14247813qge.2 for ; Wed, 27 Jan 2016 10:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tc6I35pbsUc0zdlAr4Ypeh/KNY2Ny/k3WVqzyU6Ag9Y=; b=bMjjj74+cdEUdtjDOBYtovP6OrDzOGoDqnZ3fv1DkIt3rNsdW+CXYniC16FpC6JowM 0LYmvqUqLcekOcBJTWvwNvLJSg/VZq49o+3UwnZmK3otzz6Ct/ndQAIlSOlgU/1sYPjQ 1RVWd0yzoyv7QVJPCLYka7PD4+osMUpF9aQ5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Tc6I35pbsUc0zdlAr4Ypeh/KNY2Ny/k3WVqzyU6Ag9Y=; b=MNwNv/21e0R1VzxnjLQQabIY2OL2nnyQqNxPshqrxcuHkx5lp/A5QGIGEowzeOOP+H t7CqNE1SaiTAuvj4nTLqPbW2bP++nQcf27Y0K4Vk2dhQQxoUX4eRb4WsmxYXiEtXfFor EE6fjrkQ3sVbAfAJVDpXoRCuCeHFrmFgfhA9Jg7y5TDSqJU2GhlerOKieYrn0P6KsEMg u8WkUUjLvpngqS4UC9K/QkSz7p+VOKTnJ0okXGsgwI/7uiOPPE34eSSXFrLod9uBPWG4 R5yI+03hi2EiRC/RRN8GTrkWMTqeapQkIRe2b+cIeszlzj/i7mMKNDoIdOv52eNMNZGx ophQ== X-Gm-Message-State: AG10YOQ+MHApDvbaEveb6/55Je3EE8LrKQTWg+qWyEJF/BMn7MGI54xGIkEqpXsUsPMNo1vX+qI= X-Received: by 10.140.92.215 with SMTP id b81mr37909821qge.44.1453919841092; Wed, 27 Jan 2016 10:37:21 -0800 (PST) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id v74sm2185004qka.7.2016.01.27.10.37.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jan 2016 10:37:20 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 27 Jan 2016 13:37:13 -0500 Message-Id: <1453919833-19364-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453919833-19364-1-git-send-email-mike.holmes@linaro.org> References: <1453919833-19364-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v3 2/2] linux-generic: test: add performance test framework X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Add infrastructure for platform dependent performance testing. Added scheduler performance test using process mode. Signed-off-by: Mike Holmes --- v3: Fixes running by hand (Bill) Cleanups for installcheck etc (Stuart) platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/test/Makefile.am | 4 ++++ platform/linux-generic/test/performance/.gitignore | 1 + .../linux-generic/test/performance/Makefile.am | 22 +++++++++++++++++ .../test/performance/odp_scheduling_proc_run | 28 ++++++++++++++++++++++ test/performance/Makefile.am | 2 +- 6 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 platform/linux-generic/test/performance/.gitignore create mode 100644 platform/linux-generic/test/performance/Makefile.am create mode 100755 platform/linux-generic/test/performance/odp_scheduling_proc_run diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 97c15fa..82b7c5e 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -23,5 +23,6 @@ m4_include([platform/linux-generic/m4/odp_pcap.m4]) AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/test/Makefile + platform/linux-generic/test/performance/Makefile platform/linux-generic/test/validation/Makefile platform/linux-generic/test/validation/pktio/Makefile]) diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 3cf638d..7fe79c9 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -4,6 +4,10 @@ if test_vald SUBDIRS += validation endif +if test_perf +SUBDIRS += performance +endif + if test_installdir installcheck-local: $(DESTDIR)/$(testdir)/run-test diff --git a/platform/linux-generic/test/performance/.gitignore b/platform/linux-generic/test/performance/.gitignore new file mode 100644 index 0000000..93778a9 --- /dev/null +++ b/platform/linux-generic/test/performance/.gitignore @@ -0,0 +1 @@ +tests-performance.env diff --git a/platform/linux-generic/test/performance/Makefile.am b/platform/linux-generic/test/performance/Makefile.am new file mode 100644 index 0000000..7b0c096 --- /dev/null +++ b/platform/linux-generic/test/performance/Makefile.am @@ -0,0 +1,22 @@ +include $(top_srcdir)/test/Makefile.inc +TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/performance + +if test_perf +TESTS = odp_scheduling_proc_run +endif + +TEST_ENV = tests-performance.env + +dist_check_SCRIPTS = odp_scheduling_proc_run $(TEST_ENV) $(LOG_COMPILER) + +test_SCRIPTS = $(dist_check_SCRIPTS) + +.PHONY: performance-test-env +performance-test-env: + +clean-local: tests-performance.env + +tests-performance.env: + echo "TESTS=\"$(TESTS)\"" > $@ + echo "$(TESTS_ENVIRONMENT)" >> $@ + echo "$(LOG_COMPILER)" >> $@ diff --git a/platform/linux-generic/test/performance/odp_scheduling_proc_run b/platform/linux-generic/test/performance/odp_scheduling_proc_run new file mode 100755 index 0000000..31d43be --- /dev/null +++ b/platform/linux-generic/test/performance/odp_scheduling_proc_run @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Copyright (c) 2015, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Script that passes command line arguments to odp_scheduling test when +# launched by 'make check' +TEST_DIR="${TEST_DIR:-$(dirname $0)}" + +PATH=${TEST_DIR}:$PATH +PATH=$(dirname $0)/../../../../test/performance:$PATH + +ret=0 + +run() +{ + echo odp_scheduling_proc_run starts with $1 worker threads + echo =============================================== + + odp_scheduling${EXEEXT} -c $1 --proc || ret=1 +} + +run 1 +run 8 + +exit $ret diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index 721615b..719be2b 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -14,7 +14,7 @@ if test_perf TESTS = $(EXECUTABLES) $(TESTSCRIPTS) endif -bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) +test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) odp_atomic_LDFLAGS = $(AM_LDFLAGS) -static odp_atomic_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test