2022-07-27 14:50:56

by Amjad Ouled-Ameur

[permalink] [raw]
Subject: [PATCH 0/3] scripts/gdb: timerlist: fix rb_node access and python errors

This patchset fixes use of lx-timerlist with kgdb.

It has been tested on Amlogic libretech-cc s905X and works fine [0]

[0]: https://pastebin.com/RAhQYh6L

Amjad Ouled-Ameur (3):
scripts/gdb: timerlist: use range instead of xrange
scripts/gdb: timerlist: fix rb_node access
scripts/gdb: timerlist: convert int chunks to str

scripts/gdb/linux/timerlist.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--
2.37.1


2022-07-27 15:04:33

by Amjad Ouled-Ameur

[permalink] [raw]
Subject: [PATCH 1/3] scripts/gdb: timerlist: use range instead of xrange

xrange has been renamed to range in Python 3. Therefore,
timerlist currently fails with NameError exception:

Python Exception <class 'NameError'> name 'xrange' is not defined.

Use range instead of xrange.

Signed-off-by: Amjad Ouled-Ameur <[email protected]>
---
scripts/gdb/linux/timerlist.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index 071d0dd5a634..fac951236dc4 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -73,7 +73,7 @@ def print_cpu(hrtimer_bases, cpu, max_clock_bases):
ts = cpus.per_cpu(tick_sched_ptr, cpu)

text = "cpu: {}\n".format(cpu)
- for i in xrange(max_clock_bases):
+ for i in range(max_clock_bases):
text += " clock {}:\n".format(i)
text += print_base(cpu_base['clock_base'][i])

--
2.37.1

2023-03-24 13:14:22

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 0/3] scripts/gdb: timerlist: fix rb_node access and python errors

Hi Amjad, Jan,

On 7/27/2022 7:14 AM, Amjad Ouled-Ameur wrote:
> This patchset fixes use of lx-timerlist with kgdb.
>
> It has been tested on Amlogic libretech-cc s905X and works fine [0]
>
> [0]: https://pastebin.com/RAhQYh6L

Was right about to submit similar fixes. The whole series is:

Tested-by: Florian Fainelli <[email protected]>

Jan, it would appear there were earlier attempts at fixing timerlist.py,
however as of 6.3-rc3, none of those patches have been merged, can you
take them? Thanks!
--
Florian

2023-03-26 14:32:59

by Amjad Ouled-Ameur

[permalink] [raw]
Subject: Re: [PATCH 0/3] scripts/gdb: timerlist: fix rb_node access and python errors

Hi Florian,

Thank you for testing the series.


Regards,

Amjad

On 3/24/23 14:03, Florian Fainelli wrote:
> Hi Amjad, Jan,
>
> On 7/27/2022 7:14 AM, Amjad Ouled-Ameur wrote:
>> This patchset fixes use of lx-timerlist with kgdb.
>>
>> It has been tested on Amlogic libretech-cc s905X and works fine [0]
>>
>> [0]: https://pastebin.com/RAhQYh6L
>
> Was right about to submit similar fixes. The whole series is:
>
> Tested-by: Florian Fainelli <[email protected]>
>
> Jan, it would appear there were earlier attempts at fixing timerlist.py, however as of 6.3-rc3, none of those patches have been merged, can you take them? Thanks!