From patchwork Tue Feb 6 10:00:21 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: 126978 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2768077ljc; Tue, 6 Feb 2018 02:09:31 -0800 (PST) X-Google-Smtp-Source: AH8x226lgqMcV47/xi8XBGQ++h2nGuSGB3gONq9wZbTcnejGsBGVlgN880eCFBrO2aGdmrqNTBnc X-Received: by 10.55.10.23 with SMTP id 23mr2504291qkk.93.1517911771259; Tue, 06 Feb 2018 02:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517911771; cv=none; d=google.com; s=arc-20160816; b=f0dUyEvU+VRW2GkoHopNXGWbzM7+KD/nX+ekSDyL+2v2Qt6pMipRKf4s4s8azSZG7c TPnZgztDgDCmx8JsK8+ukaF9qHbwlAVSNUagtBMxWKPit+vcV9LYTITYQzMITxc29xe6 B375rB/By7J950uLzSIy/+69+tHWkKd8vZzWwOWYJqqvAv6gM0Os41o2e7JcVF9Hp+Vv di6sPPs2HEYFz7O6opp2j6WMkmZ+2wlrtnQwSonBHW3dfBBm7po7pz5/ii0M64/r+JzU b9h6i2fx7vevUcvK3NZxkzjfeDS0cBSf41Fxadh2zIxF+wiojml+neNRATzUNsCjBH8w suNQ== 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=o9iT4uq4VTiOtg50huu9b8VbCJyKoNLMHwV2x/eQFbQ=; b=XoBEPYBftTmS17stvaTr7jF0B8d7woUUff5yd3Dl6Qxnhkim+4h+zNL5JLlHeYYE0S b8kRCfOKJxczIOH+V3Zu6ASXJk5JhoOA5f1wgtNp0sM/dUGgjyJJ6sybjQXKVg7l4yIR wvvAUZsBmkrCg9zUAG1tyd4YhsI0+od5g4uCL2dpQ1ngx3+qFnrt2IgFgCEjL5cIiZqX Ru489KoQ9yjJK8r9b+xuvwa7DU+HcSlwMSDlQ4hZLZxVjaSOeqPQul7L88yGGDHQFuHZ ww9QY/SACuFimJD2y0oRUjiElTHgWN7W6vlxFZsTd2AE09IRL5fW7YdhtLXaAQvKJpkW 9VIQ== 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 m30si1743966qtk.225.2018.02.06.02.09.31; Tue, 06 Feb 2018 02:09:31 -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 EB8D861802; Tue, 6 Feb 2018 10:09:30 +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_H3, RCVD_IN_MSPIKE_WL 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 8F10A619C0; Tue, 6 Feb 2018 10:04:08 +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 38AF162783; Tue, 6 Feb 2018 10:03:58 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 83497617D2 for ; Tue, 6 Feb 2018 10:01:28 +0000 (UTC) Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 7FEE25601E25 for ; Tue, 6 Feb 2018 13:01:27 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id d4VjeVeUU0-1Rja2OX9; Tue, 06 Feb 2018 13:01:27 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bzfBbjnfEh-1KwWXwpb; Tue, 06 Feb 2018 13:01:20 +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: Tue, 6 Feb 2018 13:00:21 +0300 Message-Id: <1517911222-3896-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517911222-3896-1-git-send-email-odpbot@yandex.ru> References: <1517911222-3896-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 443 Subject: [lng-odp] [PATCH v4 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 443 (bogdanPricope:master_benchmark_pr) ** https://github.com/Linaro/odp/pull/443 ** Patch: https://github.com/Linaro/odp/pull/443.patch ** Base sha: 27a7923236030fed0272cc9072f0cde62496e91d ** Merge commit sha: 34bd4730244cef8aa4ef2778135e469012c66768 **/ DEPENDENCIES | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/DEPENDENCIES b/DEPENDENCIES index 6f374ca92..ad2ef53d3 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -204,6 +204,92 @@ 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) + + ODP example library 'instrum' is using PAPI library to retrieve performance + counters associated with execution of ODP API. + +3.5.1 Installing PAPI library + + PAPI library is available as package in a variety of Linux distributions. If available, + install PAPI from distro-provided package. + + # apt-get install libpapi-dev + + Alternatively, one may try to use the latest PAPI master branch commit for + the best performance and the latest bug fixes. PAPI library is currently at 5.6.0. + + # 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 + +3.5.2 Building ODP with PAPI support + + $ cd + $ ./bootstrap + $ ./configure --enable-code-instrum + $ make clean + $ make + + Note 1: When PAPI is built from sources and installed in a custom folder, it is mandatory to specify + at configuration time the path to package configuration file. + + $ ./configure --enable-code-instrum PKG_CONFIG_PATH=/lib/pkgconfig + + 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 --enable-code-instrum --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