Create test cases for feedback analysis.

These test cases take a program's profile and compute from it a feedback file.
Then pretty-print the feedback file using mdprof_report_feedback, and compare
the pretty-printed output to a reference output.  By comparing the pretty
printed output it's easy to see what has changed when the tests fail.

tests/Mmakefile:
tests/feedback:
    Create feedback directory in the test suite.

tests/feedback/Mmakefile:
tests/feedback/autopar_mandelbrot.exp:
tests/feedback/autopar_mmc.exp:
tests/feedback/mandelbrot/Deep.data:
tests/feedback/mandelbrot/Deep.procrep:
tests/feedback/mmc/Deep.data:
tests/feedback/mmc/Deep.procrep:
    Create two test cases for feedback analysis, these test the automatic
    parallelization of the compiler and mandelbrot program.

deep_profiler/mdprof_create_feedback.m:
    The create feedback tool does not generate a report by default.
This commit is contained in:
Paul Bone
2011-12-05 05:58:07 +00:00
parent 8e7ad6c673
commit 7f39309eb2
9 changed files with 9544 additions and 4 deletions

View File

@@ -191,9 +191,8 @@ help_message(ProgName) = HelpMessage :-
--debug-read-profile
Generate debugging messages when reading the deep profile
and creating the deep structure.
--no-report Suppress the report about the feedback information in the
file that is usually displayed after any processing has
been done.
--report Print a report about the feedback information after any
processing has been done.
The following options select sets of feedback information useful
for particular compiler optimizations:
@@ -435,7 +434,7 @@ defaults(help, bool(no)).
defaults(verbosity, int(2)).
defaults(version, bool(no)).
defaults(debug_read_profile, bool(no)).
defaults(report, bool(yes)).
defaults(report, bool(no)).
defaults(candidate_parallel_conjunctions, bool(no)).

View File

@@ -6,6 +6,7 @@ SUBDIRS = \
benchmarks \
debugger \
dppd \
feedback \
general \
grade_subdirs \
hard_coded \

34
tests/feedback/Mmakefile Normal file
View File

@@ -0,0 +1,34 @@
#-----------------------------------------------------------------------------#
THIS_DIR = feedback
#-----------------------------------------------------------------------------#
AUTOPAR_REPORTS=mandelbrot \
mmc
REPORTS=$(patsubst %,autopar_%,$(AUTOPAR_REPORTS))
TESTS = $(patsubst %,%-nodepend,$(sort $(REPORTS)))
TESTS_DIR = ..
SUBDIRS=
include $(TESTS_DIR)/Mmake.common
FB_CREATE = ../../deep_profiler/mdprof_create_feedback
FB_REPORT = ../../deep_profiler/mdprof_report_feedback
%.runtest: %.res ;
%.out: %.feedback
$(FB_REPORT) $< > $@
autopar_%.feedback: %/Deep.data %/Deep.procrep
$(FB_CREATE) --implicit-parallelism $< $@
%.realclean:
rm -rf $(@:.realclean=.feedback) \
$(@:.realclean=.out) \
$(@:.realclean=.res) \
$(@:.realclean=.res1) \
$(@:.realclean=.log)

View File

@@ -0,0 +1,62 @@
Feedback report for ./mandelbrot:
Candidate parallel conjunctions:
Desired parallelism: 8.000000
Intermodule var use: no
Sparking cost: 100
Sparking delay: 1000
Barrier cost: 100
Future signal cost: 100
Future wait cost: 200
Context wakeup delay: 1000
Clique threshold: 2000
Call site threshold: 2000
Speedup threshold: 1.010000
Dependent conjs: yes, use overlap calculation
BestParAlgorithm: complete-branches(1000)
# of par procs with conjs: 1
# of par conjunctions: 1
Parallel conjunctions:
pred mandelbrot.my_map/3-0
Path: s2-na;
Dependent: no
NumCalls: 200
SeqTime: 2,023,529.72
ParTime: 1,013,765.36
SparkCost: 100.00
BarrierCost: 200.00
SignalsCost: 0.00
WaitsCost: 0.00
ParOverheads total: 300.00
Speedup: 1.9961
Time saving: 1,009,764.36
First conj dead time: 1,001.00
Future dead time: 0.00
Total dead time: 1,001.00
Goals before:
% conjunction: s2-na;
% Cost: 0.00
% s2-na;c1;
% det
% cost: 0.00 (not above threshold)
V_2 => [|](X, Xs)
Parallel conjunction:
(
% s2-na;c2;c1;
% det
% cost: 1,011,764.36 (above threshold)
M((X, Y))
&
% s2-na;c2;c2;
% det
% cost: 1,011,765.36 (above threshold)
mandelbrot.my_map(V_8, V_9, M, Xs, Ys)
)
Goals after:

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.