diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-20 16:43:24 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-21 09:53:44 -0400 |
commit | de02d0786d4075091f5b1860474cd21d85ff5862 (patch) | |
tree | 5767c43edb3ee26429b7ce1dd2e42a9f96a28965 /include/sound | |
parent | 6d4baf084f4d8dc43cf5d5a3c182018604afa80c (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/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 5 | ||||
-rw-r--r-- | include/sound/soc.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 350b1b395cac..0e2d01713cb6 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -537,4 +537,9 @@ struct snd_soc_dapm_widget_list { | |||
537 | struct snd_soc_dapm_widget *widgets[0]; | 537 | struct snd_soc_dapm_widget *widgets[0]; |
538 | }; | 538 | }; |
539 | 539 | ||
540 | struct snd_soc_dapm_stats { | ||
541 | int power_checks; | ||
542 | int path_checks; | ||
543 | }; | ||
544 | |||
540 | #endif | 545 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 24e17be38c19..006f4f633c52 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -828,6 +828,7 @@ struct snd_soc_card { | |||
828 | 828 | ||
829 | /* Generic DAPM context for the card */ | 829 | /* Generic DAPM context for the card */ |
830 | struct snd_soc_dapm_context dapm; | 830 | struct snd_soc_dapm_context dapm; |
831 | struct snd_soc_dapm_stats dapm_stats; | ||
831 | 832 | ||
832 | #ifdef CONFIG_DEBUG_FS | 833 | #ifdef CONFIG_DEBUG_FS |
833 | struct dentry *debugfs_card_root; | 834 | struct dentry *debugfs_card_root; |