On 03/28/2016 06:44 AM, Andi Kleen wrote:
From: Andi Kleen <a...@linux.intel.com>
Extend the existing bprob and tree-prof tests to also run with autofdo.
The test runtimes are really a bit too short for autofdo, but it's
a reasonable sanity check.
This only works natively for now.
dejagnu doesn't seem to support a wrapper for unix tests, so I had
to open code running these tests. That should be ok due to the
native run restrictions.
Ideally this would be reviewed by someone who knows tcl (and autofdo) a
little better. Some observations.
+set profile_wrapper [profopt-perf-wrapper]
+set profile_options "-g"
+set feedback_options "-fauto-profile"
+set run_autofdo 1
+
+foreach profile_option $profile_options feedback_option $feedback_options {
+ foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] {
+ if ![runtest_file_p $runtests $src] then {
+ continue
+ }
+ set base [file tail $srco
+ profopt-execute $src
+ }
+}
+
+set run_autofdo ""
+set profile_wrapper ""
This block appears duplicated across several files. Is there a way to
unify that?
> + if { $run_autofdo == 1 } {
> + # unix_load does not support wrappers in $PATH, so implement
> + # it manually here
Please write full sentences with proper capitalization and punctuation.
This occurs across several of these patches, I'll only mention it here.
@@ -313,6 +320,7 @@ proc profopt-execute { src } {
# valid, by running it after dg-additional-files-options.
foreach ext $prof_ext {
profopt-target-cleanup $tmpdir $base $ext
+ profopt-target-cleanup $tmpdir perf data
}
We have this, and then...
@@ -400,6 +451,7 @@ proc profopt-execute { src } {
foreach ext $prof_ext {
profopt-target-cleanup $tmpdir $base $ext
}
+ # XXX remove perf.data
... this - does that need to look the same as the above?
+ # Should check if create_gcov exists
So maybe do that?
Bernd