base: remove path parameter
Now that trace-cmd is done in the Run class, the trace classes don't
need the path, so nuke it.
diff --git a/cr2/base.py b/cr2/base.py
index 770a008..5bbfe5b 100644
--- a/cr2/base.py
+++ b/cr2/base.py
@@ -63,11 +63,7 @@
Don't use directly, create a subclass that defines the unique_word
you want to match in the output"""
- def __init__(self, basepath, unique_word):
- if basepath is None:
- basepath = "."
-
- self.basepath = basepath
+ def __init__(self, unique_word):
self.data_frame = pd.DataFrame()
self.unique_word = unique_word
self.data_array = []
diff --git a/cr2/dynamic.py b/cr2/dynamic.py
index 52f4d5d..3f1e028 100644
--- a/cr2/dynamic.py
+++ b/cr2/dynamic.py
@@ -23,13 +23,12 @@
from cr2.run import Run
-def default_init(self, path=None):
+def default_init(self):
"""Default Constructor for the
Dynamic MetaClass
"""
super(type(self), self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
diff --git a/cr2/pid_controller.py b/cr2/pid_controller.py
index e5ad113..8c7c6a1 100644
--- a/cr2/pid_controller.py
+++ b/cr2/pid_controller.py
@@ -21,9 +21,8 @@
class PIDController(Base):
"""Process the power allocator PID controller data in a ftrace dump"""
- def __init__(self, path=None):
+ def __init__(self):
super(PIDController, self).__init__(
- basepath=path,
unique_word="thermal_power_allocator_pid",
)
diff --git a/cr2/power.py b/cr2/power.py
index 590255a..4947a22 100644
--- a/cr2/power.py
+++ b/cr2/power.py
@@ -83,9 +83,8 @@
unique_word="thermal_power_cpu_limit"
name="out_power"
- def __init__(self, path=None):
+ def __init__(self):
super(OutPower, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -105,9 +104,8 @@
unique_word="thermal_power_cpu_get"
name="in_power"
- def __init__(self, path=None):
+ def __init__(self):
super(InPower, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
diff --git a/cr2/run.py b/cr2/run.py
index 24e4d94..d473e24 100644
--- a/cr2/run.py
+++ b/cr2/run.py
@@ -83,7 +83,7 @@
self.trace_classes = []
for attr, class_name in self.class_definitions.iteritems():
- trace_class = globals()[class_name](path)
+ trace_class = globals()[class_name]()
setattr(self, attr, trace_class)
self.trace_classes.append(trace_class)
diff --git a/cr2/sched.py b/cr2/sched.py
index c76ef70..965a47b 100644
--- a/cr2/sched.py
+++ b/cr2/sched.py
@@ -22,9 +22,8 @@
name="sched_load_avg_sched_group"
_cpu_mask_column = "cpus"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedLoadAvgSchedGroup, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -40,9 +39,8 @@
unique_word="sched_load_avg_task:"
name="sched_load_avg_task"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedLoadAvgTask, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -58,9 +56,8 @@
unique_word="sched_load_avg_cpu:"
name="sched_load_avg_cpu"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedLoadAvgCpu, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -69,9 +66,8 @@
unique_word="sched_contrib_scale_f:"
name="sched_contrib_scale_factor"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedContribScaleFactor, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -80,9 +76,8 @@
unique_word="sched_cpu_capacity:"
name="sched_cpu_capacity"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedCpuCapacity, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -91,9 +86,8 @@
unique_word="cpu_frequency:"
name="sched_cpu_frequency"
- def __init__(self, path=None):
+ def __init__(self):
super(SchedCpuFrequency, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
diff --git a/cr2/thermal.py b/cr2/thermal.py
index dcfffab..60f7372 100644
--- a/cr2/thermal.py
+++ b/cr2/thermal.py
@@ -29,9 +29,8 @@
unique_word="thermal_temperature:"
name="thermal"
- def __init__(self, path=None):
+ def __init__(self):
super(Thermal, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)
@@ -80,9 +79,8 @@
unique_word="thermal_power_allocator:"
name="thermal_governor"
- def __init__(self, path=None):
+ def __init__(self):
super(ThermalGovernor, self).__init__(
- basepath=path,
unique_word=self.unique_word,
)