Brendan Jackman | e81fdcb | 2017-01-04 17:10:29 +0000 | [diff] [blame] | 1 | # Copyright 2015-2017 ARM Limited |
Javi Merino | c47d2df | 2015-02-06 16:04:03 +0000 | [diff] [blame] | 2 | # |
Javi Merino | aace7c0 | 2015-08-10 14:10:47 +0100 | [diff] [blame] | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # |
| 15 | |
Javi Merino | 5bd3d44 | 2014-04-08 12:55:13 +0100 | [diff] [blame] | 16 | """Process the output of the power allocator trace in the current |
| 17 | directory's trace.dat""" |
Javi Merino | 572049d | 2014-03-31 16:45:23 +0100 | [diff] [blame] | 18 | |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 19 | from collections import OrderedDict |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 20 | import pandas as pd |
Javi Merino | ee56c36 | 2014-03-31 17:30:34 +0100 | [diff] [blame] | 21 | import re |
Javi Merino | 572049d | 2014-03-31 16:45:23 +0100 | [diff] [blame] | 22 | |
Javi Merino | 435457c | 2015-08-10 15:59:10 +0100 | [diff] [blame] | 23 | from trappy.base import Base |
Javi Merino | 094e742 | 2016-03-22 11:53:55 +0000 | [diff] [blame] | 24 | from trappy.dynamic import register_ftrace_parser |
Javi Merino | 51db363 | 2014-06-13 11:24:51 +0100 | [diff] [blame] | 25 | |
Dietmar Eggemann | b42a50b | 2014-12-11 20:28:45 +0000 | [diff] [blame] | 26 | class Thermal(Base): |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 27 | """Process the thermal framework data in a FTrace dump""" |
KP Singh | 7319a88 | 2014-12-24 18:18:01 +0000 | [diff] [blame] | 28 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 29 | unique_word = "thermal_temperature:" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 30 | """The unique word that will be matched in a trace line""" |
| 31 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 32 | name = "thermal" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 33 | """The name of the :mod:`pandas.DataFrame` member that will be created in a |
Javi Merino | c26a323 | 2015-12-11 18:00:30 +0000 | [diff] [blame] | 34 | :mod:`trappy.ftrace.FTrace` object""" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 35 | |
Kapileshwar Singh | 01ed910 | 2015-08-14 01:31:22 +0100 | [diff] [blame] | 36 | pivot = "id" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 37 | """The Pivot along which the data is orthogonal""" |
KP Singh | 7319a88 | 2014-12-24 18:18:01 +0000 | [diff] [blame] | 38 | |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 39 | def plot_temperature(self, control_temperature=None, title="", width=None, |
Javi Merino | 1217c65 | 2016-08-22 20:04:15 +0100 | [diff] [blame] | 40 | height=None, ylim="range", ax=None, legend_label="", |
| 41 | tz_id=None): |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 42 | """Plot the temperature. |
| 43 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 44 | :param ax: Axis instance |
| 45 | :type ax: :mod:`matplotlib.Axis` |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 46 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 47 | :param legend_label: Label for the legend |
| 48 | :type legend_label: str |
| 49 | |
| 50 | :param title: The title of the plot |
| 51 | :type title: str |
| 52 | |
| 53 | :param control_temperature: If control_temp is a |
| 54 | :mod:`pd.Series` representing the (possible) |
| 55 | variation of :code:`control_temp` during the |
| 56 | run, draw it using a dashed yellow line. |
| 57 | Otherwise, only the temperature is plotted. |
| 58 | :type control_temperature: :mod:`pandas.Series` |
| 59 | |
| 60 | :param width: The width of the plot |
| 61 | :type width: int |
| 62 | |
| 63 | :param height: The height of the plot |
Javi Merino | 5d91edf | 2016-08-22 19:41:37 +0100 | [diff] [blame] | 64 | :type height: int |
Javi Merino | 1217c65 | 2016-08-22 20:04:15 +0100 | [diff] [blame] | 65 | |
| 66 | :param tz_id: thermal zone id as it appears in the id field of |
| 67 | the thermal_temperature trace event |
| 68 | :type tz_id: int |
| 69 | |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 70 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 71 | from matplotlib import pyplot as plt |
| 72 | from trappy.plot_utils import normalize_title, pre_plot_setup, post_plot_setup |
| 73 | |
Javi Merino | c68737a | 2014-06-10 15:21:59 +0100 | [diff] [blame] | 74 | title = normalize_title("Temperature", title) |
| 75 | |
Javi Merino | 7e92402 | 2015-02-06 17:58:46 +0000 | [diff] [blame] | 76 | if len(self.data_frame) == 0: |
| 77 | raise ValueError("Empty DataFrame") |
| 78 | |
Javi Merino | 1217c65 | 2016-08-22 20:04:15 +0100 | [diff] [blame] | 79 | thermal_dfr = self.data_frame |
| 80 | if tz_id is not None: |
| 81 | thermal_dfr = thermal_dfr[thermal_dfr["id"] == tz_id] |
| 82 | if len(thermal_dfr) == 0: |
| 83 | raise ValueError("No thermal_temperature trace for thermal zone {}".format(tz_id)) |
| 84 | |
Javi Merino | 49cbcfe | 2014-08-08 16:03:49 +0100 | [diff] [blame] | 85 | setup_plot = False |
| 86 | if not ax: |
| 87 | ax = pre_plot_setup(width, height) |
| 88 | setup_plot = True |
| 89 | |
Javi Merino | 8011416 | 2014-08-08 16:48:32 +0100 | [diff] [blame] | 90 | temp_label = normalize_title("Temperature", legend_label) |
Javi Merino | 1217c65 | 2016-08-22 20:04:15 +0100 | [diff] [blame] | 91 | (thermal_dfr["temp"] / 1000).plot(ax=ax, label=temp_label) |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 92 | if control_temperature is not None: |
Javi Merino | 8011416 | 2014-08-08 16:48:32 +0100 | [diff] [blame] | 93 | ct_label = normalize_title("Control", legend_label) |
Javi Merino | 516d594 | 2014-06-26 15:06:04 +0100 | [diff] [blame] | 94 | control_temperature.plot(ax=ax, color="y", linestyle="--", |
Javi Merino | 8011416 | 2014-08-08 16:48:32 +0100 | [diff] [blame] | 95 | label=ct_label) |
Javi Merino | c68737a | 2014-06-10 15:21:59 +0100 | [diff] [blame] | 96 | |
Javi Merino | 49cbcfe | 2014-08-08 16:03:49 +0100 | [diff] [blame] | 97 | if setup_plot: |
| 98 | post_plot_setup(ax, title=title, ylim=ylim) |
| 99 | plt.legend() |
Javi Merino | c68737a | 2014-06-10 15:21:59 +0100 | [diff] [blame] | 100 | |
Javi Merino | e5ea60a | 2014-08-12 16:41:42 +0100 | [diff] [blame] | 101 | def plot_temperature_hist(self, ax, title): |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 102 | """Plot a temperature histogram |
| 103 | |
| 104 | :param ax: Axis instance |
| 105 | :type ax: :mod:`matplotlib.Axis` |
| 106 | |
| 107 | :param title: The title of the plot |
| 108 | :type title: str |
| 109 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 110 | from trappy.plot_utils import normalize_title, plot_hist |
Javi Merino | 1a3dca3 | 2014-08-11 16:12:50 +0100 | [diff] [blame] | 111 | |
| 112 | temps = self.data_frame["temp"] / 1000 |
| 113 | title = normalize_title("Temperature", title) |
| 114 | xlim = (0, temps.max()) |
| 115 | |
Javi Merino | 23dff5d | 2015-03-09 19:05:46 +0000 | [diff] [blame] | 116 | plot_hist(temps, ax, title, "C", 30, "Temperature", xlim, "default") |
Javi Merino | 1a3dca3 | 2014-08-11 16:12:50 +0100 | [diff] [blame] | 117 | |
Javi Merino | 094e742 | 2016-03-22 11:53:55 +0000 | [diff] [blame] | 118 | register_ftrace_parser(Thermal, "thermal") |
Javi Merino | 323bb8d | 2015-04-20 17:09:15 +0100 | [diff] [blame] | 119 | |
Dietmar Eggemann | b42a50b | 2014-12-11 20:28:45 +0000 | [diff] [blame] | 120 | class ThermalGovernor(Base): |
Javi Merino | 5bd3d44 | 2014-04-08 12:55:13 +0100 | [diff] [blame] | 121 | """Process the power allocator data in a ftrace dump""" |
KP Singh | 7319a88 | 2014-12-24 18:18:01 +0000 | [diff] [blame] | 122 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 123 | unique_word = "thermal_power_allocator:" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 124 | """The unique word that will be matched in a trace line""" |
| 125 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 126 | name = "thermal_governor" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 127 | """The name of the :mod:`pandas.DataFrame` member that will be created in a |
Javi Merino | c26a323 | 2015-12-11 18:00:30 +0000 | [diff] [blame] | 128 | :mod:`trappy.ftrace.FTrace` object""" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 129 | |
Kapileshwar Singh | 01ed910 | 2015-08-14 01:31:22 +0100 | [diff] [blame] | 130 | pivot = "thermal_zone_id" |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 131 | """The Pivot along which the data is orthogonal""" |
Kapileshwar Singh | 01ed910 | 2015-08-14 01:31:22 +0100 | [diff] [blame] | 132 | |
Javi Merino | f521fba | 2015-02-06 18:22:09 +0000 | [diff] [blame] | 133 | def plot_temperature(self, title="", width=None, height=None, ylim="range", |
| 134 | ax=None, legend_label=""): |
| 135 | """Plot the temperature""" |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 136 | from matplotlib import pyplot as plt |
| 137 | from trappy.plot_utils import normalize_title, pre_plot_setup, post_plot_setup |
| 138 | |
Javi Merino | f521fba | 2015-02-06 18:22:09 +0000 | [diff] [blame] | 139 | dfr = self.data_frame |
| 140 | curr_temp = dfr["current_temperature"] |
| 141 | control_temp_series = (curr_temp + dfr["delta_temperature"]) / 1000 |
| 142 | title = normalize_title("Temperature", title) |
| 143 | |
| 144 | setup_plot = False |
| 145 | if not ax: |
| 146 | ax = pre_plot_setup(width, height) |
| 147 | setup_plot = True |
| 148 | |
| 149 | temp_label = normalize_title("Temperature", legend_label) |
| 150 | (curr_temp / 1000).plot(ax=ax, label=temp_label) |
| 151 | control_temp_series.plot(ax=ax, color="y", linestyle="--", |
| 152 | label="control temperature") |
| 153 | |
| 154 | if setup_plot: |
| 155 | post_plot_setup(ax, title=title, ylim=ylim) |
| 156 | plt.legend() |
| 157 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 158 | def plot_input_power(self, actor_order, title="", width=None, height=None, |
| 159 | ax=None): |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 160 | """Plot input power |
| 161 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 162 | :param ax: Axis instance |
| 163 | :type ax: :mod:`matplotlib.Axis` |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 164 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 165 | :param title: The title of the plot |
| 166 | :type title: str |
| 167 | |
| 168 | :param width: The width of the plot |
| 169 | :type width: int |
| 170 | |
| 171 | :param height: The height of the plot |
| 172 | :type int: int |
| 173 | |
| 174 | :param actor_order: An array showing the order in which the actors |
| 175 | were registered. The array values are the labels that |
| 176 | will be used in the input and output power plots. |
| 177 | |
| 178 | For Example: |
| 179 | :: |
| 180 | |
| 181 | ["GPU", "A15", "A7"] |
| 182 | |
| 183 | :type actor_order: list |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 184 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 185 | from trappy.plot_utils import normalize_title, pre_plot_setup, post_plot_setup |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 186 | |
Javi Merino | 92f4d01 | 2014-08-08 17:55:32 +0100 | [diff] [blame] | 187 | dfr = self.data_frame |
Javi Merino | f7968a7 | 2014-07-03 15:35:02 +0100 | [diff] [blame] | 188 | in_cols = [s for s in dfr.columns if re.match("req_power[0-9]+", s)] |
Javi Merino | e0ddf0d | 2014-05-07 18:40:12 +0100 | [diff] [blame] | 189 | |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 190 | plot_dfr = dfr[in_cols] |
| 191 | # Rename the columns from "req_power0" to "A15" or whatever is |
| 192 | # in actor_order. Note that we can do it just with an |
| 193 | # assignment because the columns are already sorted (i.e.: |
| 194 | # req_power0, req_power1...) |
| 195 | plot_dfr.columns = actor_order |
| 196 | |
Javi Merino | c00feff | 2014-04-14 15:41:51 +0100 | [diff] [blame] | 197 | title = normalize_title("Input Power", title) |
Javi Merino | 8ecd817 | 2014-07-03 16:09:01 +0100 | [diff] [blame] | 198 | |
Javi Merino | 2922381 | 2014-08-12 15:24:43 +0100 | [diff] [blame] | 199 | if not ax: |
| 200 | ax = pre_plot_setup(width, height) |
| 201 | |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 202 | plot_dfr.plot(ax=ax) |
Javi Merino | 8ecd817 | 2014-07-03 16:09:01 +0100 | [diff] [blame] | 203 | post_plot_setup(ax, title=title) |
Javi Merino | 9c01077 | 2014-04-02 16:54:41 +0100 | [diff] [blame] | 204 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 205 | def plot_weighted_input_power(self, actor_weights, title="", width=None, |
| 206 | height=None, ax=None): |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 207 | """Plot weighted input power |
| 208 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 209 | :param actor_weights: An array of tuples. First element of the |
| 210 | tuple is the name of the actor, the second is the weight. The |
| 211 | array is in the same order as the :code:`req_power` appear in the |
| 212 | trace. |
| 213 | :type actor_weights: list |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 214 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 215 | :param ax: Axis instance |
| 216 | :type ax: :mod:`matplotlib.Axis` |
| 217 | |
| 218 | :param title: The title of the plot |
| 219 | :type title: str |
| 220 | |
| 221 | :param width: The width of the plot |
| 222 | :type width: int |
| 223 | |
| 224 | :param height: The height of the plot |
| 225 | :type int: int |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 226 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 227 | from trappy.plot_utils import normalize_title, pre_plot_setup, post_plot_setup |
Javi Merino | 898783c | 2015-06-16 11:45:16 +0100 | [diff] [blame] | 228 | |
| 229 | dfr = self.data_frame |
| 230 | in_cols = [s for s in dfr.columns if re.match(r"req_power\d+", s)] |
| 231 | |
| 232 | plot_dfr_dict = OrderedDict() |
| 233 | for in_col, (name, weight) in zip(in_cols, actor_weights): |
| 234 | plot_dfr_dict[name] = dfr[in_col] * weight / 1024 |
| 235 | |
| 236 | plot_dfr = pd.DataFrame(plot_dfr_dict) |
| 237 | |
| 238 | title = normalize_title("Weighted Input Power", title) |
| 239 | |
| 240 | if not ax: |
| 241 | ax = pre_plot_setup(width, height) |
| 242 | |
| 243 | plot_dfr.plot(ax=ax) |
| 244 | post_plot_setup(ax, title=title) |
| 245 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 246 | def plot_output_power(self, actor_order, title="", width=None, height=None, |
| 247 | ax=None): |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 248 | """Plot output power |
| 249 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 250 | :param ax: Axis instance |
| 251 | :type ax: :mod:`matplotlib.Axis` |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 252 | |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 253 | :param title: The title of the plot |
| 254 | :type title: str |
| 255 | |
| 256 | :param width: The width of the plot |
| 257 | :type width: int |
| 258 | |
| 259 | :param height: The height of the plot |
| 260 | :type int: int |
| 261 | |
| 262 | :param actor_order: An array showing the order in which the actors |
| 263 | were registered. The array values are the labels that |
| 264 | will be used in the input and output power plots. |
| 265 | |
| 266 | For Example: |
| 267 | :: |
| 268 | |
| 269 | ["GPU", "A15", "A7"] |
| 270 | |
| 271 | :type actor_order: list |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 272 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 273 | from trappy.plot_utils import normalize_title, pre_plot_setup, post_plot_setup |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 274 | |
Javi Merino | 92f4d01 | 2014-08-08 17:55:32 +0100 | [diff] [blame] | 275 | out_cols = [s for s in self.data_frame.columns |
Javi Merino | f7968a7 | 2014-07-03 15:35:02 +0100 | [diff] [blame] | 276 | if re.match("granted_power[0-9]+", s)] |
Javi Merino | e0ddf0d | 2014-05-07 18:40:12 +0100 | [diff] [blame] | 277 | |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 278 | # See the note in plot_input_power() |
Javi Merino | 92f4d01 | 2014-08-08 17:55:32 +0100 | [diff] [blame] | 279 | plot_dfr = self.data_frame[out_cols] |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 280 | plot_dfr.columns = actor_order |
| 281 | |
Javi Merino | c00feff | 2014-04-14 15:41:51 +0100 | [diff] [blame] | 282 | title = normalize_title("Output Power", title) |
Javi Merino | 8ecd817 | 2014-07-03 16:09:01 +0100 | [diff] [blame] | 283 | |
Javi Merino | 6003b25 | 2014-08-12 15:32:17 +0100 | [diff] [blame] | 284 | if not ax: |
| 285 | ax = pre_plot_setup(width, height) |
| 286 | |
Javi Merino | d6d5f89 | 2014-07-03 16:24:23 +0100 | [diff] [blame] | 287 | plot_dfr.plot(ax=ax) |
Javi Merino | 8ecd817 | 2014-07-03 16:09:01 +0100 | [diff] [blame] | 288 | post_plot_setup(ax, title=title) |
Javi Merino | cd4a827 | 2014-04-14 15:50:01 +0100 | [diff] [blame] | 289 | |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 290 | def plot_inout_power(self, title=""): |
Kapileshwar Singh | e1764fb | 2015-09-09 14:50:14 +0100 | [diff] [blame] | 291 | """Make multiple plots showing input and output power for each actor |
| 292 | |
| 293 | :param title: The title of the plot |
| 294 | :type title: str |
| 295 | """ |
Javi Merino | ec2ffe0 | 2015-12-07 15:05:13 +0000 | [diff] [blame] | 296 | from trappy.plot_utils import normalize_title |
Javi Merino | 92f4d01 | 2014-08-08 17:55:32 +0100 | [diff] [blame] | 297 | dfr = self.data_frame |
Javi Merino | 9fc5485 | 2014-05-07 19:06:53 +0100 | [diff] [blame] | 298 | |
| 299 | actors = [] |
| 300 | for col in dfr.columns: |
Javi Merino | 00dac50 | 2015-06-19 16:54:14 +0100 | [diff] [blame] | 301 | match = re.match("P(.*)_in", col) |
| 302 | if match and col != "Ptot_in": |
| 303 | actors.append(match.group(1)) |
Javi Merino | 9fc5485 | 2014-05-07 19:06:53 +0100 | [diff] [blame] | 304 | |
| 305 | for actor in actors: |
| 306 | cols = ["P" + actor + "_in", "P" + actor + "_out"] |
| 307 | this_title = normalize_title(actor, title) |
| 308 | dfr[cols].plot(title=this_title) |
Javi Merino | 323bb8d | 2015-04-20 17:09:15 +0100 | [diff] [blame] | 309 | |
Javi Merino | 094e742 | 2016-03-22 11:53:55 +0000 | [diff] [blame] | 310 | register_ftrace_parser(ThermalGovernor, "thermal") |