fix cvt emitter
[libfirm] / ir / be / beprofile.c
1 /** vim: set sw=4 ts=4:
2  * @file   beprofile.c
3  * @date   2006-04-06
4  * @author Adam M. Szalkowski
5  * @cvs-id $Id$
6  *
7  * Code instrumentation and execution count profiling
8  *
9  * Copyright (C) 2006 Universitaet Karlsruhe
10  * Released under the GPL
11  */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <math.h>
17
18 #include "hashptr.h"
19 #include "debug.h"
20 #include "obst.h"
21 #include "set.h"
22 #include "list.h"
23 #include "pmap.h"
24
25 #include "entity.h"
26 #include "irprintf.h"
27 #include "irgwalk.h"
28 #include "irdump_t.h"
29 #include "irnode_t.h"
30 #include "ircons_t.h"
31 #include "irloop_t.h"
32 #include "iredges.h"
33 #include "execfreq.h"
34 #include "irvrfy.h"
35 #include "type.h"
36
37 #include "be_t.h"
38 #include "belive_t.h"
39 #include "besched_t.h"
40 #include "beirgmod.h"
41 #include "bearch.h"
42 #include "beabi.h"
43 #include "benode_t.h"
44 #include "beutil.h"
45 #include "ircons.h"
46 #include "irhooks.h"
47 #include "iredges.h"
48
49 #include "bechordal_t.h"
50
51 #ifdef WITH_LIBCORE
52 #include <libcore/lc_opts.h>
53 #include <libcore/lc_opts_enum.h>
54 #endif /* WITH_LIBCORE */
55
56 #include "beprofile.h"
57
58 /** An entry in the id-to-location map */
59 typedef struct loc_entry {
60         ir_entity    *fname;   /**< the entity holding the file name */
61         unsigned int lineno;   /**< line number */
62 } loc_entry;
63
64 typedef struct _block_id_walker_data_t {
65         tarval         **array;    /**< the entity the holds the block counts */
66         unsigned int   id;         /**< current block id number */
67         ir_node        *symconst;  /**< the SymConst representing array */
68         pmap           *fname_map; /**< set containing all found filenames */
69         loc_entry      *locs;      /**< locations */
70         ir_type        *tp_char;   /**< the character type */
71         unsigned       flags;      /**< profile flags */
72 } block_id_walker_data_t;
73
74 typedef struct _execcount_t {
75         unsigned int block;
76         unsigned int count;
77 } execcount_t;
78
79 static int
80 cmp_execcount(const void * a, const void * b, size_t size)
81 {
82         return ((execcount_t*)a)->block != ((execcount_t*)b)->block;
83 }
84
85 static void
86 block_counter(ir_node * bb, void * data)
87 {
88         unsigned int  *count = data;
89         *count = *count + 1;
90 }
91
92 static unsigned int
93 count_blocks(ir_graph * irg)
94 {
95         unsigned int count = 0;
96
97         irg_block_walk_graph(irg, block_counter, NULL, &count);
98         return count;
99 }
100
101 /* keep the execcounts here because they are only read once per compiler run */
102 static set * profile = NULL;
103 static hook_entry_t hook;
104
105 /**
106  * Instrument a block with code needed for profiling
107  */
108 static void
109 instrument_block(ir_node * bb, ir_node * address, unsigned int id)
110 {
111         ir_graph *irg = get_irn_irg(bb);
112         ir_node  *start_block = get_irg_start_block(irg);
113         ir_node  *load, *store, *offset, *add, *projm, *proji, *unknown;
114         ir_node  *cnst;
115
116         /**
117          * We can't instrument the start and end block as there are no real
118          * instructions in these blocks
119          */
120         if(bb == start_block || bb == get_irg_end_block(irg))
121                 return;
122
123         unknown = new_r_Unknown(irg, mode_M);
124         cnst    = new_r_Const_long(irg, start_block, mode_Iu, get_mode_size_bytes(mode_Iu) * id);
125         offset  = new_r_Add(irg, bb, address, cnst, mode_P);
126         load    = new_r_Load(irg, bb, unknown, offset, mode_Iu);
127         projm   = new_r_Proj(irg, bb, load, mode_M, pn_Load_M);
128         proji   = new_r_Proj(irg, bb, load, mode_Iu, pn_Load_res);
129         cnst    = new_r_Const_long(irg, start_block, mode_Iu, 1);
130         add     = new_r_Add(irg, bb, proji, cnst, mode_Iu);
131         store   = new_r_Store(irg, bb, projm, offset, add);
132         projm   = new_r_Proj(irg, bb, store, mode_M, pn_Store_M);
133         set_irn_link(bb, projm);
134         set_irn_link(projm, load);
135 }
136
137 typedef struct fix_env {
138         ir_node *start_block;
139         ir_node *end_block;
140 } fix_env;
141
142 /**
143  * SSA Construction for instrumentation code memory
144  */
145 static void
146 fix_ssa(ir_node * bb, void * data)
147 {
148         fix_env *env = data;
149         ir_node *mem;
150         int     arity = get_Block_n_cfgpreds(bb);
151
152         /* start and end block are not instrumented, skip! */
153         if (bb == env->start_block || bb == env->end_block)
154                 return;
155
156         if (arity == 1) {
157                 mem = get_irn_link(get_Block_cfgpred_block(bb, 0));
158         } else {
159                 int n;
160                 ir_node **ins;
161                 ir_graph *irg = current_ir_graph;
162
163                 NEW_ARR_A(ir_node*, ins, arity);
164                 for (n = arity - 1; n >= 0; --n) {
165                         ins[n] = get_irn_link(get_Block_cfgpred_block(bb, n));
166                 }
167                 mem = new_r_Phi(irg, bb, arity, ins, mode_M);
168         }
169         set_Load_mem(get_irn_link(get_irn_link(bb)), mem);
170 }
171
172
173 /**
174  * Generates a new irg which calls the initializer
175  *
176  * Pseudocode:
177  *       void __firmprof_initializer(void) { __init_firmprof(ent_filename, bblock_id, bblock_counts, n_blocks); }
178  */
179 static ir_graph *
180 gen_initializer_irg(ir_entity * ent_filename, ir_entity * bblock_id, ir_entity * bblock_counts, int n_blocks)
181 {
182         ir_node *start_block;
183
184         ir_node   *ins[4];
185         ident     *name = new_id_from_str("__firmprof_initializer");
186         ir_entity *ent  = new_entity(get_glob_type(), name, new_type_method(name, 0, 0));
187         ir_node   *ret, *call, *symconst;
188         symconst_symbol sym;
189
190         ident     *init_name = new_id_from_str("__init_firmprof");
191         ir_type   *init_type = new_type_method(init_name, 4, 0);
192         ir_type   *uint, *uintptr, *string;
193         ir_entity *init_ent;
194         ir_graph  *irg;
195         ir_node   *bb;
196         ir_type   *empty_frame_type;
197
198         set_entity_ld_ident(ent, name);
199
200         uint    = new_type_primitive(new_id_from_str("__uint"), mode_Iu);
201         uintptr = new_type_pointer(new_id_from_str("__uintptr"), uint, mode_P);
202         string  = new_type_pointer(new_id_from_str("__charptr"), new_type_primitive(new_id_from_str("__char"), mode_Bs), mode_P);
203
204         set_method_param_type(init_type, 0, string);
205         set_method_param_type(init_type, 1, uintptr);
206         set_method_param_type(init_type, 2, uintptr);
207         set_method_param_type(init_type, 3, uint);
208         init_ent = new_entity(get_glob_type(), init_name, init_type);
209         set_entity_ld_ident(init_ent, init_name);
210
211         irg = new_ir_graph(ent, 0);
212         empty_frame_type = get_irg_frame_type(irg);
213         set_type_size_bytes(empty_frame_type, 0);
214
215         bb = get_cur_block();
216
217         start_block = get_irg_start_block(irg);
218
219         sym.entity_p = init_ent;
220         symconst     = new_r_SymConst(irg, start_block, sym, symconst_addr_ent);
221
222         sym.entity_p = ent_filename;
223         ins[0] = new_r_SymConst(irg, start_block, sym, symconst_addr_ent);
224         sym.entity_p = bblock_id;
225         ins[1] = new_r_SymConst(irg, start_block, sym, symconst_addr_ent);
226         sym.entity_p = bblock_counts;
227         ins[2] = new_r_SymConst(irg, start_block, sym, symconst_addr_ent);
228         ins[3] = new_r_Const_long(irg, start_block, mode_Iu, n_blocks);
229
230         call = new_r_Call(irg, bb, get_irg_initial_mem(irg), symconst, 4, ins, init_type);
231         ret = new_r_Return(irg, bb, new_r_Proj(irg, bb, call, mode_M, pn_Call_M_regular), 0, NULL);
232         mature_immBlock(bb);
233
234         add_immBlock_pred(get_irg_end_block(irg), ret);
235         mature_immBlock(get_irg_end_block(irg));
236
237         irg_finalize_cons(irg);
238
239         return irg;
240 }
241
242 /**
243  * Create the location data for the given debug info.
244  */
245 static void create_location_data(dbg_info *dbg, block_id_walker_data_t *wd)
246 {
247         unsigned lineno;
248         const char *fname = be_retrieve_dbg_info(dbg, &lineno);
249
250         if (fname) {
251                 pmap_entry *entry = pmap_find(wd->fname_map, (void *)fname);
252                 ir_entity  *ent;
253
254                 if (! entry) {
255                         static unsigned nr = 0;
256                         ident   *id;
257                         char    buf[128];
258                         ir_type *arr;
259                         int     i, len = strlen(fname) + 1;
260                         tarval  **tarval_string;
261
262                         snprintf(buf, sizeof(buf), "firm_name_arr.%d", nr);
263                         arr = new_type_array(new_id_from_str(buf), 1, wd->tp_char);
264                         set_array_bounds_int(arr, 0, 0, len);
265
266                         snprintf(buf, sizeof(buf), "__firm_name.%d", nr++);
267                         id = new_id_from_str(buf);
268                         ent = new_entity(get_glob_type(), id, arr);
269                         set_entity_ld_ident(ent, id);
270
271                         pmap_insert(wd->fname_map, (void *)fname, ent);
272
273                         /* initialize file name string constant */
274                         tarval_string = alloca(sizeof(*tarval_string) * (len));
275                         for (i = 0; i < len; ++i) {
276                                 tarval_string[i] = new_tarval_from_long(fname[i], mode_Bs);
277                         }
278                         set_entity_variability(ent, variability_constant);
279                         set_array_entity_values(ent, tarval_string, len);
280                 } else {
281                         ent = entry->value;
282                 }
283                 wd->locs[wd->id].fname  = ent;
284                 wd->locs[wd->id].lineno = lineno;
285         } else {
286                 wd->locs[wd->id].fname  = NULL;
287                 wd->locs[wd->id].lineno = 0;
288         }
289 }
290
291 /**
292  * Walker: assigns an ID to every block.
293  * Builds the string table
294  */
295 static void
296 block_id_walker(ir_node * bb, void * data)
297 {
298         block_id_walker_data_t *wd = data;
299
300         wd->array[wd->id] = new_tarval_from_long(get_irn_node_nr(bb), mode_Iu);
301         instrument_block(bb, wd->symconst, wd->id);
302
303         if (wd->flags & profile_with_locations) {
304                 dbg_info *dbg = get_irn_dbg_info(bb);
305                 create_location_data(dbg, wd);
306         }
307         ++wd->id;
308 }
309
310 #define IDENT(x)        new_id_from_chars(x, sizeof(x) - 1)
311
312 ir_graph *
313 be_profile_instrument(const char *filename, unsigned flags)
314 {
315         int n, i;
316         unsigned int n_blocks = 0;
317         ir_entity *bblock_id;
318         ir_entity *bblock_counts;
319         ir_entity *ent_filename;
320         ir_entity *ent_locations = NULL;
321         ir_entity *loc_lineno = NULL;
322         ir_entity *loc_name = NULL;
323         ir_entity *ent;
324         ir_type *array_type;
325         ir_type *uint_type;
326         ir_type *string_type;
327         ir_type *character_type;
328         ir_type *loc_type = NULL;
329         ir_type *charptr_type;
330         ir_type *gtp;
331         tarval **tarval_array;
332         tarval **tarval_string;
333         tarval *tv;
334         int filename_len = strlen(filename)+1;
335         ident *cur_ident;
336         int align_l, align_n, size;
337         ir_graph *rem;
338         block_id_walker_data_t  wd;
339         symconst_symbol sym;
340
341         /* count the number of block first */
342         for (n = get_irp_n_irgs() - 1; n >= 0; --n) {
343                 ir_graph *irg = get_irp_irg(n);
344
345                 n_blocks += count_blocks(irg);
346         }
347
348         /* create all the necessary types and entities. Note that the
349            types must have a fixed layout, because we already running in the
350            backend */
351         uint_type      = new_type_primitive(IDENT("__uint"), mode_Iu);
352         set_type_alignment_bytes(uint_type, get_type_size_bytes(uint_type));
353         array_type     = new_type_array(IDENT("__block_info_array"), 1, uint_type);
354         set_array_bounds_int(array_type, 0, 0, n_blocks);
355
356         character_type = new_type_primitive(IDENT("__char"), mode_Bs);
357         string_type    = new_type_array(IDENT("__filename"), 1, character_type);
358         set_array_bounds_int(string_type, 0, 0, filename_len);
359
360         gtp            = get_glob_type();
361
362         cur_ident      = IDENT("__FIRMPROF__BLOCK_IDS");
363         bblock_id      = new_entity(gtp, cur_ident, array_type);
364         set_entity_ld_ident(bblock_id, cur_ident);
365         set_entity_variability(bblock_id, variability_initialized);
366
367         cur_ident      = IDENT("__FIRMPROF__BLOCK_COUNTS");
368         bblock_counts  = new_entity(gtp, cur_ident, array_type);
369         set_entity_ld_ident(bblock_counts, cur_ident);
370         set_entity_variability(bblock_counts, variability_initialized);
371
372         cur_ident      = IDENT("__FIRMPROF__FILE_NAME");
373         ent_filename   = new_entity(gtp, cur_ident, string_type);
374         set_entity_ld_ident(ent_filename, cur_ident);
375
376         if (flags & profile_with_locations) {
377                 loc_type       = new_type_struct(IDENT("__location"));
378                 loc_lineno     = new_entity(loc_type, IDENT("lineno"), uint_type);
379                 align_l        = get_type_alignment_bytes(uint_type);
380                 size           = get_type_size_bytes(uint_type);
381                 set_entity_offset(loc_lineno, 0);
382
383                 charptr_type   = new_type_pointer(IDENT("__charptr"), character_type, mode_P_data);
384                 align_n        = get_type_size_bytes(charptr_type);
385                 set_type_alignment_bytes(charptr_type, align_n);
386                 loc_name       = new_entity(loc_type, IDENT("name"), charptr_type);
387                 size           = (size + align_n - 1) & -align_n;
388                 set_entity_offset(loc_name, size);
389                 size          += align_n;
390
391                 if (align_n > align_l)
392                         align_l = align_n;
393                 size = (size + align_l - 1) & -align_l;
394                 set_type_size_bytes(loc_type, size);
395                 set_type_state(loc_type, layout_fixed);
396
397                 loc_type = new_type_array(IDENT("__locarray"), 1, loc_type);
398                 set_array_bounds_int(string_type, 0, 0, n_blocks);
399
400                 cur_ident      = IDENT("__FIRMPROF__LOCATIONS");
401                 ent_locations   = new_entity(gtp, cur_ident, loc_type);
402                 set_entity_ld_ident(ent_locations, cur_ident);
403         }
404
405         /* initialize count array */
406         NEW_ARR_A(tarval *, tarval_array, n_blocks);
407         tv = get_tarval_null(mode_Iu);
408         for (i = 0; i < n_blocks; ++i) {
409                 tarval_array[i] = tv;
410         }
411         set_array_entity_values(bblock_counts, tarval_array, n_blocks);
412
413         /* initialize function name string constant */
414         tarval_string = alloca(sizeof(*tarval_string) * (filename_len));
415         for (i = 0; i < filename_len; ++i) {
416                 tarval_string[i] = new_tarval_from_long(filename[i], mode_Bs);
417         }
418         set_entity_variability(ent_filename, variability_constant);
419         set_array_entity_values(ent_filename, tarval_string, filename_len);
420
421         /* initialize block id array and instrument blocks */
422         wd.array     = tarval_array;
423         wd.id        = 0;
424         wd.tp_char   = character_type;
425         wd.flags     = flags;
426         if (flags & profile_with_locations) {
427                 wd.fname_map = pmap_create();
428                 NEW_ARR_A(loc_entry, wd.locs, n_blocks);
429         }
430
431         for (n = get_irp_n_irgs() - 1; n >= 0; --n) {
432                 ir_graph      *irg = get_irp_irg(n);
433                 int            i;
434                 ir_node       *endbb = get_irg_end_block(irg);
435                 fix_env       env;
436
437                 set_current_ir_graph(irg);
438
439                 /* generate a symbolic constant pointing to the count array */
440                 sym.entity_p = bblock_counts;
441                 wd.symconst  = new_r_SymConst(irg, get_irg_start_block(irg), sym, symconst_addr_ent);
442
443                 irg_block_walk_graph(irg, block_id_walker, NULL, &wd);
444                 env.start_block = get_irg_start_block(irg);
445                 env.end_block   = get_irg_end_block(irg);
446                 set_irn_link(env.start_block, get_irg_no_mem(irg));
447                 irg_block_walk_graph(irg, fix_ssa, NULL, &env);
448                 for (i = get_Block_n_cfgpreds(endbb) - 1; i >= 0; --i) {
449                         ir_node *node = skip_Proj(get_Block_cfgpred(endbb, i));
450                         ir_node *bb   = get_Block_cfgpred_block(endbb, i);
451                         ir_node *sync;
452                         ir_node *ins[2];
453
454                         switch (get_irn_opcode(node)) {
455                         case iro_Return:
456                                 ins[0] = get_irn_link(bb);
457                                 ins[1] = get_Return_mem(node);
458                                 sync   = new_r_Sync(irg, bb, 2, ins);
459                                 set_Return_mem(node, sync);
460                                 break;
461                         case iro_Raise:
462                                 ins[0] = get_irn_link(bb);
463                                 ins[1] = get_Raise_mem(node);
464                                 sync   = new_r_Sync(irg, bb, 2, ins);
465                                 set_Raise_mem(node, sync);
466                                 break;
467                         default:
468                                 /* a fragile's op exception. There should be another path to End,
469                                    so ignore it */
470                                 assert(is_fragile_op(node) && "unexpected End control flow predecessor");
471                         }
472                 }
473         }
474         set_array_entity_values(bblock_id, tarval_array, n_blocks);
475
476         if (flags & profile_with_locations) {
477                 /* build the initializer for the locations */
478                 rem = current_ir_graph;
479                 current_ir_graph = get_const_code_irg();
480                 ent = get_array_element_entity(loc_type);
481                 set_entity_variability(ent_locations, variability_constant);
482                 for (i = 0; i < n_blocks; ++i) {
483                         compound_graph_path *path;
484                         tarval *tv;
485                         ir_node *n;
486
487                         /* lineno */
488                         path = new_compound_graph_path(loc_type, 2);
489                         set_compound_graph_path_array_index(path, 0, i);
490                         set_compound_graph_path_node(path, 0, ent);
491                         set_compound_graph_path_node(path, 1, loc_lineno);
492                         tv = new_tarval_from_long(wd.locs[i].lineno, mode_Iu);
493                         add_compound_ent_value_w_path(ent_locations, new_Const(mode_Iu, tv), path);
494
495                         /* name */
496                         path = new_compound_graph_path(loc_type, 2);
497                         set_compound_graph_path_array_index(path, 0, i);
498                         set_compound_graph_path_node(path, 0, ent);
499                         set_compound_graph_path_node(path, 1, loc_name);
500                         if (wd.locs[i].fname) {
501                                 sym.entity_p = wd.locs[i].fname;
502                                 n = new_SymConst(sym, symconst_addr_ent);
503                         } else {
504                                 n = new_Const(mode_P_data, get_mode_null(mode_P_data));
505                         }
506                         add_compound_ent_value_w_path(ent_locations, n, path);
507                 }
508                 pmap_destroy(wd.fname_map);
509         }
510         return gen_initializer_irg(ent_filename, bblock_id, bblock_counts, n_blocks);
511 }
512
513 static void
514 profile_node_info(void *ctx, FILE *f, const ir_node *irn)
515 {
516         if(is_Block(irn)) {
517                 fprintf(f, "profiled execution count: %u\n", be_profile_get_block_execcount(irn));
518         }
519 }
520
521 static void
522 register_vcg_hook(void)
523 {
524         memset(&hook, 0, sizeof(hook));
525         hook.hook._hook_node_info = profile_node_info;
526         register_hook(hook_node_info, &hook);
527 }
528
529 static void
530 unregister_vcg_hook(void)
531 {
532         unregister_hook(hook_node_info, &hook);
533 }
534
535 /**
536  * Reads the corresponding profile info file if it exists and returns a
537  * profile info struct
538  */
539 void
540 be_profile_read(const char *filename)
541 {
542         FILE   *f;
543         char    buf[8];
544         size_t  ret;
545
546         f = fopen(filename, "r");
547         if(f == NULL) {
548                 return;
549         }
550         printf("found profile data '%s'.\n", filename);
551
552         /* check magic */
553         ret = fread(buf, 8, 1, f);
554         if(ret == 0 || strncmp(buf, "firmprof", 8) != 0) {
555                 return;
556         }
557
558         if(profile) be_profile_free();
559         profile = new_set(cmp_execcount, 16);
560
561         do {
562                 execcount_t  query;
563                 ret = fread(&query, sizeof(unsigned int), 2, f);
564
565                 if(ret != 2) break;
566
567                 set_insert(profile, &query, sizeof(query), query.block);
568         } while(1);
569
570         fclose(f);
571         register_vcg_hook();
572 }
573
574 /**
575  * Frees the profile info
576  */
577 void
578 be_profile_free(void)
579 {
580         if(profile) {
581                 unregister_vcg_hook();
582                 del_set(profile);
583         }
584 }
585
586 /**
587  * Tells whether profile module has acquired data
588  */
589 int
590 be_profile_has_data(void)
591 {
592         return (profile != NULL);
593 }
594
595 /**
596  * Get block execution count as determined be profiling
597  */
598 unsigned int
599 be_profile_get_block_execcount(const ir_node *block)
600 {
601         execcount_t *ec, query;
602
603         if(!profile)
604                 return 1;
605
606         query.block = get_irn_node_nr(block);
607         ec = set_find(profile, &query, sizeof(query), get_irn_node_nr(block));
608
609         if(ec != NULL) {
610                 return ec->count;
611         } else {
612                 ir_fprintf(stderr, "Warning: Profile contains no data for %+F\n",
613                            block);
614                 return 1;
615         }
616 }
617
618 typedef struct _intialize_execfreq_env_t {
619         ir_graph *irg;
620         ir_exec_freq *execfreqs;
621         double freq_factor;
622 } initialize_execfreq_env_t;
623
624 // minimal execution frequency (an execfreq of 0 confuses algos)
625 static const double MIN_EXECFREQ = 0.00001;
626
627 static void initialize_execfreq(ir_node *block, void *data) {
628         initialize_execfreq_env_t *env = data;
629         double freq;
630
631         if(block == get_irg_start_block(env->irg)
632            || block == get_irg_end_block(env->irg)) {
633                 freq = 1.0;
634         } else {
635                 freq = be_profile_get_block_execcount(block);
636                 freq *= env->freq_factor;
637                 if(freq < MIN_EXECFREQ)
638                         freq = MIN_EXECFREQ;
639         }
640
641         set_execfreq(env->execfreqs, block, freq);
642 }
643
644 ir_exec_freq *be_create_execfreqs_from_profile(ir_graph *irg)
645 {
646         ir_node *block2 = NULL;
647         ir_node *start_block;
648         const ir_edge_t *edge;
649         initialize_execfreq_env_t env;
650         unsigned count;
651
652         env.irg = irg;
653         env.execfreqs = create_execfreq(irg);
654
655         // find the successor to the start block
656         start_block = get_irg_start_block(irg);
657         foreach_block_succ(start_block, edge) {
658                 ir_node *succ = get_edge_src_irn(edge);
659                 if(succ != start_block) {
660                         block2 = succ;
661                         break;
662                 }
663         }
664         assert(block2 != NULL);
665
666         count = be_profile_get_block_execcount(block2);
667         if(count == 0) {
668                 // the function was never executed, so fallback to estimated freqs
669                 free_execfreq(env.execfreqs);
670
671                 return compute_execfreq(irg, 10);
672         }
673
674         env.freq_factor = 1.0 / count;
675         irg_block_walk_graph(irg, initialize_execfreq, NULL, &env);
676
677         return env.execfreqs;
678 }