ffmpeg | branch: release/7.1 | Martin Storsjö <mar...@martin.st> | Wed Oct 23 14:44:11 2024 +0300| [10aaf84f855dbcedb8ee2e3fce307e9b98320946] | committer: Martin Storsjö
checkasm: Print benchmarks of C-only functions This corresponds to commit 9278a14cf406f8edb5052c42b83750112bf5b515 in dav1d. Omitting the C-only functions doesn't speed up benchmarking anyway (as those has to be benchmarked before we know if we have any corresponding assembly functions), and being able to benchmark those functions without corresponding assembly can be valuable in a number of cases. Signed-off-by: Martin Storsjö <mar...@martin.st> (cherry picked from commit 4b524649ff96b25edd275ce1662f5839102aa0af) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10aaf84f855dbcedb8ee2e3fce307e9b98320946 --- tests/checkasm/checkasm.c | 48 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 73a998ae3a..5b59cdf589 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -618,34 +618,32 @@ static inline double avg_cycles_per_call(const CheckasmPerf *const p) static void print_benchs(CheckasmFunc *f) { if (f) { + CheckasmFuncVersion *v = &f->versions; + const CheckasmPerf *p = &v->perf; + const double baseline = avg_cycles_per_call(p); + double decicycles; + print_benchs(f->child[0]); - /* Only print functions with at least one assembly version */ - if (f->versions.cpu || f->versions.next) { - CheckasmFuncVersion *v = &f->versions; - const CheckasmPerf *p = &v->perf; - const double baseline = avg_cycles_per_call(p); - double decicycles; - do { - if (p->iterations) { - p = &v->perf; - decicycles = avg_cycles_per_call(p); - if (state.csv || state.tsv) { - const char sep = state.csv ? ',' : '\t'; - printf("%s%c%s%c%.1f\n", f->name, sep, - cpu_suffix(v->cpu), sep, - decicycles / 10.0); - } else { - const int pad_length = 10 + 50 - - printf("%s_%s:", f->name, cpu_suffix(v->cpu)); - const double ratio = decicycles ? - baseline / decicycles : 0.0; - printf("%*.1f (%5.2fx)\n", FFMAX(pad_length, 0), - decicycles / 10.0, ratio); - } + do { + if (p->iterations) { + p = &v->perf; + decicycles = avg_cycles_per_call(p); + if (state.csv || state.tsv) { + const char sep = state.csv ? ',' : '\t'; + printf("%s%c%s%c%.1f\n", f->name, sep, + cpu_suffix(v->cpu), sep, + decicycles / 10.0); + } else { + const int pad_length = 10 + 50 - + printf("%s_%s:", f->name, cpu_suffix(v->cpu)); + const double ratio = decicycles ? + baseline / decicycles : 0.0; + printf("%*.1f (%5.2fx)\n", FFMAX(pad_length, 0), + decicycles / 10.0, ratio); } - } while ((v = v->next)); - } + } + } while ((v = v->next)); print_benchs(f->child[1]); } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".