2023-09-18 12:18:35

by Doug Smythies

[permalink] [raw]
Subject: [PATCH v3] tools/power/x86/intel_pstate_tracer: python minimum version


From: Doug Smythies <[email protected]>

Change the minimum python version from 2.7 to 3.6.
Remove a 2.X backwards compatibility line.

Signed-off-by: Doug Smythies <[email protected]>
---

v2 -> v3: Try to fix mess that was v2.
v1 -> v2: Fix careless typos.

---
.../x86/intel_pstate_tracer/intel_pstate_tracer.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

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..38cfbdcdedb7 100755
--- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
+++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-only
# -*- coding: utf-8 -*-
#
@@ -11,11 +11,11 @@ then this utility enables and collects trace data for a user specified interval
and generates performance plots.

Prerequisites:
- Python version 2.7.x or higher
+ Python version 3.6.x or higher
gnuplot 5.0 or higher
- gnuplot-py 1.8 or higher
+ python3-gnuplot 1.8 or higher
(Most of the distributions have these required packages. They may be called
- gnuplot-py, phython-gnuplot or phython3-gnuplot, gnuplot-nox, ... )
+ gnuplot-py, python-gnuplot or python3-gnuplot, gnuplot-nox, ... )

HWP (Hardware P-States are disabled)
Kernel config for Linux trace is enabled
@@ -23,7 +23,7 @@ Prerequisites:
see print_help(): for Usage and Output details

"""
-from __future__ import print_function
+
from datetime import datetime
import subprocess
import os
@@ -562,7 +562,7 @@ if __name__ == "__main__":

# Temporary (or perhaps not)
cur_version = sys.version_info
- print('python version (should be >= 2.7):')
+ print('python version (should be >= 3.6):')
print(cur_version)

# Left as "cleanup" for potential future re-run ability.
--
2.25.1



2023-09-18 19:57:13

by Mario Limonciello

[permalink] [raw]
Subject: Re: [PATCH v3] tools/power/x86/intel_pstate_tracer: python minimum version

On 9/17/2023 23:03, Doug Smythies wrote:
>
> From: Doug Smythies <[email protected]>
>
> Change the minimum python version from 2.7 to 3.6.
> Remove a 2.X backwards compatibility line.
>
> Signed-off-by: Doug Smythies <[email protected]>
> ---
>
> v2 -> v3: Try to fix mess that was v2.
> v1 -> v2: Fix careless typos.
>
> ---
> .../x86/intel_pstate_tracer/intel_pstate_tracer.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>

Reviewed-by: Mario Limonciello <[email protected]>

> 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..38cfbdcdedb7 100755
> --- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> +++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
> # SPDX-License-Identifier: GPL-2.0-only
> # -*- coding: utf-8 -*-
> #
> @@ -11,11 +11,11 @@ then this utility enables and collects trace data for a user specified interval
> and generates performance plots.
>
> Prerequisites:
> - Python version 2.7.x or higher
> + Python version 3.6.x or higher
> gnuplot 5.0 or higher
> - gnuplot-py 1.8 or higher
> + python3-gnuplot 1.8 or higher
> (Most of the distributions have these required packages. They may be called
> - gnuplot-py, phython-gnuplot or phython3-gnuplot, gnuplot-nox, ... )
> + gnuplot-py, python-gnuplot or python3-gnuplot, gnuplot-nox, ... )
>
> HWP (Hardware P-States are disabled)
> Kernel config for Linux trace is enabled
> @@ -23,7 +23,7 @@ Prerequisites:
> see print_help(): for Usage and Output details
>
> """
> -from __future__ import print_function
> +
> from datetime import datetime
> import subprocess
> import os
> @@ -562,7 +562,7 @@ if __name__ == "__main__":
>
> # Temporary (or perhaps not)
> cur_version = sys.version_info
> - print('python version (should be >= 2.7):')
> + print('python version (should be >= 3.6):')
> print(cur_version)
>
> # Left as "cleanup" for potential future re-run ability.
> --
> 2.25.1
>
>

2023-09-19 08:05:12

by srinivas pandruvada

[permalink] [raw]
Subject: Re: [PATCH v3] tools/power/x86/intel_pstate_tracer: python minimum version

On Sun, 2023-09-17 at 21:03 -0700, Doug Smythies wrote:
>
Think somehow one extra new line in email.

> From: Doug Smythies <[email protected]>
>
> Change the minimum python version from 2.7 to 3.6.
> Remove a 2.X backwards compatibility line.
>
> Signed-off-by: Doug Smythies <[email protected]>
Acked-by: Srinivas Pandruvada<[email protected]>

> ---
>
> v2 -> v3: Try to fix mess that was v2.
> v1 -> v2: Fix careless typos.
>
> ---
> .../x86/intel_pstate_tracer/intel_pstate_tracer.py   | 12 ++++++-----
> -
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> 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..38cfbdcdedb7 100755
> --- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> +++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0-only
>  # -*- coding: utf-8 -*-
>  #
> @@ -11,11 +11,11 @@ then this utility enables and collects trace data
> for a user specified interval
>  and generates performance plots.
>
>  Prerequisites:
> -    Python version 2.7.x or higher
> +    Python version 3.6.x or higher
>      gnuplot 5.0 or higher
> -    gnuplot-py 1.8 or higher
> +    python3-gnuplot 1.8 or higher
>      (Most of the distributions have these required packages. They
> may be called
> -     gnuplot-py, phython-gnuplot or phython3-gnuplot, gnuplot-nox,
> ... )
> +     gnuplot-py, python-gnuplot or python3-gnuplot, gnuplot-nox, ...
> )
>
>      HWP (Hardware P-States are disabled)
>      Kernel config for Linux trace is enabled
> @@ -23,7 +23,7 @@ Prerequisites:
>      see print_help(): for Usage and Output details
>
>  """
> -from __future__ import print_function
> +
>  from datetime import datetime
>  import subprocess
>  import os
> @@ -562,7 +562,7 @@ if __name__ == "__main__":
>
>      # Temporary (or perhaps not)
>      cur_version = sys.version_info
> -    print('python version (should be >= 2.7):')
> +    print('python version (should be >= 3.6):')
>      print(cur_version)
>
>      # Left as "cleanup" for potential future re-run ability.
> --
> 2.25.1
>
>

2023-09-19 11:51:09

by Swapnil Sapkal

[permalink] [raw]
Subject: Re: [PATCH v3] tools/power/x86/intel_pstate_tracer: python minimum version



On 9/18/2023 9:33 AM, Doug Smythies wrote:
>
> From: Doug Smythies <[email protected]>
>
> Change the minimum python version from 2.7 to 3.6.
> Remove a 2.X backwards compatibility line.
>
> Signed-off-by: Doug Smythies <[email protected]>
> ---
>
> v2 -> v3: Try to fix mess that was v2.
> v1 -> v2: Fix careless typos.
>
> ---
> .../x86/intel_pstate_tracer/intel_pstate_tracer.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>

Tested-by: Swapnil Sapkal <[email protected]>

> 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..38cfbdcdedb7 100755
> --- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> +++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
> # SPDX-License-Identifier: GPL-2.0-only
> # -*- coding: utf-8 -*-
> #
> @@ -11,11 +11,11 @@ then this utility enables and collects trace data for a user specified interval
> and generates performance plots.
>
> Prerequisites:
> - Python version 2.7.x or higher
> + Python version 3.6.x or higher
> gnuplot 5.0 or higher
> - gnuplot-py 1.8 or higher
> + python3-gnuplot 1.8 or higher
> (Most of the distributions have these required packages. They may be called
> - gnuplot-py, phython-gnuplot or phython3-gnuplot, gnuplot-nox, ... )
> + gnuplot-py, python-gnuplot or python3-gnuplot, gnuplot-nox, ... )
>
> HWP (Hardware P-States are disabled)
> Kernel config for Linux trace is enabled
> @@ -23,7 +23,7 @@ Prerequisites:
> see print_help(): for Usage and Output details
>
> """
> -from __future__ import print_function
> +
> from datetime import datetime
> import subprocess
> import os
> @@ -562,7 +562,7 @@ if __name__ == "__main__":
>
> # Temporary (or perhaps not)
> cur_version = sys.version_info
> - print('python version (should be >= 2.7):')
> + print('python version (should be >= 3.6):')
> print(cur_version)
>
> # Left as "cleanup" for potential future re-run ability.
> --
> 2.25.1
>
>