All of lore.kernel.org
 help / color / mirror / Atom feed
From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: <rafael.j.wysocki@intel.com>, <Ray.Huang@amd.com>,
	<li.meng@amd.com>, <shuah@kernel.org>
Cc: <sukrut.bellary@gmail.com>, <gautham.shenoy@amd.com>,
	<wyes.karny@amd.com>, <Perry.Yuan@amd.com>,
	<Mario.Limonciello@amd.com>, <zwisler@chromium.org>,
	<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>,
	"Swapnil Sapkal" <swapnil.sapkal@amd.com>
Subject: [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot
Date: Fri, 15 Sep 2023 10:40:57 +0000	[thread overview]
Message-ID: <20230915104057.132210-3-swapnil.sapkal@amd.com> (raw)
In-Reply-To: <20230915104057.132210-1-swapnil.sapkal@amd.com>

In intel_pstate_tracer.py, Gnuplot is used to generate 2D plots.
In current implementation this tracer gives error while importing
the module because Gnuplot is imported from package Gnuplot-py which
does not support python 3.x. Fix this by using pygnuplot package to
import this module.

Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
---
 tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py      | 1 -
 tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py b/tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
index 2448bb07973f..14f8d81f91de 100755
--- a/tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
+++ b/tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
@@ -27,7 +27,6 @@ import re
 import signal
 import sys
 import getopt
-import Gnuplot
 from numpy import *
 from decimal import *
 sys.path.append(os.path.join(os.path.dirname(__file__), '../intel_pstate_tracer'))
diff --git a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
index ec3323100e1a..68412abdd7d4 100755
--- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
+++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
@@ -32,7 +32,7 @@ import re
 import signal
 import sys
 import getopt
-import Gnuplot
+from pygnuplot import gnuplot
 from numpy import *
 from decimal import *
 
@@ -295,7 +295,7 @@ def common_all_gnuplot_settings(output_png):
 def common_gnuplot_settings():
     """ common gnuplot settings. """
 
-    g_plot = Gnuplot.Gnuplot(persist=1)
+    g_plot = gnuplot.Gnuplot(persist=1)
 #   The following line is for rigor only. It seems to be assumed for .csv files
     g_plot('set datafile separator \",\"')
     g_plot('set ytics nomirror')
-- 
2.34.1

  parent reply	other threads:[~2023-09-15 10:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 10:40 [PATCH 0/2] Fix issues observed with selftests/amd-pstate Swapnil Sapkal
2023-09-15 10:40 ` [PATCH 1/2] selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut Swapnil Sapkal
2023-09-15 10:40 ` Swapnil Sapkal [this message]
2023-09-15 21:15   ` [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot Doug Smythies
2023-09-15 21:31     ` Mario Limonciello
2023-09-15 22:16       ` Doug Smythies
2023-09-17 21:43         ` Doug Smythies
2023-09-19  7:36           ` Swapnil Sapkal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230915104057.132210-3-swapnil.sapkal@amd.com \
    --to=swapnil.sapkal@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=li.meng@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=shuah@kernel.org \
    --cc=sukrut.bellary@gmail.com \
    --cc=wyes.karny@amd.com \
    --cc=zwisler@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.