From patchwork Mon Jan 29 16:00:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126179 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp2557488ljd; Mon, 29 Jan 2018 08:05:17 -0800 (PST) X-Google-Smtp-Source: AH8x224qLUN19tM71j3nkq6q2S/WZWDGcDv3GdSUk9e2+UL9GDazDPkqBZOD9birWLFa6LwU6xl5 X-Received: by 10.37.7.135 with SMTP id 129mr17098430ybh.42.1517241917070; Mon, 29 Jan 2018 08:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517241917; cv=none; d=google.com; s=arc-20160816; b=sV+GC54A6i4zfTB4SavauZeau6aasJA8+aVeYEgdgZf8ZnKrEXnveP4oOTvNqEWhS3 QLphniadHBGVJjcNSqDfG+uW5yxUw4nqA+hc4lVJym3Kdnw4HVql33nBIHoO/uJ/PWLn 879/6v9TLiJ++4kZAQQB7APtcinGyel49aXK1VYpQGwUhk59kxRgSMzMUjhirwkT5clG 3xYKl4XubdgsBvTz1yyyUfhcIeEaR5CKDfi1Go4/F3O5RRx+bsEoYvYWZcTUiZdlWJwX SLbqPC2wT1pUGrzCcSW7RYALQ3BrItG3X2DEptlIy1v3ZbAdhxnqUoro8fCaE4Gca9U7 Vo7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=zBC+0G49dGi2tV4rHm7bygsC8vw30gLtUHehz6m1Hl0=; b=G/95BZdurhiml3+ow06ZzS/tSW2HvWTM47yboeMDMdR9RJGHakGsaNEIlWVPW0Wo+i dCwr72Vl3fWJlAh6+jPMNYSPye60vxbD1NyasTBDBBlXc9no945FyUoPfzvAJ2ZIvBWV gUGzj0yUWB48x84xMJwkdy5T7tkMlmaPwjbRfPVF9v6xWAGz1BveAsmVwf5xEepeX+lF HmjnsEW0eghjG5yRKBCyatPU4dmtqu6VQ5D+Ghd73QJM0ZYIsXZys+dstlhx3PC3Xlxo jOO4A81aHu/ZmCEN3RWmvlKPZA0lvoeXCqjEKvlwtM3+MU74/WPIdbPBUidM78214Fjw dXaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id n30si1657342qtc.384.2018.01.29.08.05.16; Mon, 29 Jan 2018 08:05:17 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id AC84A60881; Mon, 29 Jan 2018 16:05:16 +0000 (UTC) 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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 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 44AA06171E; Mon, 29 Jan 2018 16:00:58 +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 6C9B261735; Mon, 29 Jan 2018 16:00:36 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 435EF60C5E for ; Mon, 29 Jan 2018 16:00:28 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward104o.mail.yandex.net (Yandex) with ESMTP id CCBA07022DC for ; Mon, 29 Jan 2018 19:00:26 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id k0Nib4F8ic-0Qd49Jhp; Mon, 29 Jan 2018 19:00:26 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1WljkUuA25-0Qd8397C; Mon, 29 Jan 2018 19:00:26 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 29 Jan 2018 19:00:20 +0300 Message-Id: <1517241621-24528-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517241621-24528-1-git-send-email-odpbot@yandex.ru> References: <1517241621-24528-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 406 Subject: [lng-odp] [PATCH CATERPILLAR v3 6/7] example: instrum: update DEPENDENCIES 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bogdan Pricope Describe configuration and requirements of code instrumentation library. Signed-off-by: Bogdan Pricope --- /** Email created from pull request 406 (bogdanPricope:cat_benchmark_pr) ** https://github.com/Linaro/odp/pull/406 ** Patch: https://github.com/Linaro/odp/pull/406.patch ** Base sha: 5251bda54b51d3754aaf8c988aa959b48b4d25f9 ** Merge commit sha: 2d6677b6a3794cad32abe2af7314215ea22921c3 **/ DEPENDENCIES | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/DEPENDENCIES b/DEPENDENCIES index 008c4df4d..5d5cb77bc 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -202,6 +202,88 @@ Prerequisites for building the OpenDataPlane (ODP) API 1024MB of memory: $ sudo ODP_PKTIO_DPDK_PARAMS="-m 1024" ./test/performance/odp_l2fwd -i 0 -c 1 +3.5 Code instrumentation with PAPI library (optional) + + PAPI library is used to instrument ODP API. + +3.5.1 Building PAPI library + + ODP example library 'instrum' is using PAPI library to retrieve performance + counters associated with execution of ODP API. PAPI library is currently at 5.6.0. + However, if possible one should try to use the latest PAPI master branch commit for + the best performance and the latest bug fixes. + + # Checkout PAPI code + $ git clone https://bitbucket.org/icl/papi.git + $ cd papi + $ git checkout papi-5-6-0-t (optional) + + # Build PAPI + $ cd ./src/ + $ ./configure --prefix= + $ make clean + $ make + $ make install + + Alternatively, one may install PAPI from packages, if available. + # apt-get install libpapi-dev + +3.5.2 Building ODP with PAPI support + + $ cd + $ ./bootstrap + $ ./configure --enable-code-instrum --with-papi-path= + $ make clean + $ make + + Note 1: Specifying PAPI install path (with '--with-papi-path' option) is not required if + PAPI was installed from packages. + Note 2: Building ODP with PAPI support forces dynamic linkage of ODP example applications with + ODP library. + +3.5.3 Configuration of instrumented API set + + Instrumentation profile option can be applied at configure time to select API set to + be instrumented. By default, all ODP APIs stated in 'instrum' example are instrumented. + + $ ./configure --with-papi-path= --with-code-instrum-profile= + +3.5.4 Running ODP application with code instrumentation + + ODP example library 'instrum' is preloaded before execution of ODP application. ODP application + must link dynamically with ODP library. + + # LD_PRELOAD=libinstrum.so.0.0.0 ./odp_application + + Note: ODP and PAPI shared libraries must be accessible at runtime. Use LD_LIBRARY_PATH for + non-standard locations. + + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/lib + +3.5.5 Retrieving performance counters + + Performance counters are acquired per ODP worker and dumped in fix size sample chunks to CSV files. + + CSV file name is composed as follows: profile__.csv + + Default CSV files storage folder is '/tmp'. Use ODP_INSTRUM_STORE_DIR environment variable to + select a different folder. + + # export ODP_INSTRUM_STORE_DIR= + + CSV row contains the counters for execution of one API call: timestamp (ns) for the start of API call, + duration (cycles), API name and the differences between end and start for the list of PAPI counters. + +3.5.6 Selecting performance counters + + By default, PAPI_BR_CN and PAPI_L2_DCM are acquired. Use ODP_INSTRUM_PAPI_EVENTS environment variable + to configure the list of PAPI counters (events). + + # export ODP_INSTRUM_PAPI_EVENTS=PAPI_BR_CN,PAPI_L2_DCM,PAPI_BR_UCN + + Note: Some PAPI counters may not be available for some architectures. Use papi tools 'papi_avail' and + 'papi_native_avail' to retrieve the list of available counters. + 4.0 Packages needed to build API tests CUnit test framework version 2.1-3 is required