mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
27 lines
604 B
Python
Executable File
27 lines
604 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import common
|
|
|
|
class Main(common.LkmcCliFunction):
|
|
def __init__(self):
|
|
super().__init__(
|
|
defaults={
|
|
'show_time': False,
|
|
},
|
|
description='''\
|
|
Get the value of a gem5 stat from the stats.txt file.
|
|
''',
|
|
)
|
|
self.add_argument(
|
|
'stat',
|
|
help='Python regexp matching the full stat name of interest',
|
|
nargs='?',
|
|
)
|
|
|
|
def timed_main(self):
|
|
stats = self.get_stats(self.env['stat'])
|
|
print('\n'.join(stats))
|
|
|
|
if __name__ == '__main__':
|
|
Main().cli()
|