Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* Compile this one with gcc. */ | 1 /* Compile this one with gcc. */ |
2 /* Copyright (C) 2009. Free Software Foundation, Inc. | 2 /* Copyright (C) 2009. Free Software Foundation, Inc. |
3 Contributed by Xinliang David Li (davidxl@google.com) and | 3 Contributed by Xinliang David Li (davidxl@google.com) and |
4 Raksit Ashok (raksit@google.com) | 4 Raksit Ashok (raksit@google.com) |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
9 the terms of the GNU General Public License as published by the Free | 9 the terms of the GNU General Public License as published by the Free |
10 Software Foundation; either version 3, or (at your option) any later | 10 Software Foundation; either version 3, or (at your option) any later |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 static void | 225 static void |
226 init_dyn_cgraph_node (struct dyn_cgraph_node *node, gcov_type guid) | 226 init_dyn_cgraph_node (struct dyn_cgraph_node *node, gcov_type guid) |
227 { | 227 { |
228 node->callees = 0; | 228 node->callees = 0; |
229 node->callers = 0; | 229 node->callers = 0; |
230 node->imported_modules = 0; | 230 node->imported_modules = 0; |
231 node->guid = guid; | 231 node->guid = guid; |
232 node->visited = 0; | 232 node->visited = 0; |
233 } | 233 } |
234 | 234 |
235 /* Return module_id. FUNC_GUID is the global unique id. */ | 235 /* Return module_id. FUNC_GUID is the global unique id. |
davidxl
2013/02/27 00:40:31
Add a comment here that the returned value is 1 ba
| |
236 This id is 1 based. 0 is the invalid id. */ | |
236 | 237 |
237 static inline gcov_unsigned_t | 238 static inline gcov_unsigned_t |
238 get_module_id_from_func_glob_uid (gcov_type func_guid) | 239 get_module_ident_from_func_glob_uid (gcov_type func_guid) |
davidxl
2013/02/27 00:40:31
get_module_ident_ ... is better.
| |
239 { | 240 { |
240 return EXTRACT_MODULE_ID_FROM_GLOBAL_ID (func_guid); | 241 return EXTRACT_MODULE_ID_FROM_GLOBAL_ID (func_guid); |
241 } | 242 } |
242 | 243 |
243 /* Return module_id for MODULE_INFO. */ | 244 /* Return module_id for MODULE_INFO. */ |
244 | 245 |
245 static inline gcov_unsigned_t | 246 static inline gcov_unsigned_t |
246 get_module_id_value (const struct gcov_info *module_info) | 247 get_module_ident (const struct gcov_info *module_info) |
davidxl
2013/02/27 00:40:31
get_module_ident is better.
| |
247 { | 248 { |
248 return module_info->mod_info->ident; | 249 return module_info->mod_info->ident; |
249 } | 250 } |
250 | 251 |
251 /* Return intra-module function id given function global unique id | 252 /* Return intra-module function id given function global unique id |
252 FUNC_GUID. */ | 253 FUNC_GUID. */ |
253 | 254 |
254 static inline gcov_unsigned_t | 255 static inline gcov_unsigned_t |
255 get_intra_module_func_id (gcov_type func_guid) | 256 get_intra_module_func_id (gcov_type func_guid) |
256 { | 257 { |
257 return EXTRACT_FUNC_ID_FROM_GLOBAL_ID (func_guid); | 258 return EXTRACT_FUNC_ID_FROM_GLOBAL_ID (func_guid); |
258 } | 259 } |
259 | 260 |
260 /* Return the pointer to the dynamic call graph node for FUNC_GUID. */ | 261 /* Return the pointer to the dynamic call graph node for FUNC_GUID. */ |
261 | 262 |
262 static inline struct dyn_cgraph_node * | 263 static inline struct dyn_cgraph_node * |
263 get_cgraph_node (gcov_type func_guid) | 264 get_cgraph_node (gcov_type func_guid) |
264 { | 265 { |
265 gcov_unsigned_t mod_idx, func_id; | 266 gcov_unsigned_t mod_idx, func_id; |
266 | 267 |
267 mod_idx = get_module_id_from_func_glob_uid (func_guid) - 1; | 268 mod_idx = get_module_ident_from_func_glob_uid (func_guid) - 1; |
268 | 269 |
269 /* This is to workaround: calls in __static_initialization_and_destruction | 270 /* This is to workaround: calls in __static_initialization_and_destruction |
270 should not be instrumented as the module id context for the callees have | 271 should not be instrumented as the module id context for the callees have |
271 not setup yet -- this leads to mod_idx == (unsigned) (0 - 1). Multithreaded | 272 not setup yet -- this leads to mod_idx == (unsigned) (0 - 1). Multithreaded |
272 programs may also produce insane func_guid in the profile counter. */ | 273 programs may also produce insane func_guid in the profile counter. */ |
273 if (mod_idx >= the_dyn_call_graph.num_modules) | 274 if (mod_idx >= the_dyn_call_graph.num_modules) |
274 return 0; | 275 return 0; |
275 | 276 |
276 func_id = get_intra_module_func_id (func_guid); | 277 func_id = get_intra_module_func_id (func_guid); |
277 if (func_id > the_dyn_call_graph.sup_modules[mod_idx].max_func_ident) | 278 if (func_id > the_dyn_call_graph.sup_modules[mod_idx].max_func_ident) |
278 return 0; | 279 return 0; |
279 | 280 |
280 return *(pointer_set_find_or_insert | 281 return *(pointer_set_find_or_insert |
281 (the_dyn_call_graph.call_graph_nodes[mod_idx], func_id)); | 282 (the_dyn_call_graph.call_graph_nodes[mod_idx], func_id)); |
282 } | 283 } |
283 | 284 |
284 static inline unsigned | 285 static inline unsigned |
285 imp_mod_get_key (const void *p) | 286 imp_mod_get_key (const void *p) |
286 { | 287 { |
287 return ((const struct dyn_imp_mod *) p)->imp_mod->mod_info->ident; | 288 return ((const struct dyn_imp_mod *) p)->imp_mod->mod_info->ident; |
288 } | 289 } |
289 | 290 |
290 static int | 291 static int |
291 imp_mod_set_insert (struct dyn_pointer_set *p, const struct gcov_info *imp_mod, | 292 imp_mod_set_insert (struct dyn_pointer_set *p, const struct gcov_info *imp_mod, |
292 double wt) | 293 double wt) |
293 { | 294 { |
294 struct dyn_imp_mod **m = (struct dyn_imp_mod **) | 295 struct dyn_imp_mod **m = (struct dyn_imp_mod **) |
295 pointer_set_find_or_insert (p, get_module_id_value (imp_mod)); | 296 pointer_set_find_or_insert (p, get_module_ident (imp_mod)); |
296 if (*m) | 297 if (*m) |
297 { | 298 { |
298 (*m)->weight += wt; | 299 (*m)->weight += wt; |
299 return 1; | 300 return 1; |
300 } | 301 } |
301 else | 302 else |
302 { | 303 { |
303 *m = XNEW (struct dyn_imp_mod); | 304 *m = XNEW (struct dyn_imp_mod); |
304 (*m)->imp_mod = imp_mod; | 305 (*m)->imp_mod = imp_mod; |
305 (*m)->weight = wt; | 306 (*m)->weight = wt; |
(...skipping 14 matching lines...) Expand all Loading... | |
320 | 321 |
321 static inline unsigned | 322 static inline unsigned |
322 cgraph_node_get_key (const void *p) | 323 cgraph_node_get_key (const void *p) |
323 { | 324 { |
324 return get_intra_module_func_id (((const struct dyn_cgraph_node *) p)->guid); | 325 return get_intra_module_func_id (((const struct dyn_cgraph_node *) p)->guid); |
325 } | 326 } |
326 | 327 |
327 static inline unsigned | 328 static inline unsigned |
328 gcov_info_get_key (const void *p) | 329 gcov_info_get_key (const void *p) |
329 { | 330 { |
330 return get_module_id_value ((const struct gcov_info *)p); | 331 return get_module_ident ((const struct gcov_info *)p); |
331 } | 332 } |
332 | 333 |
333 static struct dyn_pointer_set * | 334 static struct dyn_pointer_set * |
334 get_exported_to (unsigned module_ident) | 335 get_exported_to (unsigned module_ident) |
335 { | 336 { |
336 gcc_assert (module_ident != 0); | 337 gcc_assert (module_ident != 0); |
337 return the_dyn_call_graph.sup_modules[module_ident - 1].exported_to; | 338 return the_dyn_call_graph.sup_modules[module_ident - 1].exported_to; |
338 } | 339 } |
339 | 340 |
340 static struct dyn_pointer_set * | 341 static struct dyn_pointer_set * |
341 create_exported_to (unsigned module_ident) | 342 create_exported_to (unsigned module_ident) |
342 { | 343 { |
343 struct dyn_pointer_set *p; | 344 struct dyn_pointer_set *p; |
344 | 345 |
345 gcc_assert (module_ident != 0); | 346 gcc_assert (module_ident != 0); |
346 p = pointer_set_create (gcov_info_get_key); | 347 p = pointer_set_create (gcov_info_get_key); |
347 the_dyn_call_graph.sup_modules[module_ident - 1].exported_to = 0; | 348 the_dyn_call_graph.sup_modules[module_ident - 1].exported_to = p; |
348 return p; | 349 return p; |
349 } | 350 } |
350 | 351 |
351 static struct dyn_pointer_set * | 352 static struct dyn_pointer_set * |
352 get_imported_modus (unsigned module_ident) | 353 get_imported_modus (unsigned module_ident) |
353 { | 354 { |
354 struct dyn_pointer_set *p; | 355 struct dyn_pointer_set *p; |
355 struct gcov_info *gi_ptr; | 356 struct gcov_info *gi_ptr; |
356 | 357 |
357 gcc_assert (module_ident != 0); | 358 gcc_assert (module_ident != 0); |
(...skipping 22 matching lines...) Expand all Loading... | |
380 const char *env_str; | 381 const char *env_str; |
381 int do_dump = (do_cgraph_dump () != 0); | 382 int do_dump = (do_cgraph_dump () != 0); |
382 | 383 |
383 the_dyn_call_graph.call_graph_nodes = 0; | 384 the_dyn_call_graph.call_graph_nodes = 0; |
384 the_dyn_call_graph.modules = 0; | 385 the_dyn_call_graph.modules = 0; |
385 the_dyn_call_graph.num_nodes_executed = 0; | 386 the_dyn_call_graph.num_nodes_executed = 0; |
386 | 387 |
387 flag_alg_mode = __gcov_lipo_grouping_algorithm; | 388 flag_alg_mode = __gcov_lipo_grouping_algorithm; |
388 flag_modu_merge_edges = __gcov_lipo_merge_modu_edges; | 389 flag_modu_merge_edges = __gcov_lipo_merge_modu_edges; |
389 flag_strict_inclusion = __gcov_lipo_strict_inclusion; | 390 flag_strict_inclusion = __gcov_lipo_strict_inclusion; |
390 mem_threshold = __gcov_lipo_max_mem; | 391 mem_threshold = __gcov_lipo_max_mem * 1.25; |
391 | 392 |
392 gi_ptr = __gcov_list; | 393 gi_ptr = __gcov_list; |
393 | 394 |
394 for (; gi_ptr; gi_ptr = gi_ptr->next) | 395 for (; gi_ptr; gi_ptr = gi_ptr->next) |
395 num_modules++; | 396 num_modules++; |
396 | 397 |
397 the_dyn_call_graph.num_modules = num_modules; | 398 the_dyn_call_graph.num_modules = num_modules; |
398 | 399 |
399 the_dyn_call_graph.modules | 400 the_dyn_call_graph.modules |
400 = XNEWVEC (struct gcov_info *, num_modules); | 401 = XNEWVEC (struct gcov_info *, num_modules); |
(...skipping 27 matching lines...) Expand all Loading... | |
428 if (do_dump) | 429 if (do_dump) |
429 fprintf (stderr, "Group mem limit: %u KB \n", | 430 fprintf (stderr, "Group mem limit: %u KB \n", |
430 __gcov_lipo_max_mem); | 431 __gcov_lipo_max_mem); |
431 | 432 |
432 for (; gi_ptr; gi_ptr = gi_ptr->next) | 433 for (; gi_ptr; gi_ptr = gi_ptr->next) |
433 { | 434 { |
434 /* mod_idx is module_ident - 1. */ | 435 /* mod_idx is module_ident - 1. */ |
435 unsigned j, mod_id, mod_idx, max_func_ident = 0; | 436 unsigned j, mod_id, mod_idx, max_func_ident = 0; |
436 struct dyn_cgraph_node *node; | 437 struct dyn_cgraph_node *node; |
437 | 438 |
438 mod_id = get_module_id_value (gi_ptr); | 439 /* initialize flags field. */ |
440 gi_ptr->mod_info->flags = 0; | |
441 | |
442 mod_id = get_module_ident (gi_ptr); | |
439 if (do_dump) | 443 if (do_dump) |
440 fprintf (stderr, "Module %s %d uses %u KB memory in parsing\n", | 444 fprintf (stderr, "Module %s %d uses %u KB memory in parsing\n", |
441 gi_ptr->mod_info->source_filename, mod_id, | 445 gi_ptr->mod_info->source_filename, mod_id, |
442 gi_ptr->mod_info->ggc_memory); | 446 gi_ptr->mod_info->ggc_memory); |
443 | 447 |
444 if (mod_id == 0) | 448 if (mod_id == 0) |
445 { | 449 { |
446 fprintf (stderr, "Bad module_ident of 0. Skipping.\n"); | 450 fprintf (stderr, "Bad module_ident of 0. Skipping.\n"); |
447 continue; | 451 continue; |
448 } | 452 } |
449 mod_idx = mod_id - 1; | 453 mod_idx = mod_id - 1; |
450 | 454 |
451 the_dyn_call_graph.modules[mod_idx] = gi_ptr; | 455 the_dyn_call_graph.modules[mod_idx] = gi_ptr; |
452 | 456 |
453 the_dyn_call_graph.call_graph_nodes[mod_idx] | 457 the_dyn_call_graph.call_graph_nodes[mod_idx] |
454 = pointer_set_create (cgraph_node_get_key); | 458 = pointer_set_create (cgraph_node_get_key); |
455 | |
456 | 459 |
457 for (j = 0; j < gi_ptr->n_functions; j++) | 460 for (j = 0; j < gi_ptr->n_functions; j++) |
458 { | 461 { |
459 const struct gcov_fn_info *fi_ptr = gi_ptr->functions[j]; | 462 const struct gcov_fn_info *fi_ptr = gi_ptr->functions[j]; |
460 *(pointer_set_find_or_insert | 463 *(pointer_set_find_or_insert |
461 (the_dyn_call_graph.call_graph_nodes[mod_idx], fi_ptr->ident)) | 464 (the_dyn_call_graph.call_graph_nodes[mod_idx], fi_ptr->ident)) |
462 = node = XNEW (struct dyn_cgraph_node); | 465 = node = XNEW (struct dyn_cgraph_node); |
463 the_dyn_call_graph.call_graph_nodes[mod_idx]->n_elements++; | 466 the_dyn_call_graph.call_graph_nodes[mod_idx]->n_elements++; |
464 init_dyn_cgraph_node (node, GEN_FUNC_GLOBAL_ID (gi_ptr->mod_info->iden t, | 467 init_dyn_cgraph_node (node, GEN_FUNC_GLOBAL_ID (gi_ptr->mod_info->iden t, |
465 fi_ptr->ident)); | 468 fi_ptr->ident)); |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1097 sort_by_module_wt (const void *pa, const void *pb) | 1100 sort_by_module_wt (const void *pa, const void *pb) |
1098 { | 1101 { |
1099 const struct dyn_imp_mod *m_a = *((const struct dyn_imp_mod * const *) pa); | 1102 const struct dyn_imp_mod *m_a = *((const struct dyn_imp_mod * const *) pa); |
1100 const struct dyn_imp_mod *m_b = *((const struct dyn_imp_mod * const *) pb); | 1103 const struct dyn_imp_mod *m_b = *((const struct dyn_imp_mod * const *) pb); |
1101 | 1104 |
1102 /* We want to sort in descending order of weights. */ | 1105 /* We want to sort in descending order of weights. */ |
1103 if (m_a->weight < m_b->weight) | 1106 if (m_a->weight < m_b->weight) |
1104 return +1; | 1107 return +1; |
1105 if (m_a->weight > m_b->weight) | 1108 if (m_a->weight > m_b->weight) |
1106 return -1; | 1109 return -1; |
1107 return get_module_id_value (m_a->imp_mod) - get_module_id_value (m_b->imp_mod) ; | 1110 return get_module_ident (m_a->imp_mod) - get_module_ident (m_b->imp_mod); |
1108 } | 1111 } |
1109 | 1112 |
1110 /* Return a dynamic array of imported modules that is sorted for | 1113 /* Return a dynamic array of imported modules that is sorted for |
1111 the importing module MOD_INFO. The length of the array is returned | 1114 the importing module MOD_INFO. The length of the array is returned |
1112 in *LEN. */ | 1115 in *LEN. */ |
1113 | 1116 |
1114 const struct dyn_imp_mod ** | 1117 const struct dyn_imp_mod ** |
1115 gcov_get_sorted_import_module_array (struct gcov_info *mod_info, | 1118 gcov_get_sorted_import_module_array (struct gcov_info *mod_info, |
1116 unsigned *len) | 1119 unsigned *len) |
1117 { | 1120 { |
1118 unsigned mod_idx; | 1121 unsigned mod_idx; |
1119 struct dyn_module_info *sup_mod_info; | 1122 struct dyn_module_info *sup_mod_info; |
1120 unsigned array_len = 0; | 1123 unsigned array_len = 0; |
1121 struct gcov_import_mod_array imp_array; | 1124 struct gcov_import_mod_array imp_array; |
1122 | 1125 |
1123 mod_idx = get_module_id_value (mod_info) - 1; | 1126 mod_idx = get_module_ident (mod_info) - 1; |
1124 sup_mod_info = &the_dyn_call_graph.sup_modules[mod_idx]; | 1127 sup_mod_info = &the_dyn_call_graph.sup_modules[mod_idx]; |
1125 | 1128 |
1126 if (sup_mod_info->imported_modules == 0) | 1129 if (sup_mod_info->imported_modules == 0) |
1127 return 0; | 1130 return 0; |
1128 | 1131 |
1129 pointer_set_traverse (sup_mod_info->imported_modules, | 1132 pointer_set_traverse (sup_mod_info->imported_modules, |
1130 gcov_compute_mset_size, &array_len, 0, 0); | 1133 gcov_compute_mset_size, &array_len, 0, 0); |
1131 imp_array.imported_modules = XNEWVEC (const struct dyn_imp_mod *, array_len); | 1134 imp_array.imported_modules = XNEWVEC (const struct dyn_imp_mod *, array_len); |
1132 imp_array.len = 0; | 1135 imp_array.len = 0; |
1133 imp_array.importing_module = mod_info; | 1136 imp_array.importing_module = mod_info; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1202 node->sum_in_count = 0; | 1205 node->sum_in_count = 0; |
1203 | 1206 |
1204 callers = node->callers; | 1207 callers = node->callers; |
1205 while (callers) | 1208 while (callers) |
1206 { | 1209 { |
1207 node->sum_in_count += callers->count; | 1210 node->sum_in_count += callers->count; |
1208 callers = callers->next_caller; | 1211 callers = callers->next_caller; |
1209 } | 1212 } |
1210 | 1213 |
1211 callees = node->callees; | 1214 callees = node->callees; |
1212 mod_id = get_module_id_from_func_glob_uid (node->guid) - 1; | 1215 mod_id = get_module_ident_from_func_glob_uid (node->guid); |
davidxl
2013/02/27 00:40:31
Change var name from mod_id to mod_idx
xur
2013/02/27 00:57:05
Send the wrong patch.
Actually. This should be
mod
| |
1213 | 1216 |
1214 while (callees) | 1217 while (callees) |
1215 { | 1218 { |
1216 if (!callees->callee->visited) | 1219 if (!callees->callee->visited) |
1217 gcov_process_cgraph_node (callees->callee, | 1220 gcov_process_cgraph_node (callees->callee, |
1218 cutoff_count, | 1221 cutoff_count, |
1219 import_scale); | 1222 import_scale); |
1220 callees = callees->next_callee; | 1223 callees = callees->next_callee; |
1221 } | 1224 } |
1222 | 1225 |
1223 callees = node->callees; | 1226 callees = node->callees; |
1224 while (callees) | 1227 while (callees) |
1225 { | 1228 { |
1226 if (callees->count >= cutoff_count) | 1229 if (callees->count >= cutoff_count) |
1227 { | 1230 { |
1228 unsigned callee_mod_id; | 1231 unsigned callee_mod_id; |
1229 struct dyn_pointer_set *imp_modules | 1232 struct dyn_pointer_set *imp_modules |
1230 = gcov_get_imp_module_set (node); | 1233 = gcov_get_imp_module_set (node); |
1231 | 1234 |
1232 callee_mod_id | 1235 callee_mod_id |
davidxl
2013/02/27 00:40:31
--> callee_mod_idx
xur
2013/02/27 00:57:05
Same as above. -1 should be removed.
On 2013/02/2
| |
1233 = get_module_id_from_func_glob_uid (callees->callee->guid) - 1; | 1236 = get_module_ident_from_func_glob_uid (callees->callee->guid); |
1234 | 1237 |
1235 double callee_mod_wt = (double) callees->count; | 1238 double callee_mod_wt = (double) callees->count; |
1236 if (callees->callee->imported_modules) | 1239 if (callees->callee->imported_modules) |
1237 { | 1240 { |
1238 double scale = ((double) callees->count) / | 1241 double scale = ((double) callees->count) / |
1239 ((double) callees->callee->sum_in_count); | 1242 ((double) callees->callee->sum_in_count); |
1240 /* Reduce weight if callee is in different module. */ | 1243 /* Reduce weight if callee is in different module. */ |
1241 if (mod_id != callee_mod_id) | 1244 if (mod_id != callee_mod_id) |
1242 scale = (scale * import_scale) / 100.0; | 1245 scale = (scale * import_scale) / 100.0; |
1243 pointer_set_traverse (callees->callee->imported_modules, | 1246 pointer_set_traverse (callees->callee->imported_modules, |
1244 gcov_propagate_imp_modules, | 1247 gcov_propagate_imp_modules, |
1245 imp_modules, &scale, &callee_mod_wt); | 1248 imp_modules, &scale, &callee_mod_wt); |
1246 } | 1249 } |
1247 if (mod_id != callee_mod_id) | 1250 if (mod_id != callee_mod_id) |
1248 { | 1251 { |
1249 struct gcov_info *callee_mod_info | 1252 struct gcov_info *callee_mod_info |
1250 = get_module_info (callee_mod_id); | 1253 = get_module_info (callee_mod_id); |
davidxl
2013/02/27 00:40:31
Should be get_module_info (callee_mod_idx + 1).
Y
xur
2013/02/27 00:57:05
This is ok.
On 2013/02/27 00:40:31, davidxl wrote
| |
1251 imp_mod_set_insert (imp_modules, callee_mod_info, callee_mod_wt); | 1254 imp_mod_set_insert (imp_modules, callee_mod_info, callee_mod_wt); |
1252 } | 1255 } |
1253 } | 1256 } |
1254 | 1257 |
1255 callees = callees->next_callee; | 1258 callees = callees->next_callee; |
1256 } | 1259 } |
1257 } | 1260 } |
1258 | 1261 |
1259 static void gcov_compute_module_groups_eager_propagation (gcov_type); | 1262 static void gcov_compute_module_groups_eager_propagation (gcov_type); |
1260 static void gcov_compute_module_groups_inclusion_based_with_priority | 1263 static void gcov_compute_module_groups_inclusion_based_with_priority |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1595 e->next_caller = callee_mnode->callers; | 1598 e->next_caller = callee_mnode->callers; |
1596 mnode->callees = e; | 1599 mnode->callees = e; |
1597 callee_mnode->callers = e; | 1600 callee_mnode->callers = e; |
1598 e->visited = 0; | 1601 e->visited = 0; |
1599 } | 1602 } |
1600 | 1603 |
1601 static void | 1604 static void |
1602 modu_graph_process_dyn_cgraph_node (struct dyn_cgraph_node *node, | 1605 modu_graph_process_dyn_cgraph_node (struct dyn_cgraph_node *node, |
1603 gcov_type cutoff_count) | 1606 gcov_type cutoff_count) |
1604 { | 1607 { |
1605 unsigned m_id = get_module_id_from_func_glob_uid (node->guid); | 1608 unsigned m_id = get_module_ident_from_func_glob_uid (node->guid); |
1606 struct dyn_cgraph_edge *callees; | 1609 struct dyn_cgraph_edge *callees; |
1607 struct dyn_cgraph_node *callee; | 1610 struct dyn_cgraph_node *callee; |
1608 | 1611 |
1609 callees = node->callees; | 1612 callees = node->callees; |
1610 while (callees != 0) | 1613 while (callees != 0) |
1611 { | 1614 { |
1612 callee = callees->callee; | 1615 callee = callees->callee; |
1613 unsigned callee_m_id =· | 1616 unsigned callee_m_id =· |
1614 get_module_id_from_func_glob_uid (callee->guid); | 1617 get_module_ident_from_func_glob_uid (callee->guid); |
1615 if (callee_m_id != m_id) | 1618 if (callee_m_id != m_id) |
1616 { | 1619 { |
1617 if (callees->count >= cutoff_count) | 1620 if (callees->count >= cutoff_count) |
1618 modu_graph_add_edge (m_id, callee_m_id, callees->count); | 1621 modu_graph_add_edge (m_id, callee_m_id, callees->count); |
1619 } | 1622 } |
1620 callees = callees->next_callee; | 1623 callees = callees->next_callee; |
1621 } | 1624 } |
1622 } | 1625 } |
1623 | 1626 |
1624 static void | 1627 static void |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1662 Result is stored in DATA2. */ | 1665 Result is stored in DATA2. */ |
1663 | 1666 |
1664 static int | 1667 static int |
1665 collect_ggc_mem_size (const void *value, | 1668 collect_ggc_mem_size (const void *value, |
1666 void *data1, | 1669 void *data1, |
1667 void *data2, | 1670 void *data2, |
1668 void *data3 ATTRIBUTE_UNUSED) | 1671 void *data3 ATTRIBUTE_UNUSED) |
1669 { | 1672 { |
1670 const struct dyn_imp_mod *g = (const struct dyn_imp_mod *) value; | 1673 const struct dyn_imp_mod *g = (const struct dyn_imp_mod *) value; |
1671 struct dyn_pointer_set *s = (struct dyn_pointer_set *) data1; | 1674 struct dyn_pointer_set *s = (struct dyn_pointer_set *) data1; |
1672 unsigned mod_id = get_module_id_value (g->imp_mod); | 1675 unsigned mod_id = get_module_ident (g->imp_mod); |
1673 gcov_unsigned_t *size = (gcov_unsigned_t *) data2; | 1676 gcov_unsigned_t *size = (gcov_unsigned_t *) data2; |
1674 | 1677 |
1675 if (s && pointer_set_contains (s, mod_id)) | 1678 if (s && pointer_set_contains (s, mod_id)) |
1676 return 1; | 1679 return 1; |
1677 | 1680 |
1678 (*size) += g->imp_mod->mod_info->ggc_memory; | 1681 (*size) += g->imp_mod->mod_info->ggc_memory; |
1679 | 1682 |
1680 return 1; | 1683 return 1; |
1681 | 1684 |
1682 } | 1685 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1715 modu_add_auxiliary_1 (const void *value, | 1718 modu_add_auxiliary_1 (const void *value, |
1716 void *data1, | 1719 void *data1, |
1717 void *data2, | 1720 void *data2, |
1718 void *data3 ATTRIBUTE_UNUSED) | 1721 void *data3 ATTRIBUTE_UNUSED) |
1719 { | 1722 { |
1720 const struct dyn_imp_mod *src = (const struct dyn_imp_mod *) value; | 1723 const struct dyn_imp_mod *src = (const struct dyn_imp_mod *) value; |
1721 const struct gcov_info *src_modu = src->imp_mod; | 1724 const struct gcov_info *src_modu = src->imp_mod; |
1722 unsigned t_m_id = *(unsigned *) data1; | 1725 unsigned t_m_id = *(unsigned *) data1; |
1723 struct dyn_pointer_set *t_imported_mods = get_imported_modus (t_m_id); | 1726 struct dyn_pointer_set *t_imported_mods = get_imported_modus (t_m_id); |
1724 double wt = (double) *(gcov_type*)data2; | 1727 double wt = (double) *(gcov_type*)data2; |
1725 unsigned s_m_id = get_module_id_value (src_modu); | 1728 unsigned s_m_id = get_module_ident (src_modu); |
1726 struct gcov_info **gp; | 1729 struct gcov_info **gp; |
1727 struct dyn_pointer_set *s_exported_to; | 1730 struct dyn_pointer_set *s_exported_to; |
1728 int already_have = 0; | 1731 int already_have = 0; |
1729 | 1732 |
1730 if (pointer_set_contains (t_imported_mods, s_m_id)) | 1733 if (pointer_set_contains (t_imported_mods, s_m_id)) |
1731 already_have = 1; | 1734 already_have = 1; |
1732 | 1735 |
1733 /* Insert even it's already there. This is to update the wt. */ | 1736 /* Insert even it's already there. This is to update the wt. */ |
1734 imp_mod_set_insert (t_imported_mods, src_modu, wt); | 1737 imp_mod_set_insert (t_imported_mods, src_modu, wt); |
1735 | 1738 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1770 | 1773 |
1771 static int | 1774 static int |
1772 ps_check_ggc_mem (const void *value, | 1775 ps_check_ggc_mem (const void *value, |
1773 void *data1, | 1776 void *data1, |
1774 void *data2, | 1777 void *data2, |
1775 void *data3 ATTRIBUTE_UNUSED) | 1778 void *data3 ATTRIBUTE_UNUSED) |
1776 { | 1779 { |
1777 const struct gcov_info *modu = (const struct gcov_info *) value; | 1780 const struct gcov_info *modu = (const struct gcov_info *) value; |
1778 unsigned s_m_id = *(unsigned *) data1; | 1781 unsigned s_m_id = *(unsigned *) data1; |
1779 unsigned *fail = (unsigned *) data2; | 1782 unsigned *fail = (unsigned *) data2; |
1780 unsigned m_id = get_module_id_value (modu); | 1783 unsigned m_id = get_module_ident (modu); |
1781 gcov_unsigned_t new_ggc_size; | 1784 gcov_unsigned_t new_ggc_size; |
1782 | 1785 |
1783 new_ggc_size = modu_union_ggc_size (m_id, s_m_id); | 1786 new_ggc_size = modu_union_ggc_size (m_id, s_m_id); |
1784 if (new_ggc_size > mem_threshold) | 1787 if (new_ggc_size > mem_threshold) |
1785 { | 1788 { |
1786 (*fail) = 1; | 1789 (*fail) = 1; |
1787 return 0; | 1790 return 0; |
1788 } | 1791 } |
1789 | 1792 |
1790 return 1; | 1793 return 1; |
1791 } | 1794 } |
1792 | 1795 |
1793 /* Add module specified by DATA1 and it's imported list to | 1796 /* Add module specified by DATA1 and it's imported list to |
1794 the grouping specified by VALUE. */ | 1797 the grouping specified by VALUE. */ |
1795 | 1798 |
1796 static int | 1799 static int |
1797 ps_add_auxiliary (const void *value, | 1800 ps_add_auxiliary (const void *value, |
1798 void *data1, | 1801 void *data1, |
1799 void *data2, | 1802 void *data2, |
1800 void *data3 ATTRIBUTE_UNUSED) | 1803 void *data3 ATTRIBUTE_UNUSED) |
1801 { | 1804 { |
1802 const struct gcov_info *modu = (const struct gcov_info *) value; | 1805 const struct gcov_info *modu = (const struct gcov_info *) value; |
1803 unsigned s_m_id = *(unsigned *) data1; | 1806 unsigned s_m_id = *(unsigned *) data1; |
1804 unsigned m_id = get_module_id_value (modu); | 1807 unsigned m_id = get_module_ident (modu); |
1805 int not_safe_to_insert = *(int *) data2; | 1808 int not_safe_to_insert = *(int *) data2; |
1806 gcov_unsigned_t new_ggc_size; | 1809 gcov_unsigned_t new_ggc_size; |
1807 | 1810 |
1808 /* For strict incluesion, we know it's safe to insert. */ | 1811 /* For strict incluesion, we know it's safe to insert. */ |
1809 if (!not_safe_to_insert) | 1812 if (!not_safe_to_insert) |
1810 { | 1813 { |
1811 modu_add_auxiliary (m_id, s_m_id, *(gcov_type*)data2); | 1814 modu_add_auxiliary (m_id, s_m_id, *(gcov_type*)data2); |
1812 return 1; | 1815 return 1; |
1813 } | 1816 } |
1814 | 1817 |
(...skipping 18 matching lines...) Expand all Loading... | |
1833 gcov_unsigned_t new_ggc_size; | 1836 gcov_unsigned_t new_ggc_size; |
1834 struct dyn_pointer_set *node_imported_mods; | 1837 struct dyn_pointer_set *node_imported_mods; |
1835 struct dyn_pointer_set *node_exported_to; | 1838 struct dyn_pointer_set *node_exported_to; |
1836 unsigned m_id, callee_m_id; | 1839 unsigned m_id, callee_m_id; |
1837 int fail = 0; | 1840 int fail = 0; |
1838 | 1841 |
1839 node = edge->caller; | 1842 node = edge->caller; |
1840 callee = edge->callee; | 1843 callee = edge->callee; |
1841 node_modu = node->module; | 1844 node_modu = node->module; |
1842 callee_modu = callee->module; | 1845 callee_modu = callee->module; |
1843 m_id = get_module_id_value (node_modu); | 1846 m_id = get_module_ident (node_modu); |
1844 | 1847 |
1845 if (m_id == 0) | 1848 if (m_id == 0) |
1846 return 0; | 1849 return 0; |
1847 | 1850 |
1848 group_ggc_mem = the_dyn_call_graph.sup_modules[m_id-1].group_ggc_mem; | 1851 group_ggc_mem = the_dyn_call_graph.sup_modules[m_id-1].group_ggc_mem; |
1849 | 1852 |
1850 if (group_ggc_mem >= mem_threshold) | 1853 if (group_ggc_mem >= mem_threshold) |
1851 return 0; | 1854 return 0; |
1852 | 1855 |
1853 node_imported_mods = get_imported_modus (m_id); | 1856 node_imported_mods = get_imported_modus (m_id); |
1854 | 1857 |
1855 /* Check if the callee is already included. */ | 1858 /* Check if the callee is already included. */ |
1856 callee_m_id = get_module_id_value (callee_modu); | 1859 callee_m_id = get_module_ident (callee_modu); |
1857 if (pointer_set_contains (node_imported_mods, callee_m_id)) | 1860 if (pointer_set_contains (node_imported_mods, callee_m_id)) |
1858 return 0; | 1861 return 0; |
1859 | 1862 |
1860 new_ggc_size = modu_union_ggc_size (m_id, callee_m_id); | 1863 new_ggc_size = modu_union_ggc_size (m_id, callee_m_id); |
1861 if (new_ggc_size > mem_threshold) | 1864 if (new_ggc_size > mem_threshold) |
1862 return 0; | 1865 return 0; |
1863 | 1866 |
1864 /* check the size for the grouping that includes this node. */ | 1867 /* check the size for the grouping that includes this node. */ |
1865 node_exported_to = get_exported_to (m_id); | 1868 node_exported_to = get_exported_to (m_id); |
1866 if (node_exported_to) | 1869 if (node_exported_to) |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1987 struct dyn_pointer_set *imp_modules; | 1990 struct dyn_pointer_set *imp_modules; |
1988 | 1991 |
1989 fi_ptr = gi_ptr->functions[f_ix]; | 1992 fi_ptr = gi_ptr->functions[f_ix]; |
1990 node = *(pointer_set_find_or_insert | 1993 node = *(pointer_set_find_or_insert |
1991 (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident)); | 1994 (the_dyn_call_graph.call_graph_nodes[m_ix], fi_ptr->ident)); |
1992 gcc_assert (node); | 1995 gcc_assert (node); |
1993 | 1996 |
1994 if (!node->imported_modules) | 1997 if (!node->imported_modules) |
1995 continue; | 1998 continue; |
1996 | 1999 |
1997 mod_id = get_module_id_from_func_glob_uid (node->guid); | 2000 mod_id = get_module_ident_from_func_glob_uid (node->guid); |
1998 gcc_assert (mod_id == (m_ix + 1)); | 2001 gcc_assert (mod_id == (m_ix + 1)); |
1999 | 2002 |
2000 imp_modules | 2003 imp_modules |
2001 = gcov_get_module_imp_module_set ( | 2004 = gcov_get_module_imp_module_set ( |
2002 &the_dyn_call_graph.sup_modules[mod_id - 1]); | 2005 &the_dyn_call_graph.sup_modules[mod_id - 1]); |
2003 | 2006 |
2004 pointer_set_traverse (node->imported_modules, | 2007 pointer_set_traverse (node->imported_modules, |
2005 gcov_propagate_imp_modules, | 2008 gcov_propagate_imp_modules, |
2006 imp_modules, 0, 0); | 2009 imp_modules, 0, 0); |
2007 } | 2010 } |
2008 } | 2011 } |
2009 | 2012 |
2010 /* Now compute the export attribute */ | 2013 /* Now compute the export attribute */ |
2011 for (m_ix = 0; m_ix < the_dyn_call_graph.num_modules; m_ix++) | 2014 for (m_ix = 0; m_ix < the_dyn_call_graph.num_modules; m_ix++) |
2012 { | 2015 { |
2013 struct dyn_module_info *mi | 2016 struct dyn_module_info *mi |
2014 = &the_dyn_call_graph.sup_modules[m_ix]; | 2017 = &the_dyn_call_graph.sup_modules[m_ix]; |
2015 | |
2016 /* initialize flags field. */ | |
2017 gi_ptr = the_dyn_call_graph.modules[m_ix]; | |
2018 gi_ptr->mod_info->flags = 0; | |
2019 | 2018 |
2020 if (mi->imported_modules) | 2019 if (mi->imported_modules) |
2021 pointer_set_traverse (mi->imported_modules, | 2020 pointer_set_traverse (mi->imported_modules, |
2022 gcov_mark_export_modules, 0, 0, 0); | 2021 gcov_mark_export_modules, 0, 0, 0); |
2023 } | 2022 } |
2024 } | 2023 } |
2025 | 2024 |
2026 /* For each module, compute at random, the group of imported modules, | 2025 /* For each module, compute at random, the group of imported modules, |
2027 that is of size at most MAX_GROUP_SIZE. */ | 2026 that is of size at most MAX_GROUP_SIZE. */ |
2028 | 2027 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2214 gcov_dump_callgraph (cut_off_count); | 2213 gcov_dump_callgraph (cut_off_count); |
2215 | 2214 |
2216 } | 2215 } |
2217 | 2216 |
2218 /* Dumper function for NODE. */ | 2217 /* Dumper function for NODE. */ |
2219 static void | 2218 static void |
2220 gcov_dump_cgraph_node_short (struct dyn_cgraph_node *node) | 2219 gcov_dump_cgraph_node_short (struct dyn_cgraph_node *node) |
2221 { | 2220 { |
2222 unsigned mod_id, func_id; | 2221 unsigned mod_id, func_id; |
2223 struct gcov_info *mod_info; | 2222 struct gcov_info *mod_info; |
2224 mod_id = get_module_id_from_func_glob_uid (node->guid); | 2223 mod_id = get_module_ident_from_func_glob_uid (node->guid); |
2225 func_id = get_intra_module_func_id (node->guid); | 2224 func_id = get_intra_module_func_id (node->guid); |
2226 | 2225 |
2227 mod_info = the_dyn_call_graph.modules[mod_id - 1]; | 2226 mod_info = the_dyn_call_graph.modules[mod_id - 1]; |
2228 | 2227 |
2229 fprintf (stderr, "NODE(%llx) module(%s) func(%u)", | 2228 fprintf (stderr, "NODE(%llx) module(%s) func(%u)", |
2230 (long long)node->guid, | 2229 (long long)node->guid, |
2231 mod_info->mod_info->source_filename, func_id); | 2230 mod_info->mod_info->source_filename, func_id); |
2232 } | 2231 } |
2233 | 2232 |
2234 /* Dumper function for NODE. M is the module id and F is the function id. */ | 2233 /* Dumper function for NODE. M is the module id and F is the function id. */ |
davidxl
2013/02/27 00:40:31
M is module ident - 1
| |
2235 | 2234 |
2236 static void | 2235 static void |
2237 gcov_dump_cgraph_node (struct dyn_cgraph_node *node, unsigned m, unsigned f) | 2236 gcov_dump_cgraph_node (struct dyn_cgraph_node *node, unsigned m, unsigned f) |
2238 { | 2237 { |
2239 unsigned mod_id, func_id; | 2238 unsigned mod_id, func_id; |
2240 struct gcov_info *mod_info; | 2239 struct gcov_info *mod_info; |
2241 struct dyn_cgraph_edge *callers; | 2240 struct dyn_cgraph_edge *callers; |
2242 struct dyn_cgraph_edge *callees; | 2241 struct dyn_cgraph_edge *callees; |
2243 | 2242 |
2244 mod_id = get_module_id_from_func_glob_uid (node->guid); | 2243 mod_id = get_module_ident_from_func_glob_uid (node->guid); |
2245 func_id = get_intra_module_func_id (node->guid); | 2244 func_id = get_intra_module_func_id (node->guid); |
2246 gcc_assert (mod_id == (m + 1) && func_id == f); | 2245 gcc_assert (mod_id == (m + 1) && func_id == f); |
2247 | 2246 |
2248 mod_info = the_dyn_call_graph.modules[mod_id - 1]; | 2247 mod_info = the_dyn_call_graph.modules[mod_id - 1]; |
2249 | 2248 |
2250 fprintf (stderr, "NODE(%llx) module(%s) func(%x)\n", | 2249 fprintf (stderr, "NODE(%llx) module(%s) func(%x)\n", |
2251 (long long) node->guid, | 2250 (long long) node->guid, |
2252 mod_info->mod_info->source_filename, f); | 2251 mod_info->mod_info->source_filename, f); |
2253 | 2252 |
2254 /* Now dump callers. */ | 2253 /* Now dump callers. */ |
(...skipping 11 matching lines...) Expand all Loading... | |
2266 fprintf (stderr, "\t[CALLEES]\n"); | 2265 fprintf (stderr, "\t[CALLEES]\n"); |
2267 while (callees != 0) | 2266 while (callees != 0) |
2268 { | 2267 { |
2269 fprintf (stderr,"\t\t[count=%ld] ", (long) callees->count); | 2268 fprintf (stderr,"\t\t[count=%ld] ", (long) callees->count); |
2270 gcov_dump_cgraph_node_short (callees->callee); | 2269 gcov_dump_cgraph_node_short (callees->callee); |
2271 fprintf (stderr,"\n"); | 2270 fprintf (stderr,"\n"); |
2272 callees = callees->next_callee; | 2271 callees = callees->next_callee; |
2273 } | 2272 } |
2274 } | 2273 } |
2275 | 2274 |
2276 /* Dumper function for NODE. M is the module id and F is the function id. */ | 2275 /* Dumper function for NODE. M is the module_ident -1 |
davidxl
2013/02/27 00:40:31
M is module_ident -1
xur
2013/02/27 00:57:05
Done.
| |
2276 and F is the function id. */ | |
2277 | 2277 |
2278 static void | 2278 static void |
2279 gcov_dump_cgraph_node_dot (struct dyn_cgraph_node *node, | 2279 gcov_dump_cgraph_node_dot (struct dyn_cgraph_node *node, |
2280 unsigned m, unsigned f, | 2280 unsigned m, unsigned f, |
2281 gcov_type cutoff_count) | 2281 gcov_type cutoff_count) |
2282 { | 2282 { |
2283 unsigned mod_id, func_id, imp_len = 0, i; | 2283 unsigned mod_id, func_id, imp_len = 0, i; |
2284 struct gcov_info *mod_info; | 2284 struct gcov_info *mod_info; |
2285 const struct dyn_imp_mod **imp_mods; | 2285 const struct dyn_imp_mod **imp_mods; |
2286 struct dyn_cgraph_edge *callees; | 2286 struct dyn_cgraph_edge *callees; |
2287 | 2287 |
2288 mod_id = get_module_id_from_func_glob_uid (node->guid); | 2288 mod_id = get_module_ident_from_func_glob_uid (node->guid); |
2289 func_id = get_intra_module_func_id (node->guid); | 2289 func_id = get_intra_module_func_id (node->guid); |
2290 gcc_assert (mod_id == (m + 1) && func_id == f); | 2290 gcc_assert (mod_id == (m + 1) && func_id == f); |
2291 | 2291 |
2292 mod_info = the_dyn_call_graph.modules[mod_id - 1]; | 2292 mod_info = the_dyn_call_graph.modules[mod_id - 1]; |
2293 | 2293 |
2294 fprintf (stderr, "NODE_%llx[label=\"MODULE\\n(%s)\\n FUNC(%x)\\n", | 2294 fprintf (stderr, "NODE_%llx[label=\"MODULE\\n(%s)\\n FUNC(%x)\\n", |
2295 (long long) node->guid, mod_info->mod_info->source_filename, f); | 2295 (long long) node->guid, mod_info->mod_info->source_filename, f); |
2296 | 2296 |
2297 imp_mods = gcov_get_sorted_import_module_array (mod_info, &imp_len); | 2297 imp_mods = gcov_get_sorted_import_module_array (mod_info, &imp_len); |
2298 fprintf (stderr, "IMPORTS:\\n"); | 2298 fprintf (stderr, "IMPORTS:\\n"); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2368 fprintf (stderr,"}\n"); | 2368 fprintf (stderr,"}\n"); |
2369 } | 2369 } |
2370 | 2370 |
2371 static int | 2371 static int |
2372 dump_imported_modules_1 (const void *value, | 2372 dump_imported_modules_1 (const void *value, |
2373 void *data1 ATTRIBUTE_UNUSED, | 2373 void *data1 ATTRIBUTE_UNUSED, |
2374 void *data2 ATTRIBUTE_UNUSED, | 2374 void *data2 ATTRIBUTE_UNUSED, |
2375 void *data3 ATTRIBUTE_UNUSED) | 2375 void *data3 ATTRIBUTE_UNUSED) |
2376 { | 2376 { |
2377 const struct dyn_imp_mod *d = (const struct dyn_imp_mod*) value; | 2377 const struct dyn_imp_mod *d = (const struct dyn_imp_mod*) value; |
2378 fprintf (stderr, "%d ", get_module_id_value (d->imp_mod)); | 2378 fprintf (stderr, "%d ", get_module_ident (d->imp_mod)); |
2379 return 1; | 2379 return 1; |
2380 } | 2380 } |
2381 | 2381 |
2382 static int | 2382 static int |
2383 dump_exported_to_1 (const void *value, | 2383 dump_exported_to_1 (const void *value, |
2384 void *data1 ATTRIBUTE_UNUSED, | 2384 void *data1 ATTRIBUTE_UNUSED, |
2385 void *data2 ATTRIBUTE_UNUSED, | 2385 void *data2 ATTRIBUTE_UNUSED, |
2386 void *data3 ATTRIBUTE_UNUSED) | 2386 void *data3 ATTRIBUTE_UNUSED) |
2387 { | 2387 { |
2388 const struct gcov_info *modu = (const struct gcov_info *) value; | 2388 const struct gcov_info *modu = (const struct gcov_info *) value; |
2389 fprintf (stderr, "%d ", get_module_id_value (modu)); | 2389 fprintf (stderr, "%d ", get_module_ident (modu)); |
2390 return 1; | 2390 return 1; |
2391 } | 2391 } |
2392 | 2392 |
2393 static void | 2393 static void |
2394 debug_dump_imported_modules (const struct dyn_pointer_set *p) | 2394 debug_dump_imported_modules (const struct dyn_pointer_set *p) |
2395 { | 2395 { |
2396 fprintf (stderr, "imported: "); | 2396 fprintf (stderr, "imported: "); |
2397 pointer_set_traverse (p, dump_imported_modules_1, 0, 0, 0); | 2397 pointer_set_traverse (p, dump_imported_modules_1, 0, 0, 0); |
2398 fprintf (stderr, "\n"); | 2398 fprintf (stderr, "\n"); |
2399 } | 2399 } |
2400 | 2400 |
2401 static void | 2401 static void |
2402 debug_dump_exported_to (const struct dyn_pointer_set *p) | 2402 debug_dump_exported_to (const struct dyn_pointer_set *p) |
2403 { | 2403 { |
2404 fprintf (stderr, "exported: "); | 2404 fprintf (stderr, "exported: "); |
2405 pointer_set_traverse (p, dump_exported_to_1, 0, 0, 0); | 2405 pointer_set_traverse (p, dump_exported_to_1, 0, 0, 0); |
2406 fprintf (stderr, "\n"); | 2406 fprintf (stderr, "\n"); |
2407 } | 2407 } |
2408 #endif | 2408 #endif |
LEFT | RIGHT |