MCPcopy Create free account
hub / github.com/boostorg/build / stat_module

Function stat_module

src/engine/modules.cpp:198–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197
198static void stat_module( void * xmodule, void * data )
199{
200 module_t *m = (module_t *)xmodule;
201
202 if ( DEBUG_MEM || DEBUG_PROFILE )
203 {
204 struct hash * class_info = (struct hash *)data;
205 if ( m->class_module )
206 {
207 int found;
208 struct module_stats * ms = (struct module_stats *)hash_insert( class_info, m->class_module->name, &found );
209 if ( !found )
210 {
211 ms->module_name = m->class_module->name;
212 hashstats_init( ms->rules_stats );
213 hashstats_init( ms->variables_stats );
214 hashstats_init( ms->variable_indices_stats );
215 hashstats_init( ms->imported_modules_stats );
216 }
217
218 hashstats_add( ms->rules_stats, m->rules );
219 hashstats_add( ms->variables_stats, m->variables );
220 hashstats_add( ms->variable_indices_stats, m->variable_indices );
221 hashstats_add( ms->imported_modules_stats, m->imported_modules );
222 }
223 else
224 {
225 module_stat( m->rules, m->name, "rules" );
226 module_stat( m->variables, m->name, "variables" );
227 module_stat( m->variable_indices, m->name, "fixed variables" );
228 module_stat( m->imported_modules, m->name, "imported modules" );
229 }
230 }
231
232 delete_module( m );
233 object_free( m->name );
234}
235
236static void print_class_stats( void * xstats, void * data )
237{

Callers

nothing calls this directly

Calls 6

hash_insertFunction · 0.85
hashstats_initFunction · 0.85
hashstats_addFunction · 0.85
module_statFunction · 0.85
delete_moduleFunction · 0.85
object_freeFunction · 0.85

Tested by

no test coverage detected