Skip to content

Commit

Permalink
Fix for Jira bug I7-2069
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed May 26, 2022
1 parent 04c80e3 commit 25cc80a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 58 deletions.
1 change: 1 addition & 0 deletions docs/imperative-module/3-fnc.html
Expand Up @@ -253,6 +253,7 @@ <h1><a href="../index.html">
<span class="plain-syntax"> </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">kernel_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">public_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">current_function</span><span class="plain-syntax">.</span><span class="element-syntax">currently_compiling_iname</span><span class="plain-syntax">;</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-sf.html#SP16" class="function-link"><span class="function-syntax">Frames::uses_local_block_values</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">frame</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax"> (</span><span class="identifier-syntax">Kinds::Behaviour::uses_block_values</span><span class="plain-syntax">(</span><span class="identifier-syntax">frame</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">kind_returned</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax"> (</span><span class="identifier-syntax">frame</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">no_formal_parameters_needed</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">))</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">kernel_name</span><span class="plain-syntax"> = </span><a href="3-fnc.html#SP7" class="function-link"><span class="function-syntax">Functions::function_kernel</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">Emit::tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">public_name</span><span class="plain-syntax">);</span>

Expand Down
64 changes: 32 additions & 32 deletions inform7/Figures/memory-diagnostics.txt
@@ -1,47 +1,47 @@
Total memory consumption was 129432K = 126 MB
Total memory consumption was 123375K = 120 MB

---- was used for 2044964 objects, in 362887 frames in 0 x 800K = 0K = 0 MB:

31.5% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
19.5% text_stream_array 4605 x 100 = 460500 objects, 25935360 bytes
18.3% linked_list 43461 objects, 24338160 bytes
10.6% inter_symbol_array 132 x 1024 = 135168 objects, 14061696 bytes
9.9% inter_error_stash_array 101 x 1024 = 103424 objects, 13241504 bytes
7.8% parse_node 129722 objects, 10377760 bytes
5.6% verb_conjugation 160 objects, 7425280 bytes
4.1% parse_node_annotation_array 346 x 500 = 173000 objects, 5547072 bytes
2.5% pcalc_prop_array 25 x 1000 = 25000 objects, 3400800 bytes
2.4% inter_name_array 67 x 1000 = 67000 objects, 3218144 bytes
1.9% kind_array 66 x 1000 = 66000 objects, 2642112 bytes
1.5% inter_name_generator_array 51 x 1000 = 51000 objects, 2041632 bytes
33.0% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
20.5% text_stream_array 4605 x 100 = 460500 objects, 25935360 bytes
19.2% linked_list 43461 objects, 24338160 bytes
11.1% inter_symbol_array 132 x 1024 = 135168 objects, 14061696 bytes
10.4% inter_error_stash_array 101 x 1024 = 103424 objects, 13241504 bytes
8.2% parse_node 129722 objects, 10377760 bytes
5.8% verb_conjugation 160 objects, 7425280 bytes
4.3% parse_node_annotation_array 346 x 500 = 173000 objects, 5547072 bytes
2.6% pcalc_prop_array 25 x 1000 = 25000 objects, 3400800 bytes
2.5% inter_name_array 67 x 1000 = 67000 objects, 3218144 bytes
2.0% kind_array 66 x 1000 = 66000 objects, 2642112 bytes
1.6% inter_name_generator_array 51 x 1000 = 51000 objects, 2041632 bytes
1.5% inter_schema_token 13969 objects, 2011536 bytes
1.4% package_request 21153 objects, 1861464 bytes
1.3% vocabulary_entry_array 161 x 100 = 16100 objects, 1808352 bytes
1.1% dict_entry_array 470 x 100 = 47000 objects, 1519040 bytes
1.4% vocabulary_entry_array 161 x 100 = 16100 objects, 1808352 bytes
1.2% dict_entry_array 470 x 100 = 47000 objects, 1519040 bytes
1.1% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes
1.1% inter_symbols_table 26592 objects, 1489152 bytes
1.0% i6_schema_array 23 x 100 = 2300 objects, 1380736 bytes
0.9% scan_directory 314 objects, 1296192 bytes
0.9% inter_package 26592 objects, 1276416 bytes
1.0% scan_directory 314 objects, 1296192 bytes
1.0% inter_package 26592 objects, 1276416 bytes
0.8% map_data 671 objects, 1127280 bytes
0.8% id_body 942 objects, 1077648 bytes
0.7% adjective_meaning 202 objects, 1000304 bytes
0.7% excerpt_meaning 3102 objects, 967824 bytes
0.6% production 3878 objects, 899696 bytes
0.7% production 3878 objects, 899696 bytes
0.6% ptoken 8397 objects, 873288 bytes
0.6% grammatical_usage 3613 objects, 867120 bytes
0.6% individual_form 2563 objects, 861168 bytes
0.6% inter_schema_node 8920 objects, 856320 bytes
0.4% unary_predicate_array 16 x 1000 = 16000 objects, 640512 bytes
0.5% unary_predicate_array 16 x 1000 = 16000 objects, 640512 bytes
0.3% local_variable_array 47 x 100 = 4700 objects, 452704 bytes
0.2% verb_usage 1128 objects, 388032 bytes
0.3% verb_usage 1128 objects, 388032 bytes
0.2% rule 470 objects, 368480 bytes
0.2% dictionary 7520 objects, 360960 bytes
0.2% verb_form 386 objects, 348944 bytes
0.2% noun 2382 objects, 285840 bytes
0.2% compilation_subtask 3355 objects, 268400 bytes
0.1% inter_annotation_array 2 x 8192 = 16384 objects, 262208 bytes
0.1% inference_subject 666 objects, 261072 bytes
0.2% inter_annotation_array 2 x 8192 = 16384 objects, 262208 bytes
0.2% inference_subject 666 objects, 261072 bytes
0.1% vanilla_function 3683 objects, 235712 bytes
0.1% binary_predicate 322 objects, 170016 bytes
0.1% hierarchy_location 1122 objects, 161568 bytes
Expand Down Expand Up @@ -237,23 +237,23 @@ Total memory consumption was 129432K = 126 MB

100.0% was used for memory not allocated for objects:

59.7% text stream storage 79137048 bytes in 478471 claims
3.9% dictionary storage 5228544 bytes in 7520 claims
57.7% text stream storage 72934504 bytes in 478023 claims
4.1% dictionary storage 5228544 bytes in 7520 claims
---- sorting 1448 bytes in 149 claims
5.4% source text 7200000 bytes in 3 claims
8.1% source text details 10800000 bytes in 2 claims
0.1% documentation fragments 262144 bytes in 1 claim
5.6% source text 7200000 bytes in 3 claims
8.5% source text details 10800000 bytes in 2 claims
0.2% documentation fragments 262144 bytes in 1 claim
---- linguistic stock array 81920 bytes in 2 claims
---- small word set array 105600 bytes in 22 claims
3.4% inter symbols storage 4520272 bytes in 27949 claims
12.6% inter bytecode storage 16767680 bytes in 14 claims
4.6% inter links storage 6222976 bytes in 11 claims
3.5% inter symbols storage 4520272 bytes in 27949 claims
13.2% inter bytecode storage 16767680 bytes in 14 claims
4.9% inter links storage 6222976 bytes in 11 claims
0.1% inter tree location list storage 191232 bytes in 32 claims
1.2% instance-of-kind counting 1700416 bytes in 1 claim
1.3% instance-of-kind counting 1700416 bytes in 1 claim
---- compilation workspace for objects 21896 bytes in 25 claims
---- lists for type-checking invocations 16000 bytes in 1 claim
---- code generation workspace for objects 1336 bytes in 4 claims
0.2% emitter array storage 280288 bytes in 1999 claims

-139.-3% was overhead - -184656920 bytes = -180329K = -176 MB
-146.-1% was overhead - -184656920 bytes = -180329K = -176 MB

51 changes: 25 additions & 26 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,33 +1,32 @@
100.0% in inform7 run
71.3% in compilation to Inter
50.0% in //Sequence::undertake_queued_tasks//
4.7% in //MajorNodes::pre_pass//
71.5% in compilation to Inter
50.8% in //Sequence::undertake_queued_tasks//
4.6% in //MajorNodes::pre_pass//
3.4% in //MajorNodes::pass_1//
2.3% in //RTPhrasebook::compile_entries//
2.0% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.4% in //RTKindConstructors::compile//
1.1% in //Sequence::lint_inter//
0.5% in //ImperativeDefinitions::compile_first_block//
0.5% in //MajorNodes::pass_2//
0.5% in //Sequence::undertake_queued_tasks//
0.5% in //World::stage_V//
0.3% in //Sequence::undertake_queued_tasks//
0.1% in //CompletionModule::compile//
0.1% in //InferenceSubjects::emit_all//
0.1% in //RTKindConstructors::compile_permissions//
0.1% in //Task::make_built_in_kind_constructors//
0.1% in //World::stages_II_and_III//
2.7% not specifically accounted for
1.2% in //Sequence::lint_inter//
0.6% in //MajorNodes::pass_2//
0.6% in //Sequence::undertake_queued_tasks//
0.6% in //World::stage_V//
0.4% in //ImperativeDefinitions::compile_first_block//
0.4% in //Sequence::undertake_queued_tasks//
0.2% in //CompletionModule::compile//
0.2% in //InferenceSubjects::emit_all//
0.2% in //RTKindConstructors::compile_permissions//
0.2% in //Task::make_built_in_kind_constructors//
2.6% not specifically accounted for
25.8% in running Inter pipeline
10.6% in step 14/15: generate inform6 -> auto.inf
5.5% in step 5/15: load-binary-kits
5.3% in step 6/15: make-synoptic-module
10.3% in step 14/15: generate inform6 -> auto.inf
5.6% in step 5/15: load-binary-kits
5.2% in step 6/15: make-synoptic-module
1.4% in step 9/15: make-identifiers-unique
0.3% in step 12/15: eliminate-redundant-operations
0.3% in step 4/15: compile-splats
0.3% in step 7/15: shorten-wiring
0.3% in step 8/15: detect-indirect-calls
0.1% in step 11/15: eliminate-redundant-labels
0.4% in step 12/15: eliminate-redundant-operations
0.4% in step 4/15: compile-splats
0.4% in step 7/15: shorten-wiring
0.4% in step 8/15: detect-indirect-calls
0.2% in step 11/15: eliminate-redundant-labels
1.3% not specifically accounted for
2.3% in supervisor
0.4% not specifically accounted for
2.2% in supervisor
0.5% not specifically accounted for
1 change: 1 addition & 0 deletions inform7/imperative-module/Chapter 3/Functions.w
Expand Up @@ -175,6 +175,7 @@ void Functions::end(packaging_state save) {
inter_name *kernel_name = NULL;
inter_name *public_name = current_function.currently_compiling_iname;
if ((Frames::uses_local_block_values(frame)) ||
(Kinds::Behaviour::uses_block_values(frame->kind_returned)) ||
(frame->no_formal_parameters_needed > 0))
kernel_name = Functions::function_kernel(Emit::tree(), public_name);

Expand Down

0 comments on commit 25cc80a

Please sign in to comment.