From patchwork Tue Oct 13 11:13:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hongbo.zhang@freescale.com X-Patchwork-Id: 54844 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 6C03C23001 for ; Tue, 13 Oct 2015 11:41:57 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf7946628lbw.0 for ; Tue, 13 Oct 2015 04:41:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=2LU1DxijX3oj5eD2GM8ER+WHAM6gsQhY4aR2oWwjZ5I=; b=LMi496nRTHrpMExObvWlyrP5pcMjflqErfpOV3SzLgBeYQKt/3qclMfwr1vIrBQJgO QLhjZUCxoRXLzvkpN7h30UHzhqE0SzJvSf0jlPXYvhMlxTH/lXaum7ZWD/wceF/chD0v K0PK4a8Zh93Nxvfbewj7fLzUWjx9cMSxrA4bd+H2q4/0FeNt/dXbcUTAmDTyfw9WYBMS g5xqV9AkrD4x7NDhFCkFeLJFsb6N2F0feKx78gZJiL9FphKYUBbb/hZLBH5nbSjQUaXf PdcYXXhgzXZUSxlTfYyOWauAAnmXDk4K9NchS1UDoaHNbr2yDea0zZ+i/EwLo+ZcKKG3 dsWw== X-Gm-Message-State: ALoCoQnsyi/U2BCU0IhzExkXhEdh8VFsz/YOlqm/+Okw8mJUCCsHP7bmtBDxlXlsk6Ciod+9C6iZ X-Received: by 10.180.189.49 with SMTP id gf17mr4105717wic.6.1444736516264; Tue, 13 Oct 2015 04:41:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.21.77 with SMTP id l74ls55760lfi.20.gmail; Tue, 13 Oct 2015 04:41:56 -0700 (PDT) X-Received: by 10.112.151.106 with SMTP id up10mr15373183lbb.106.1444736516136; Tue, 13 Oct 2015 04:41:56 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id p72si1894752lfp.112.2015.10.13.04.41.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 04:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbcao8 with SMTP id ao8so16373624lbc.3 for ; Tue, 13 Oct 2015 04:41:55 -0700 (PDT) X-Received: by 10.25.153.145 with SMTP id b139mr8166093lfe.117.1444736515779; Tue, 13 Oct 2015 04:41:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2077977lbq; Tue, 13 Oct 2015 04:41:54 -0700 (PDT) X-Received: by 10.140.236.144 with SMTP id h138mr40811325qhc.78.1444736514853; Tue, 13 Oct 2015 04:41:54 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f194si2399051qhc.72.2015.10.13.04.41.54; Tue, 13 Oct 2015 04:41:54 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 731A761971; Tue, 13 Oct 2015 11:41:54 +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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 D45FA61A55; Tue, 13 Oct 2015 11:34:09 +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 9079761971; Tue, 13 Oct 2015 11:33:51 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0140.outbound.protection.outlook.com [157.56.111.140]) by lists.linaro.org (Postfix) with ESMTPS id E22F761A49 for ; Tue, 13 Oct 2015 11:32:07 +0000 (UTC) Received: from BLUPR03CA011.namprd03.prod.outlook.com (10.255.124.28) by DM2PR03MB493.namprd03.prod.outlook.com (10.141.85.139) with Microsoft SMTP Server (TLS) id 15.1.293.16; Tue, 13 Oct 2015 11:32:06 +0000 Received: from BY2FFO11FD042.protection.gbl (10.255.124.4) by BLUPR03CA011.outlook.office365.com (10.255.124.28) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Tue, 13 Oct 2015 11:32:05 +0000 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Tue, 13 Oct 2015 11:32:05 +0000 Received: from hongbo.ap.freescale.net (hongbo.ap.freescale.net [10.193.20.96]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t9DBVOFw009638; Tue, 13 Oct 2015 04:32:02 -0700 From: To: Date: Tue, 13 Oct 2015 19:13:18 +0800 Message-ID: <1444734798-29063-15-git-send-email-hongbo.zhang@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444734798-29063-1-git-send-email-hongbo.zhang@freescale.com> References: <1444734798-29063-1-git-send-email-hongbo.zhang@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD042; 1:WAAwit40Be/thm8BRp3EVFf7/ZpcL9PFMLjGgSx/O5BDGCN1JARW7TU1oGALI7z5InUcaPju711W7RX1o4iVS9KwIVA5V6+D12+FQf07DISwL5Alrat7yIQWsr61obZ7/2bJWZJ95z526h4lJLdz50GirK90YXW1Urap88kxWba8Tf/Kkx4FkfRlTRm08YD1fUN4flyScnxBlTiX9LMP7trc1Xx/Z9nXZpS6iNNPzIBvzyvBHooI/Ifc9LUbuhnYifE73xQHct6de32ZK0guAkF3rYhtHMacWhQDVffnFP8kgm+lrJK6+TljTii65bInq3jiMEmgDICKODDGMEymDTMX/ckZ4XLIK8AovAnaSHcs/fbrqrwlWlsrXXXcbysvA80lrigtwHZg5enm6zWgvw== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(2950100001)(86152002)(76176999)(5007970100001)(81156007)(33646002)(6806005)(85426001)(19580395003)(50226001)(46102003)(11100500001)(47776003)(64706001)(92566002)(97736004)(50986999)(189998001)(5001960100002)(110136002)(229853001)(106466001)(19580405001)(5003940100001)(2351001)(105606002)(36756003)(5008740100001)(48376002)(86362001)(50466002)(87936001)(104016004)(77096005)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR03MB493; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR03MB493; 2:wEPzmxySNV7EI4JDYbWgkK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TPOxbV9SXJYqsrgDSitgIwpdpdrBpzp82a64qXk5qvb8n3Vg=; 4:VUzZcwtmGG+h/jFpCaj2uGh0/J9UWyTEY9wG4j+m4f1CWOzPEoQrRSFUSeEgXaHgKg54a+xfo9cCySnn9kRrrotidaBBbWPeKDSNZfnWXtAhH2ss3MhbrAiTCRHWArRiFnjsEUT8i2NOiRBdRbeufDMi+icgQA7CQzJ4FWY+XJAyg1Nv1nN09wsXx8Xuc4QpkLBmJBy+S4khLcx7VB8Gw7bOfflU8b4Mvhs9ekq5zBKG131aI/cNdz+MhjjzcoSxNuEF5LFknfm8uhrigHsbj2gpF+7Z0ZxzGGheccEZGkLybKAlhQwrHdcCybH00bb3VNFcjqYWn9GJDbIpWscXpWz+XEZH4njZu3ABade9S0M= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:DM2PR03MB493; BCL:0; PCL:0; RULEID:; SRVR:DM2PR03MB493; X-Forefront-PRVS: 07283408BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR03MB493; 23:G2QPt6qDOaHgfSGwNt7N8bKUeINTRmyVf8EiCcfsm3?= =?us-ascii?Q?bljdHHpi+s3k5nxAkcZqauI+cDTajPKI6ncKhs/nLqAHsTjPVHw8Utf1//Un?= =?us-ascii?Q?BMdK90lSfCPMol5BXo5u96D/97Kg1wUiKJ4cw2NvcgmsHPK/JVPoKZd/wgEp?= =?us-ascii?Q?hLZzNTDAatOAEy+dsl7bS06h3lnCdKsRf4wfF09V4yMccTZLZ4hkbhbTOQiZ?= =?us-ascii?Q?lz52ymLDrgyAonDEo7xJYfbsK0F4h2pENfwGN3b7/me87G5752QWv+Z+Yr9D?= =?us-ascii?Q?eOYnAYWhPFhxv0eg7FKprR5/G7LkGkyEByCDBZjg788MZdJRU+IIYoOvtsb7?= =?us-ascii?Q?E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d26P08iSSfPhRx/YViVnYdNPLJnkpvT4Di9t6D7ilPyYWlFLBC1N+DE9rCzQiE2ug+fh48xJDvJyLCUVDCTIYeA==; 24:ow1zBQGh+utty0tRmdhE71HXzaDh5vh+1Rq17rCEICh9sX7ZkBhjhBlp8IzRO1YJ4mfea3SOJEaqWJbfZTZA78RQVPnGxFzktg1NsQreQmY=; 20:Wp4fs6Z7/QxO9l1l7KNV1+1IqWlREIZRbYp/JTY/Z6+2k/mR/lZLfu/DuMOdBvXMBG/w/a8lD0BukcgVWGFdsA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2015 11:32:05.6203 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB493 X-Topics: patch Cc: petri.savolainen@nokia.com, stuart.haslam@arm.com Subject: [lng-odp] [API NEXT PATCH v7 14/14] test: update CPU Hz calling functions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Hongbo Zhang The previous odp_sys_cpu_hz() is moved to cpu.h and then renamed to odp_cpu_hz(), but all the calling function of odp{_sys}_cpu_hz() want to show maximun CPU capacity in fact, so they should be updated to use the newly added odp_cpu_hz_max() instead of odp_cpu_hz(). This patch updates the test codes. Signed-off-by: Hongbo Zhang --- test/api_test/odp_common.c | 2 +- test/performance/odp_atomic.c | 2 +- test/performance/odp_l2fwd.c | 2 +- test/performance/odp_scheduling.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c index 8540108..5e6d542 100644 --- a/test/api_test/odp_common.c +++ b/test/api_test/odp_common.c @@ -42,7 +42,7 @@ void odp_print_system_info(void) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz()); + printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("CPU count: %i\n", odp_cpu_count()); printf("CPU mask: %s\n", str); diff --git a/test/performance/odp_atomic.c b/test/performance/odp_atomic.c index 101c54c..56fa6ed 100644 --- a/test/performance/odp_atomic.c +++ b/test/performance/odp_atomic.c @@ -338,7 +338,7 @@ void odp_print_system_info(void) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz()); + printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("CPU count: %i\n", odp_cpu_count()); printf("CPU mask: %s\n", str); diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 5533daa..aa3ffae 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -713,7 +713,7 @@ static void print_info(char *progname, appl_args_t *appl_args) "Cache line size: %i\n" "CPU count: %i\n" "\n", - odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz(), + odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz_max(), odp_sys_cache_line_size(), odp_cpu_count()); printf("Running ODP appl: \"%s\"\n" diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 0f288e2..d08f253 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -746,14 +746,14 @@ static void test_cpu_freq(void) nsec -= tp1.tv_nsec - tp2.tv_nsec; cycles = odp_cpu_cycles_diff(c1, c2); - max_cycles = (nsec * odp_cpu_hz()) / 1000000000.0; + max_cycles = (nsec * odp_cpu_hz_max()) / 1000000000.0; /* Compare measured CPU cycles to maximum theoretical CPU cycle count */ diff_max_hz = ((double)(cycles) - max_cycles) / max_cycles; printf("clock_gettime %" PRIu64 " ns\n", nsec); printf("odp_cpu_cycles %" PRIu64 " CPU cycles\n", cycles); - printf("odp_sys_cpu_hz %" PRIu64 " hz\n", odp_cpu_hz()); + printf("odp_sys_cpu_hz %" PRIu64 " hz\n", odp_cpu_hz_max()); printf("Diff from max CPU freq %f%%\n", diff_max_hz * 100.0); printf("\n"); @@ -868,7 +868,7 @@ int main(int argc, char *argv[]) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %" PRIu64 "\n", odp_cpu_hz()); + printf("CPU freq (hz): %" PRIu64 "\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("Max CPU count: %i\n", odp_cpu_count());