From patchwork Thu Jan 25 14:00:24 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: 125849 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1131636ljf; Thu, 25 Jan 2018 06:01:51 -0800 (PST) X-Google-Smtp-Source: AH8x226xQqdgiVRWHwuHHZmljhDX9QXRhRSAmXBxUUYJmEWGzFp+fyWNMJLuB/gmBmn8gZNgAj2f X-Received: by 10.37.239.8 with SMTP id g8mr8272299ybd.500.1516888911660; Thu, 25 Jan 2018 06:01:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516888911; cv=none; d=google.com; s=arc-20160816; b=cu4GmNRdQyXe3IYxRBJl7MG5sQbClGOMsb7km8MG8NjGL0GpGbxoFTRroUR70b2Sdp YOA2RX1rlxqQhxK8u6z8mSEahq/TKWKmfJKxQbwExm3k46/3JYU7ZIlzYr0PbVHyPEOe NO2K3qQnjOiZnmSjILici9S9TUrCmeTuKAKoT/G26g4wXnIlQMd5qi2TRx2HEYBeYWPc 5bEVfuHJKxO/WX+5sRguIQVjhWxqaMmAOSOgTRBKE/ZIFEiquxf0lTjzcp5XVAdHfwbB HWMjlogqJAjymiT1sCw/KCgEOjT/90aPUQ0mrNFSFiY5vncWqlrqpJV9CP7DCI4VGzxi OtTg== 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=oUFP3kjuGDKBtiQFe5B6UYVPlt1zM6Jk6FxOyahlfLo=; b=ItGP0dO5Zivo3KVCaR41zZzsez/l0Twdtfq7FgkI2iqjbQIx+vegyr5SGXKtjE+MLa Z1Jr2jwlDoRh0MWr9PAlEoleZEh7BAhInetM3ATJiwnJPFyGn0JzIZBWunbliY3brC6A 7QAQkGDB6PAw7Xu1t6UvhTugjtChMOtrMw4KllnVQAZuCCiEzDZjrHhIEw+7kS9QLfrG qZzfqepjJXmf+KNMaENbLnKfenmQ5elI8SNopzB/68gnXsDal781/3be2bE4Sr8W8AwR bHW7povHo7O3x6r4ZLplwAZpqRFdDBID9pVEDu75ld2l9ieI4Ksx2l8zgVJ9hmg2ryKk zPdQ== 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 k3si2566172qkb.279.2018.01.25.06.01.51; Thu, 25 Jan 2018 06:01:51 -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 22A6261798; Thu, 25 Jan 2018 14:01:51 +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 7C3A46172A; Thu, 25 Jan 2018 14:00:48 +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 61369616F8; Thu, 25 Jan 2018 14:00:36 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 38443616F8 for ; Thu, 25 Jan 2018 14:00:31 +0000 (UTC) Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 110FC430507B for ; Thu, 25 Jan 2018 17:00:30 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id kr3eFY5KjN-0Th8j3mc; Thu, 25 Jan 2018 17:00:30 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id MmDmS2v3bj-0TUSbSe3; Thu, 25 Jan 2018 17:00:29 +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: Thu, 25 Jan 2018 17:00:24 +0300 Message-Id: <1516888824-25562-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516888824-25562-1-git-send-email-odpbot@yandex.ru> References: <1516888824-25562-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 406 Subject: [lng-odp] [PATCH CATERPILLAR v2 6/6] 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: f87bb5146fb25f7cd62246500cb4f7e625375654 ** Merge commit sha: 577e1fa00c9cfe0840f5b0f5d5d826f414ac03c6 **/ DEPENDENCIES | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/DEPENDENCIES b/DEPENDENCIES index 008c4df4d..8b465992f 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -202,6 +202,83 @@ 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 + +3.5.2 Building ODP with PAPI support + + $ cd + $ ./bootstrap + $ ./configure --with-papi-path= + $ make clean + $ make + + Note: 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