symbol.c (6a2ffcddad22ead7ce75c5773e87895b91e7cca7) | symbol.c (facf3f0621b2e11957af1aae9085730ea78ccf85) |
---|---|
1#include <dirent.h> 2#include <errno.h> 3#include <stdlib.h> 4#include <stdio.h> 5#include <string.h> 6#include <sys/types.h> 7#include <sys/stat.h> 8#include <sys/param.h> --- 645 unchanged lines hidden (view full) --- 654 655 module = strchr(pos->name, '\t'); 656 if (module) 657 *module = '\0'; 658 659 curr_map = map_groups__find(kmaps, map->type, pos->start); 660 661 if (!curr_map || (filter && filter(curr_map, pos))) { | 1#include <dirent.h> 2#include <errno.h> 3#include <stdlib.h> 4#include <stdio.h> 5#include <string.h> 6#include <sys/types.h> 7#include <sys/stat.h> 8#include <sys/param.h> --- 645 unchanged lines hidden (view full) --- 654 655 module = strchr(pos->name, '\t'); 656 if (module) 657 *module = '\0'; 658 659 curr_map = map_groups__find(kmaps, map->type, pos->start); 660 661 if (!curr_map || (filter && filter(curr_map, pos))) { |
662 rb_erase(&pos->rb_node, root); | 662 rb_erase_init(&pos->rb_node, root); |
663 symbol__delete(pos); 664 } else { 665 pos->start -= curr_map->start - curr_map->pgoff; 666 if (pos->end) 667 pos->end -= curr_map->start - curr_map->pgoff; 668 if (curr_map != map) { | 663 symbol__delete(pos); 664 } else { 665 pos->start -= curr_map->start - curr_map->pgoff; 666 if (pos->end) 667 pos->end -= curr_map->start - curr_map->pgoff; 668 if (curr_map != map) { |
669 rb_erase(&pos->rb_node, root); | 669 rb_erase_init(&pos->rb_node, root); |
670 symbols__insert( 671 &curr_map->dso->symbols[curr_map->type], 672 pos); 673 ++moved; 674 } else { 675 ++count; 676 } 677 } --- 490 unchanged lines hidden (view full) --- 1168 } 1169 1170 if (!replacement_map) 1171 replacement_map = list_entry(md.maps.next, struct map, node); 1172 1173 /* Add new maps */ 1174 while (!list_empty(&md.maps)) { 1175 new_map = list_entry(md.maps.next, struct map, node); | 670 symbols__insert( 671 &curr_map->dso->symbols[curr_map->type], 672 pos); 673 ++moved; 674 } else { 675 ++count; 676 } 677 } --- 490 unchanged lines hidden (view full) --- 1168 } 1169 1170 if (!replacement_map) 1171 replacement_map = list_entry(md.maps.next, struct map, node); 1172 1173 /* Add new maps */ 1174 while (!list_empty(&md.maps)) { 1175 new_map = list_entry(md.maps.next, struct map, node); |
1176 list_del(&new_map->node); | 1176 list_del_init(&new_map->node); |
1177 if (new_map == replacement_map) { 1178 map->start = new_map->start; 1179 map->end = new_map->end; 1180 map->pgoff = new_map->pgoff; 1181 map->map_ip = new_map->map_ip; 1182 map->unmap_ip = new_map->unmap_ip; 1183 map__delete(new_map); 1184 /* Ensure maps are correctly ordered */ --- 21 unchanged lines hidden (view full) --- 1206 else 1207 pr_debug("Using %s for kernel data\n", kcore_filename); 1208 1209 return 0; 1210 1211out_err: 1212 while (!list_empty(&md.maps)) { 1213 map = list_entry(md.maps.next, struct map, node); | 1177 if (new_map == replacement_map) { 1178 map->start = new_map->start; 1179 map->end = new_map->end; 1180 map->pgoff = new_map->pgoff; 1181 map->map_ip = new_map->map_ip; 1182 map->unmap_ip = new_map->unmap_ip; 1183 map__delete(new_map); 1184 /* Ensure maps are correctly ordered */ --- 21 unchanged lines hidden (view full) --- 1206 else 1207 pr_debug("Using %s for kernel data\n", kcore_filename); 1208 1209 return 0; 1210 1211out_err: 1212 while (!list_empty(&md.maps)) { 1213 map = list_entry(md.maps.next, struct map, node); |
1214 list_del(&map->node); | 1214 list_del_init(&map->node); |
1215 map__delete(map); 1216 } 1217 close(fd); 1218 return -EINVAL; 1219} 1220 1221/* 1222 * If the kernel is relocated at boot time, kallsyms won't match. Compute the --- 805 unchanged lines hidden --- | 1215 map__delete(map); 1216 } 1217 close(fd); 1218 return -EINVAL; 1219} 1220 1221/* 1222 * If the kernel is relocated at boot time, kallsyms won't match. Compute the --- 805 unchanged lines hidden --- |