From patchwork Thu Apr 12 15:12:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 133300 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1787128ljb; Thu, 12 Apr 2018 08:13:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/qFzsYTS2jCxzmp/0EfyrxKAh/Y3VQ/yW7qB0/2crLMWuiE8R/9jJbwUYX3Xg+99C4SFik X-Received: by 10.98.96.195 with SMTP id u186mr7966708pfb.81.1523546003846; Thu, 12 Apr 2018 08:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523546003; cv=none; d=google.com; s=arc-20160816; b=OnZYL9ejZ+WJUwKj0yT71xViKloPQgBlsxzI33qg1nYRHQSDPJZR1/B3RZkBtdlK47 WRcpa+42oKs1gBBFg0da8DdpkVk0svL84fxURSZ0PafYg2A0KjAtcyM1DaV7/Rtw/WrN Ufuh/hLMhRUeUYEMxgXybYf3nMVKZ5T0k1MxKcbfKy+mygnwMB9k0F6lCsKTPmYVKR0C McScmO2b44/NL0qgEytCToYqeCRmFbVo9+Jtr4nDh4NMh1lFMrYKGwJK4va+yKahhR35 fWlC2ySWaLERhWl3YRrnPf+27DvPuV+cLkzYXgQdWCkjrVG/eAXsK0PomtoZEgROnhB7 Je0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8TzyfpfA5ieOr/VpbEn9s17VsOy5oAiDgijXcT+WbCw=; b=CnZ1bhboRoG9jl4Yb+aIoIjaF/8CYgVAjhPw1as6kZyGFsNhS0V0i/G4xLsoamdsjj JbfZMOkzYx2Ab255EMImjxSCrF1BlJXJo7RBPJZTxW2hHmQ5PkPZkGeZ9BPJFtpgJNeu O19hGOSi5wO6neocRr5nA/9Aw7ut0brtMe+EW+RW9WjdZIlyUGvrPJ5wwFC9oy6ZcTWn rg/6n4eXzm++s832tQvuFrP1VwAHkmESlpRIEnrn4qmmcwmVqCLjSJxHBJi4I4uyt6NP SWR0vsAxbYvvMioAalk/8SWayyHbFBvSgTEVjqcj6BT566vDouhXpvWq0nnp0/FsqGCS ib/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=agdUhIbP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si2397525pgo.64.2018.04.12.08.13.23; Thu, 12 Apr 2018 08:13:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=agdUhIbP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbeDLPNU (ORCPT + 29 others); Thu, 12 Apr 2018 11:13:20 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:39990 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753668AbeDLPNS (ORCPT ); Thu, 12 Apr 2018 11:13:18 -0400 Received: by mail-ot0-f194.google.com with SMTP id j8-v6so6388706ota.7 for ; Thu, 12 Apr 2018 08:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8TzyfpfA5ieOr/VpbEn9s17VsOy5oAiDgijXcT+WbCw=; b=agdUhIbPMQA6w0BOTHfViA9M+ExEqPY12UjsK53LtEqvcSdMEu28OsFeyOaNIkF1Bb eSl6n2x6vkbbmIz1lLN8XwCkvSNVb4cFWgNF4C1F4ak9NAmjuRuRDmr4ePcLFO+q8gS9 wIwVnTfkpbIx6GnP1JvvikcNbf/wPjKLogkm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8TzyfpfA5ieOr/VpbEn9s17VsOy5oAiDgijXcT+WbCw=; b=NAoLZne22M9Yq8ItRleTryjN/+yveuqJKtp5LhK3D0Rg9pzTsXqceB4xFKmsbp9itF eA/oqdEGvpMMhIiQ+RgMJHYo5qQuj/bXfe4Et/wE8iBu2PXClfS5OHjvvgC/qOfxSGeY m5gEE7qpe/U+IbZB3AF5QWhTjqubyBg5xhvh3jwP4s8TdL/mcjio1WidcL51g6IkZRIb MEjOZ1NQNAF4d5tBcnBJ0u1h4v3JNAY4RHWzEdWU4IkAe0a61e0oTCl4Kcu6FpyLl8Mc wlTodu6SCuW7/BestVEodgtnLeIsaieoLuT/HOTsHhraj279zMx1VB+YJarNYKWerzgS Y5/g== X-Gm-Message-State: ALQs6tBbBRhLefcK6/5l3vwyv9yE4YGW1AMusuWwTBkYKRjHUcd8GDiB GB/DszcqZDCwMiunN66X9gPf4Q== X-Received: by 2002:a9d:58c6:: with SMTP id s6-v6mr895261oth.188.1523545997471; Thu, 12 Apr 2018 08:13:17 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink-187-161-190-249.PCs.InterCable.net. [187.161.190.249]) by smtp.googlemail.com with ESMTPSA id d69-v6sm2439360oih.58.2018.04.12.08.13.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Apr 2018 08:13:16 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Shuah Khan , Thomas Meyer , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] selftests/intel_pstate: Enhance table printing Date: Thu, 12 Apr 2018 10:12:28 -0500 Message-Id: <1523545962-5281-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using coreutils' pr, a nicer table is printed out with the results. Signed-off-by: Daniel Díaz --- tools/testing/selftests/intel_pstate/run.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh index bde31a0..a40068b 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -92,18 +92,28 @@ done [ $EVALUATE_ONLY -eq 0 ] && cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null -echo "==============================================================================" +echo "========================================================================" echo "The marketing frequency of the cpu is $mkt_freq MHz" echo "The maximum frequency of the cpu is $max_freq MHz" echo "The minimum frequency of the cpu is $min_freq MHz" # make a pretty table -echo "Target Actual Difference MSR(0x199) max_perf_pct" +echo "Target Actual Difference MSR(0x199) max_perf_pct" | tr " " "\n" > /tmp/result.tab for freq in `seq $max_freq -100 $min_freq` do result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ') msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ') max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' ) - echo " $freq $result_freq $(($result_freq-$freq)) $msr $(($max_perf_pct*$max_freq))" + cat >> /tmp/result.tab << EOF +$freq +$result_freq +$((result_freq - freq)) +$msr +$((max_perf_pct * max_freq)) +EOF done + +# print the table +pr -aTt -5 < /tmp/result.tab + exit 0