[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230915104057.132210-3-swapnil.sapkal@amd.com>
Date: Fri, 15 Sep 2023 10:40:57 +0000
From: Swapnil Sapkal <swapnil.sapkal@....com>
To: <rafael.j.wysocki@...el.com>, <Ray.Huang@....com>,
<li.meng@....com>, <shuah@...nel.org>
CC: <sukrut.bellary@...il.com>, <gautham.shenoy@....com>,
<wyes.karny@....com>, <Perry.Yuan@....com>,
<Mario.Limonciello@....com>, <zwisler@...omium.org>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>,
"Swapnil Sapkal" <swapnil.sapkal@....com>
Subject: [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot
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@....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
Powered by blists - more mailing lists