mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Estimated hours taken: 1 tests/benchmarks/poly.mprof-exp: Update the expected memory profiling output to reflect changes in the generated code caused by deforestation.
365 lines
20 KiB
Plaintext
365 lines
20 KiB
Plaintext
% Processing input files... done
|
|
% Building call graph... done
|
|
% Propagating counts... done
|
|
% Generating output... done
|
|
*** profiling memory-words ***
|
|
|
|
call graph profile:
|
|
Sorted on the %mem field.
|
|
|
|
procedure entries:
|
|
|
|
index the index number of the procedure in the call graph
|
|
listing.
|
|
|
|
%mem the percentage of the total allocated memory of
|
|
the program allocated by this procedure and its
|
|
descendents.
|
|
|
|
self the number of kilowords actually allocated by
|
|
the procedure's own code.
|
|
|
|
descendents the number of kilowords allocated by the
|
|
descendents of the current procedure.
|
|
|
|
called the number of times the current procedure is
|
|
called (not counting self recursive calls).
|
|
|
|
self the number of self recursive calls.
|
|
|
|
name the name of the current procedure.
|
|
|
|
index an index number to locate the function easily.
|
|
|
|
|
|
|
|
parent listings:
|
|
|
|
self* the number of kilowords of the current procedure's self
|
|
memory due to calls from this parent.
|
|
|
|
descendents* the number of kilowords of the current procedure's descendent
|
|
memory which is due to calls from this parent.
|
|
|
|
called* the number of times the current procedure is called
|
|
by this parent.
|
|
|
|
total the number of times this procedure is called by its parents.
|
|
|
|
parents the name of this parent.
|
|
|
|
index the index number of the parent procedure
|
|
|
|
|
|
|
|
children listings:
|
|
|
|
self* the number of kilowords of this child's self memory which is
|
|
due to being called by the current procedure.
|
|
|
|
descendent* the number of kilowords of this child's descendent memory which
|
|
is due to the current procedure.
|
|
|
|
called* the number of times this child is called by the current
|
|
procedure.
|
|
|
|
total* the number of times this child is called by all procedures.
|
|
|
|
children the name of this child.
|
|
|
|
index the index number of the child.
|
|
|
|
|
|
|
|
called/total parents
|
|
index %mem self descendents called+self name index
|
|
called/total children
|
|
|
|
<spontaneous>
|
|
[1] 99.9 0.00 39.05 0 <predicate 'main'/2 mode 0> [1]
|
|
0.00 39.05 1/1 <predicate poly:'main3'/3 mode 0> [2]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 39.05 1/1 <predicate 'main'/2 mode 0> [1]
|
|
[2] 99.9 0.00 39.05 1 <predicate poly:'main3'/3 mode 0> [2]
|
|
0.00 0.00 5/2307 <predicate io:'write_string'/3 mode 0> [24]
|
|
0.00 39.05 1/1 <predicate poly:'main1'/1 mode 0> [3]
|
|
0.00 0.00 1/66 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 39.05 1/1 <predicate poly:'main3'/3 mode 0> [2]
|
|
[3] 99.9 0.00 39.05 1 <predicate poly:'main1'/1 mode 0> [3]
|
|
0.00 0.00 2/5 <predicate poly:'add_to_order_zero_term'/3 mode 0> <cycle 5> [16]
|
|
0.00 0.00 1/3 <predicate poly:'poly_exp'/3 mode 0> <cycle 3> [19]
|
|
|
|
-----------------------------------------------
|
|
|
|
1 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
2 <predicate poly:'poly_exp'/3 mode 0> <cycle 3> [19]
|
|
[4] 99.8 0.00 39.01 2+1 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
0.00 0.00 5/3930 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
2 <predicate poly:'poly_exp'/3 mode 0> <cycle 3> [19]
|
|
1 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
|
|
-----------------------------------------------
|
|
|
|
932 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
283 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
[5] 57.7 3.72 22.57 283+932 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
10.32 10.32 932/1355 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
932 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
932 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
932 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
|
|
-----------------------------------------------
|
|
|
|
4077 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
423 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
15.01 15.01 932/1355 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
[6] 38.4 15.01 15.01 1355+4077 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
3428 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
4077 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
|
|
-----------------------------------------------
|
|
|
|
2197 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
932 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
[7] 22.4 8.78 8.78 932+2197 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
2197 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
2197 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
|
|
-----------------------------------------------
|
|
|
|
796 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
2197 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
932 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
4.46 4.46 5/3930 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
[8] 11.4 4.46 4.46 3930 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
251 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
283 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
|
|
-----------------------------------------------
|
|
|
|
3 <predicate poly:'add_to_order_zero_term'/3 mode 0> <cycle 5> [16]
|
|
3428 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
[9] 9.8 3.85 3.85 3431 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
3 <predicate poly:'add_to_order_zero_term'/3 mode 0> <cycle 5> [16]
|
|
423 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
|
|
-----------------------------------------------
|
|
|
|
796 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
251 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
[10] 8.1 3.18 3.18 251+796 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
796 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
796 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
|
|
-----------------------------------------------
|
|
|
|
<spontaneous>
|
|
[11] 0.0 0.00 0.02 0 <predicate io:'init_state'/2 mode 0> [11]
|
|
0.00 0.02 1/1 <predicate io:'insert_std_stream_names'/2 mode 0> [12]
|
|
0.00 0.00 1/1 <predicate tree234:'init'/1 mode 0> [27]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.02 1/1 <predicate io:'init_state'/2 mode 0> [11]
|
|
[12] 0.0 0.00 0.02 1 <predicate io:'insert_std_stream_names'/2 mode 0> [12]
|
|
0.00 0.02 3/3 <predicate map:'set'/4 mode 1> [13]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.02 3/3 <predicate io:'insert_std_stream_names'/2 mode 0> [12]
|
|
[13] 0.0 0.00 0.02 3 <predicate map:'set'/4 mode 1> [13]
|
|
0.00 0.02 3/3 <predicate tree234:'set'/4 mode 1> [15]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.02 3/3 <predicate tree234:'set'/4 mode 1> [15]
|
|
[14] 0.0 0.00 0.02 3 <predicate tree234:'set'/4 mode 1 (minus unused args)> [14]
|
|
0.00 0.00 1/1 <predicate tree234:'set2'/4 mode 1 (minus unused args)> [18]
|
|
0.01 0.01 1/1 <predicate tree234:'set3'/4 mode 1 (minus unused args)> [17]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.02 3/3 <predicate map:'set'/4 mode 1> [13]
|
|
[15] 0.0 0.00 0.02 3 <predicate tree234:'set'/4 mode 1> [15]
|
|
0.00 0.02 3/3 <predicate tree234:'set'/4 mode 1 (minus unused args)> [14]
|
|
|
|
-----------------------------------------------
|
|
|
|
3 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
0.02 0.02 2/5 <predicate poly:'main1'/1 mode 0> [3]
|
|
[16] 0.0 0.02 0.02 5 <predicate poly:'add_to_order_zero_term'/3 mode 0> <cycle 5> [16]
|
|
3 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.01 0.01 1/1 <predicate tree234:'set'/4 mode 1 (minus unused args)> [14]
|
|
[17] 0.0 0.01 0.01 1 <predicate tree234:'set3'/4 mode 1 (minus unused args)> [17]
|
|
0.00 0.00 2/3 <predicate 'compare'/3 mode 3> [28]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 1/1 <predicate tree234:'set'/4 mode 1 (minus unused args)> [14]
|
|
[18] 0.0 0.00 0.00 1 <predicate tree234:'set2'/4 mode 1 (minus unused args)> [18]
|
|
0.00 0.00 1/3 <predicate 'compare'/3 mode 3> [28]
|
|
|
|
-----------------------------------------------
|
|
|
|
2 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
0.00 0.00 1/3 <predicate poly:'main1'/1 mode 0> [3]
|
|
[19] 0.0 0.00 0.00 3 <predicate poly:'poly_exp'/3 mode 0> <cycle 3> [19]
|
|
2 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
|
|
-----------------------------------------------
|
|
|
|
65 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
0.00 0.00 1/66 <predicate poly:'main3'/3 mode 0> [2]
|
|
[20] 0.0 0.00 0.00 66 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
0.00 0.00 132/2307 <predicate io:'write_string'/3 mode 0> [24]
|
|
66 <predicate poly:'print_terms_2'/3 mode 0> <cycle 2> [21]
|
|
|
|
-----------------------------------------------
|
|
|
|
66 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
[21] 0.0 0.00 0.00 66 <predicate poly:'print_terms_2'/3 mode 0> <cycle 2> [21]
|
|
0.00 0.00 285/2307 <predicate io:'write_string'/3 mode 0> [24]
|
|
351 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
|
|
-----------------------------------------------
|
|
|
|
351 <predicate poly:'print_terms_2'/3 mode 0> <cycle 2> [21]
|
|
[22] 0.0 0.00 0.00 351 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
0.00 0.00 637/637 <predicate io:'write_int'/3 mode 0> [25]
|
|
0.00 0.00 1885/2307 <predicate io:'write_string'/3 mode 0> [24]
|
|
65 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 3/3 <predicate 'compare'/3 mode 3> [28]
|
|
[23] 0.0 0.00 0.00 3 <compare/3 predicate for type builtin:'c_pointer'/0> [23]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 5/2307 <predicate poly:'main3'/3 mode 0> [2]
|
|
0.00 0.00 1885/2307 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
0.00 0.00 132/2307 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
0.00 0.00 285/2307 <predicate poly:'print_terms_2'/3 mode 0> <cycle 2> [21]
|
|
[24] 0.0 0.00 0.00 2307 <predicate io:'write_string'/3 mode 0> [24]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 637/637 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
[25] 0.0 0.00 0.00 637 <predicate io:'write_int'/3 mode 0> [25]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 1/1 <predicate tree234:'init'/1 mode 0> [27]
|
|
[26] 0.0 0.00 0.00 1 <predicate tree234:'init'/1 mode 0 (minus unused args)> [26]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 1/1 <predicate io:'init_state'/2 mode 0> [11]
|
|
[27] 0.0 0.00 0.00 1 <predicate tree234:'init'/1 mode 0> [27]
|
|
0.00 0.00 1/1 <predicate tree234:'init'/1 mode 0 (minus unused args)> [26]
|
|
|
|
-----------------------------------------------
|
|
|
|
0.00 0.00 1/3 <predicate tree234:'set2'/4 mode 1 (minus unused args)> [18]
|
|
0.00 0.00 2/3 <predicate tree234:'set3'/4 mode 1 (minus unused args)> [17]
|
|
[28] 0.0 0.00 0.00 3 <predicate 'compare'/3 mode 3> [28]
|
|
0.00 0.00 3/3 <compare/3 predicate for type builtin:'c_pointer'/0> [23]
|
|
|
|
-----------------------------------------------
|
|
|
|
|
|
flat profile:
|
|
|
|
% the percentage of total allocated memory of the program
|
|
mem used by this procedure.
|
|
|
|
cumulative the total number of kilowords for the current procedure and
|
|
k-words the ones listed above it.
|
|
|
|
self the number of kilowords accounted for by this procedure alone.
|
|
k-words The listing is sorted on this row.
|
|
|
|
calls the number of times this procedure was called.
|
|
|
|
self the average number of words allocated by
|
|
wds/call this procedure per call.
|
|
|
|
total the average number of words allocated by this procedure and its
|
|
wds/call descendents per call.
|
|
|
|
name the name of the procedure followed by its index number.
|
|
|
|
% cumulative self self total
|
|
mem k-words k-words calls wds/call wds/call name
|
|
38.4 15.01 15.01 5432 2.76 2.76 <predicate poly:'term_add'/3 mode 0> <cycle 5> [6]
|
|
22.4 23.79 8.78 3129 2.80 2.80 <predicate poly:'single_term_mul'/3 mode 0> <cycle 4> [7]
|
|
11.4 28.26 4.46 3930 1.13 1.13 <predicate poly:'poly_mul'/3 mode 0> <cycle 4> [8]
|
|
9.8 32.11 3.85 3431 1.12 1.12 <predicate poly:'poly_add'/3 mode 0> <cycle 5> [9]
|
|
9.5 35.84 3.72 1215 3.06 18.57 <predicate poly:'term_mul'/3 mode 0> <cycle 4> [5]
|
|
8.1 39.03 3.18 1047 3.04 3.04 <predicate poly:'mul_through'/3 mode 0> <cycle 4> [10]
|
|
0.0 39.05 0.02 5 4.00 4.00 <predicate poly:'add_to_order_zero_term'/3 mode 0> <cycle 5> [16]
|
|
0.0 39.06 0.01 1 10.00 10.00 <predicate tree234:'set3'/4 mode 1 (minus unused args)> [17]
|
|
0.0 39.06 0.00 1 7.00 7.00 <predicate tree234:'set2'/4 mode 1 (minus unused args)> [18]
|
|
0.0 39.07 0.00 3 1.33 7.00 <predicate tree234:'set'/4 mode 1 (minus unused args)> [14]
|
|
0.0 39.07 0.00 1 2.00 39053.00 <predicate poly:'main1'/1 mode 0> [3]
|
|
0.0 39.07 0.00 2307 0.00 0.00 <predicate io:'write_string'/3 mode 0> [24]
|
|
0.0 39.07 0.00 637 0.00 0.00 <predicate io:'write_int'/3 mode 0> [25]
|
|
0.0 39.07 0.00 351 0.00 0.00 <predicate poly:'print_term'/3 mode 0> <cycle 2> [22]
|
|
0.0 39.07 0.00 66 0.00 0.00 <predicate poly:'print_terms'/3 mode 0> <cycle 2> [20]
|
|
0.0 39.07 0.00 66 0.00 0.00 <predicate poly:'print_terms_2'/3 mode 0> <cycle 2> [21]
|
|
0.0 39.07 0.00 3 0.00 0.00 <predicate poly:'poly_exp'/3 mode 0> <cycle 3> [19]
|
|
0.0 39.07 0.00 3 0.00 0.00 <compare/3 predicate for type builtin:'c_pointer'/0> [23]
|
|
0.0 39.07 0.00 3 0.00 7.00 <predicate map:'set'/4 mode 1> [13]
|
|
0.0 39.07 0.00 3 0.00 7.00 <predicate tree234:'set'/4 mode 1> [15]
|
|
0.0 39.07 0.00 3 0.00 0.00 <predicate 'compare'/3 mode 3> [28]
|
|
0.0 39.07 0.00 3 0.00 13003.51 <deforestation procedure (#0) from poly:'poly_exp' line 224> <cycle 3> [4]
|
|
0.0 39.07 0.00 1 0.00 39053.00 <predicate poly:'main3'/3 mode 0> [2]
|
|
0.0 39.07 0.00 1 0.00 21.00 <predicate io:'insert_std_stream_names'/2 mode 0> [12]
|
|
0.0 39.07 0.00 1 0.00 0.00 <predicate tree234:'init'/1 mode 0 (minus unused args)> [26]
|
|
0.0 39.07 0.00 1 0.00 0.00 <predicate tree234:'init'/1 mode 0> [27]
|
|
0.0 39.07 0.00 0 0.00 0.00 <predicate 'main'/2 mode 0> [1]
|
|
0.0 39.07 0.00 0 0.00 0.00 <predicate io:'init_state'/2 mode 0> [11]
|
|
|
|
|
|
|
|
alphabetic listing:
|
|
|
|
[23] <compare/3 predicate for type builtin:'c_pointer'/0>
|
|
[4] <deforestation procedure (#0) from poly:'poly_exp' line 224>
|
|
[28] <predicate 'compare'/3 mode 3>
|
|
[1] <predicate 'main'/2 mode 0>
|
|
[11] <predicate io:'init_state'/2 mode 0>
|
|
[12] <predicate io:'insert_std_stream_names'/2 mode 0>
|
|
[25] <predicate io:'write_int'/3 mode 0>
|
|
[24] <predicate io:'write_string'/3 mode 0>
|
|
[13] <predicate map:'set'/4 mode 1>
|
|
[16] <predicate poly:'add_to_order_zero_term'/3 mode 0>
|
|
[3] <predicate poly:'main1'/1 mode 0>
|
|
[2] <predicate poly:'main3'/3 mode 0>
|
|
[10] <predicate poly:'mul_through'/3 mode 0>
|
|
[9] <predicate poly:'poly_add'/3 mode 0>
|
|
[19] <predicate poly:'poly_exp'/3 mode 0>
|
|
[8] <predicate poly:'poly_mul'/3 mode 0>
|
|
[22] <predicate poly:'print_term'/3 mode 0>
|
|
[20] <predicate poly:'print_terms'/3 mode 0>
|
|
[21] <predicate poly:'print_terms_2'/3 mode 0>
|
|
[7] <predicate poly:'single_term_mul'/3 mode 0>
|
|
[6] <predicate poly:'term_add'/3 mode 0>
|
|
[5] <predicate poly:'term_mul'/3 mode 0>
|
|
[26] <predicate tree234:'init'/1 mode 0 (minus unused args)>
|
|
[27] <predicate tree234:'init'/1 mode 0>
|
|
[14] <predicate tree234:'set'/4 mode 1 (minus unused args)>
|
|
[15] <predicate tree234:'set'/4 mode 1>
|
|
[18] <predicate tree234:'set2'/4 mode 1 (minus unused args)>
|
|
[17] <predicate tree234:'set3'/4 mode 1 (minus unused args)>
|
|
|
|
|