aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-20 16:43:24 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-21 09:53:44 -0400
commitde02d0786d4075091f5b1860474cd21d85ff5862 (patch)
tree5767c43edb3ee26429b7ce1dd2e42a9f96a28965 /include/trace
parent6d4baf084f4d8dc43cf5d5a3c182018604afa80c (diff)
ASoC: Trace and collect statistics for DAPM graph walking
One of the longest standing areas for improvement in ASoC has been the DAPM algorithm - it repeats the same checks many times whenever it is run and makes no effort to limit the areas of the graph it checks meaning we do an awful lot of walks over the full graph. This has never mattered too much as the size of the graph has generally been small in relation to the size of the devices supported and the speed of CPUs but it is annoying. In preparation for work on improving this insert a trace point after the graph walk has been done. This gives us specific timing information for the walk, and in order to give quantifiable (non-benchmark) numbers also count every time we check a link or check the power for a widget and report those numbers. Substantial changes in the algorithm may require tweaks to the stats but they should be useful for simpler things. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/asoc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 603f5a0f0365..2e1adf62e0a8 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -216,6 +216,28 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
216 216
217); 217);
218 218
219TRACE_EVENT(snd_soc_dapm_walk_done,
220
221 TP_PROTO(struct snd_soc_card *card),
222
223 TP_ARGS(card),
224
225 TP_STRUCT__entry(
226 __string( name, card->name )
227 __field( int, power_checks )
228 __field( int, path_checks )
229 ),
230
231 TP_fast_assign(
232 __assign_str(name, card->name);
233 __entry->power_checks = card->dapm_stats.power_checks;
234 __entry->path_checks = card->dapm_stats.path_checks;
235 ),
236
237 TP_printk("%s: %d power checks, %d path checks", __get_str(name),
238 (int)__entry->power_checks, (int)__entry->path_checks)
239);
240
219TRACE_EVENT(snd_soc_jack_irq, 241TRACE_EVENT(snd_soc_jack_irq,
220 242
221 TP_PROTO(const char *name), 243 TP_PROTO(const char *name),