Fix tools/old/profile.py for older kernels like 4.19 (tested):
This is done using a plain an unmodified backport the of the preprocessor conditions for getting the page_offset for different kernel versions and architectures from tools/profile.py.
It should fix getting the page_offset for the full range of versions and architectures supported by the conditions from tools/profile.py, but I can't test all of them.
However, as tools/profile.py is the default profile tool packaged by distros like Fedora, the method used in tools/profile.py should be a lot better than the very limited old method of getting the page_offset.
Because of this, I'm open to closing it if you'd rather not like to change tools/old/profile.py
Yes, it would be great if you can just use tools/profile.py instead of tools/old/profile.py.
Fix
tools/old/profile.py
for older kernels like 4.19 (tested):This is done using a plain an unmodified backport the of the preprocessor conditions for getting the
page_offset
for different kernel versions and architectures from tools/profile.py.It should fix getting the page_offset for the full range of versions and architectures supported by the conditions from
tools/profile.py
, but I can't test all of them.However, as
tools/profile.py
is the default profile tool packaged by distros like Fedora, the method used intools/profile.py
should be a lot better than the very limited old method of getting the page_offset.