1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 10:10:46 +00:00

module/sched: Expose a classmethod variant of SchedModule.has_debug

A later change needs to access this outside of a SchedModule instance,
so make the information available as a classmethod.
This commit is contained in:
Valentin Schneider 2019-07-09 14:50:04 +01:00 committed by Marc Bonnici
parent ada318f27b
commit 2d86474682

View File

@ -313,12 +313,16 @@ class SchedModule(Module):
path = '/proc/sys/kernel/sched_' + attr
self.target.write_value(path, value, verify)
@classmethod
def target_has_debug(cls, target):
if target.config.get('SCHED_DEBUG') != 'y':
return False
return target.file_exists('/sys/kernel/debug/sched_features')
@property
@memoized
def has_debug(self):
if self.target.config.get('SCHED_DEBUG') != 'y':
return False;
return self.target.file_exists('/sys/kernel/debug/sched_features')
return self.target_has_debug(self.target)
def get_features(self):
"""